From 838f0f28a5ee30c647d0f7960ab7e70f20640c0c Mon Sep 17 00:00:00 2001 From: "bauerb@chromium.org" Date: Fri, 9 Apr 2010 17:02:50 +0000 Subject: [PATCH] Change |scm.GIT.GenerateDiff| and |scm.GIT.GetDifferentFiles| to ignore unmerged upstream changes. Similar to r43313, this CL makes |git try| use the same patch that |git cl upload| uploads. Review URL: http://codereview.chromium.org/1595018 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@44097 0039d316-1c4b-4281-b951-d872f2087c98 --- scm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scm.py b/scm.py index 3febbe495d..7c18f16604 100644 --- a/scm.py +++ b/scm.py @@ -236,7 +236,7 @@ class GIT(object): files, usually in the prospect to apply the patch for a try job.""" if not branch: branch = GIT.GetUpstream(cwd) - command = ['diff-tree', '-p', '--no-prefix', branch, branch_head] + command = ['diff', '-p', '--no-prefix', branch + "..." + branch_head] if not full_move: command.append('-C') # TODO(maruel): --binary support. @@ -256,7 +256,7 @@ class GIT(object): """Returns the list of modified files between two branches.""" if not branch: branch = GIT.GetUpstream(cwd) - command = ['diff', '--name-only', branch, branch_head] + command = ['diff', '--name-only', branch + "..." + branch_head] return GIT.Capture(command, cwd)[0].splitlines(False) @staticmethod