Chromium Code Reviews| Index: gcl.py |
| diff --git a/gcl.py b/gcl.py |
| index 1249480d28e006b7f5008bd81668c1a03bd53729..c6701ce08ecfb7ad4e807b911711a3c6bcbe93f6 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" |
|
M-A Ruel
2014/01/14 19:07:34
return None otherwise.
iannucci
2014/01/14 19:23:42
Ah, oops, this is why I shouldn't do code reviews
|
| + |
| + |
| 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 status was "%s")' % GetTreeStatus() |
|
M-A Ruel
2014/01/14 19:07:34
Do not add this suffix "if not GetTreeStatus()"
|
| + else: |
| + comment += ' (presubmit successful).' |
| change_info.AddComment(comment) |
| return 0 |