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
This commit is contained in:
parent
30d4f8372c
commit
1a5e83a0ac
@ -37,6 +37,8 @@ REGEX = 'regex'
|
|||||||
|
|
||||||
ALL_ALIASES = [ALL_BUILDERS, COMPILE_BUILDERS, CQ_BUILDERS, 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.
|
# Contact information for the build master.
|
||||||
SKIA_BUILD_MASTER_HOST = str(buildbot_globals.Get('public_master_host'))
|
SKIA_BUILD_MASTER_HOST = str(buildbot_globals.Get('public_master_host'))
|
||||||
SKIA_BUILD_MASTER_PORT = str(buildbot_globals.Get('public_external_port'))
|
SKIA_BUILD_MASTER_PORT = str(buildbot_globals.Get('public_external_port'))
|
||||||
@ -267,8 +269,13 @@ def SubmitTryRequest(args, is_svn=True):
|
|||||||
proc.communicate()[0]))
|
proc.communicate()[0]))
|
||||||
print proc.communicate()[0]
|
print proc.communicate()[0]
|
||||||
else:
|
else:
|
||||||
# Create the diff file.
|
# Find depot_tools. This is needed to import git_cl and trychange.
|
||||||
cmd = ['git.bat' if os.name == 'nt' else 'git', 'diff', 'origin/master']
|
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)
|
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
if proc.wait() != 0:
|
if proc.wait() != 0:
|
||||||
raise Exception('Failed to capture git diff!')
|
raise Exception('Failed to capture git diff!')
|
||||||
@ -279,9 +286,6 @@ def SubmitTryRequest(args, is_svn=True):
|
|||||||
with open(diff_file, 'wb') as f:
|
with open(diff_file, 'wb') as f:
|
||||||
f.write(proc.communicate()[0])
|
f.write(proc.communicate()[0])
|
||||||
|
|
||||||
# Find depot_tools. This is needed to import trychange.
|
|
||||||
sys.path.append(FindDepotTools())
|
|
||||||
import trychange
|
|
||||||
try_args = ['--use_svn',
|
try_args = ['--use_svn',
|
||||||
'--svn_repo', GetTryRepo(),
|
'--svn_repo', GetTryRepo(),
|
||||||
'--root', GetCheckoutRoot(is_svn),
|
'--root', GetCheckoutRoot(is_svn),
|
||||||
|
Loading…
Reference in New Issue
Block a user