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

Unified Diff: git_cl.py

Issue 1166673002: Fix bug in git cl patch using raw patch URL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 5 years, 7 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 8cc37bf589eba07923e273d6578a3d7e0f8597f3..0dcfedf47656bdee3b429f2d0f13700e8aa5fe85 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -318,7 +318,7 @@ def trigger_try_jobs(auth_config, changelist, options, masters, category,
time.sleep(0.5 + 1.5*try_count)
print '\n'.join(print_text)
-
+
def MatchSvnGlob(url, base_url, glob_spec, allow_wildcards):
"""Return the corresponding git ref if |base_url| together with |glob_spec|
@@ -2711,7 +2711,8 @@ def PatchIssue(issue_arg, reject, nocommit, directory, auth_config):
# consequences of the caller not checking this could be dire.
assert(not git_common.is_dirty_git_tree('apply'))
- if type(issue_arg) is int or issue_arg.isdigit():
+ arg_is_issue_id = type(issue_arg) is int or issue_arg.isdigit()
+ if arg_is_issue_id:
# Input is an issue id. Figure out the URL.
issue = int(issue_arg)
cl = Changelist(issue=issue, auth_config=auth_config)
@@ -2764,7 +2765,8 @@ def PatchIssue(issue_arg, reject, nocommit, directory, auth_config):
# If we had an issue, commit the current state and register the issue.
if not nocommit:
- RunGit(['commit', '-m', (cl.GetDescription() + '\n\n' +
+ commit_message = cl.GetDescription() + '\n\n' if arg_is_issue_id else ''
agable 2015/06/01 21:22:53 Rather than removing functionality (replacing the
kjellander_chromium 2015/06/02 07:47:09 Good idea. That was pretty simple to do by just up
+ RunGit(['commit', '-m', (commit_message +
'patch from issue %(i)s at patchset '
'%(p)s (http://crrev.com/%(i)s#ps%(p)s)'
% {'i': issue, 'p': patchset})])
« 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