Fix usage of the tracking branch for git.

Review Request #10091 — Created July 17, 2018 and submitted

david
RBTools
release-1.0.x
974b0e1...
rbtools

The change that improved parent base computation had an unintended side
effect of breaking use of the tracking branch. In the case where the
current working branch was local-only, it seemed to work, but if the
working branch was pushed to remote, it would break saying that there
were no diffs, regardless of the configured tracking branch.

This change fixes that up so that when no revisions are passed in on the
command line, we use the configured tracking/parent branch as the parent
revision, and use the fancy new youngest-ancestor procedure to determine
the merge base of the parent. This gives us the desired behavior:
posting the changes users want, but avoiding (when possible) huge parent
diffs.

A few of the unit tests needed to be fixed to be more correct to match
the desired behavior.

  • Posted some various changes.
  • Ran unit tests.
  • 0
  • 0
  • 3
  • 0
  • 3
Description From Last Updated
chipx86
  1. 
      
  2. rbtools/clients/git.py (Diff revision 1)
     
     

    Can we raise a more informative exception here, just in case this ever happens? I know it shouldn't, but it's also at least self-documenting.

  3. 
      
david
chipx86
  1. 
      
  2. rbtools/clients/git.py (Diff revisions 1 - 2)
     
     

    Single quotes.

    It'd also be nice to know the value. I think an exception would be best.

  3. rbtools/clients/git.py (Diff revisions 1 - 2)
     
     
  4. 
      
david
chipx86
  1. Ship It!
  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-1.0.x (974b0e1)
Loading...