Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Unified Diff: git_cl.py

Issue 1830313002: Use tracking remote name for gerrit upload. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_cl.py
diff --git a/git_cl.py b/git_cl.py
index 4569601276718c4d69010bd75bcd765058e5d01d..8816a261fa1b1f2633374913b860fdf5394835c7 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -2458,10 +2458,6 @@ def GenerateGerritChangeId(message):
def GerritUpload(options, args, cl, change):
"""upload the current branch to gerrit."""
- # We assume the remote called "origin" is the one we want.
- # It is probably not worthwhile to support different workflows.
- gerrit_remote = 'origin'
-
remote, remote_branch = cl.GetRemoteBranch()
branch = GetTargetRef(remote, remote_branch, options.target_branch,
pending_prefix='')
@@ -2523,7 +2519,7 @@ def GerritUpload(options, args, cl, change):
DownloadGerritHook(False)
change_desc.set_description(AddChangeIdToCommitMessage(options, args))
ref_to_push = 'HEAD'
- parent = '%s/%s' % (gerrit_remote, branch)
+ parent = '%s/%s' % (remote, branch)
change_id = git_footers.get_footer_change_id(change_desc.description)[0]
commits = RunGitSilent(['rev-list', '%s..%s' % (parent,
@@ -2554,7 +2550,7 @@ def GerritUpload(options, args, cl, change):
if receive_options:
git_command.append('--receive-pack=git receive-pack %s' %
' '.join(receive_options))
- git_command += [gerrit_remote, ref_to_push + ':refs/for/' + branch]
+ git_command += [remote, ref_to_push + ':refs/for/' + branch]
push_stdout = gclient_utils.CheckCallAndFilter(
['git'] + git_command,
print_stdout=True,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698