diff options
author | borenet@google.com <borenet@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-01-14 18:03:10 +0000 |
---|---|---|
committer | borenet@google.com <borenet@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-01-14 18:03:10 +0000 |
commit | 1a5e83a0ac27aa2c9d7dd8deadc8e88a4af0fbf6 (patch) | |
tree | 2b1ef2c753b10f6cc9cc8fd9d92f0b9c36dea61b | |
parent | 30d4f8372c362dfa9e4ba8c2fd8e264fe6bb0dca (diff) |
Use git_cl.Changelist.GetUpstreamBranch() for diff in submit_try
BUG=skia:1862
R=epoger@google.com
Review URL: https://codereview.chromium.org/136823002
git-svn-id: http://skia.googlecode.com/svn/trunk@13066 2bbb7eff-a529-9590-31e7-b0007b416f81
-rwxr-xr-x | tools/submit_try | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/tools/submit_try b/tools/submit_try index 586fb10dbb..a2d46fc14f 100755 --- a/tools/submit_try +++ b/tools/submit_try @@ -37,6 +37,8 @@ REGEX = 'regex' ALL_ALIASES = [ALL_BUILDERS, COMPILE_BUILDERS, CQ_BUILDERS, REGEX] +GIT = 'git.bat' if os.name == 'nt' else 'git' + # Contact information for the build master. SKIA_BUILD_MASTER_HOST = str(buildbot_globals.Get('public_master_host')) SKIA_BUILD_MASTER_PORT = str(buildbot_globals.Get('public_external_port')) @@ -267,8 +269,13 @@ def SubmitTryRequest(args, is_svn=True): proc.communicate()[0])) print proc.communicate()[0] else: - # Create the diff file. - cmd = ['git.bat' if os.name == 'nt' else 'git', 'diff', 'origin/master'] + # Find depot_tools. This is needed to import git_cl and trychange. + sys.path.append(FindDepotTools()) + import git_cl + import trychange + + cmd = [GIT, 'diff', git_cl.Changelist().GetUpstreamBranch(), + '--no-ext-diff'] proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) if proc.wait() != 0: raise Exception('Failed to capture git diff!') @@ -279,9 +286,6 @@ def SubmitTryRequest(args, is_svn=True): with open(diff_file, 'wb') as f: f.write(proc.communicate()[0]) - # Find depot_tools. This is needed to import trychange. - sys.path.append(FindDepotTools()) - import trychange try_args = ['--use_svn', '--svn_repo', GetTryRepo(), '--root', GetCheckoutRoot(is_svn), |