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

Unified Diff: gcl.py

Issue 130803004: Indiciate the tree status in the rietveld message when bypassing hooks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: updates Created 6 years, 11 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 | git_cl.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gcl.py
diff --git a/gcl.py b/gcl.py
index 1249480d28e006b7f5008bd81668c1a03bd53729..cf48e782ee616b8b47d04ceb84f3f26b1f8c1505 100755
--- a/gcl.py
+++ b/gcl.py
@@ -733,13 +733,18 @@ def GenerateDiff(files):
files, GetRepositoryRoot(), full_move=False, revision=None)
+def GetTreeStatus():
+ tree_status_url = GetCodeReviewSetting('STATUS')
+ return git_cl.GetTreeStatus(tree_status_url) if tree_status_url else "unset"
iannucci 2014/01/14 19:45:58 this should still probably return None instead of
+
+
def OptionallyDoPresubmitChecks(change_info, committing, args):
if FilterFlag(args, "--no_presubmit") or FilterFlag(args, "--force"):
breakpad.SendStack(
breakpad.DEFAULT_URL + '/breakpad',
'GclHooksBypassedCommit',
- 'Issue %s/%s bypassed hook when committing' %
- (change_info.rietveld, change_info.issue),
+ 'Issue %s/%s bypassed hook when committing (tree status was "%s")' %
+ (change_info.rietveld, change_info.issue, GetTreeStatus()),
verbose=False)
return presubmit_support.PresubmitOutput()
return DoPresubmitChecks(change_info, committing, True)
@@ -1065,7 +1070,10 @@ def CMDcommit(change_info, args):
change_info.issue, False)
patch_num = len(props['patchsets'])
comment = "Committed patchset #%d manually as r%s" % (patch_num, revision)
- comment += ' (presubmit successful).' if not bypassed else '.'
+ if bypassed:
+ comment += ' (tree was closed).' if GetTreeStatus() == 'closed' else '.'
Dirk Pranke 2014/01/14 22:56:21 Since "tree was closed" is not the same thing as "
+ else:
+ comment += ' (presubmit successful).'
change_info.AddComment(comment)
return 0
« no previous file with comments | « no previous file | git_cl.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698