Change scm.GIT.CaptureStatus to ignore unmerged upstream changes.

With this CL, the patch that is sent to the code review site includes only changes from the nearest common ancestor of the local and the upstream branch.

A diagram:

     /----B <- local branch
----A-----C <- upstream

Previously, the diff would be simply between C and B, whereas now it's between A and C, even if you update C.

This allows you to continously update origin/trunk without having to rebase/merge your local changes all the time, resulting in the need for less rebuilds.

Review URL: http://codereview.chromium.org/1583003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@43113 0039d316-1c4b-4281-b951-d872f2087c98
experimental/szager/collated-output
bauerb@chromium.org 16 years ago
parent a72bd94c40
commit 14ec50401c

@ -70,7 +70,7 @@ class GIT(object):
@files can be a string (one file) or a list of files. @files can be a string (one file) or a list of files.
Returns an array of (status, file) tuples.""" Returns an array of (status, file) tuples."""
command = ["diff", "--name-status", "-r", "%s.." % upstream_branch] command = ["diff", "--name-status", "-r", "%s..." % upstream_branch]
if not files: if not files:
pass pass
elif isinstance(files, basestring): elif isinstance(files, basestring):

Loading…
Cancel
Save