|
|
@ -733,13 +733,18 @@ def GenerateDiff(files):
|
|
|
|
files, GetRepositoryRoot(), full_move=False, revision=None)
|
|
|
|
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"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def OptionallyDoPresubmitChecks(change_info, committing, args):
|
|
|
|
def OptionallyDoPresubmitChecks(change_info, committing, args):
|
|
|
|
if FilterFlag(args, "--no_presubmit") or FilterFlag(args, "--force"):
|
|
|
|
if FilterFlag(args, "--no_presubmit") or FilterFlag(args, "--force"):
|
|
|
|
breakpad.SendStack(
|
|
|
|
breakpad.SendStack(
|
|
|
|
breakpad.DEFAULT_URL + '/breakpad',
|
|
|
|
breakpad.DEFAULT_URL + '/breakpad',
|
|
|
|
'GclHooksBypassedCommit',
|
|
|
|
'GclHooksBypassedCommit',
|
|
|
|
'Issue %s/%s bypassed hook when committing' %
|
|
|
|
'Issue %s/%s bypassed hook when committing (tree status was "%s")' %
|
|
|
|
(change_info.rietveld, change_info.issue),
|
|
|
|
(change_info.rietveld, change_info.issue, GetTreeStatus()),
|
|
|
|
verbose=False)
|
|
|
|
verbose=False)
|
|
|
|
return presubmit_support.PresubmitOutput()
|
|
|
|
return presubmit_support.PresubmitOutput()
|
|
|
|
return DoPresubmitChecks(change_info, committing, True)
|
|
|
|
return DoPresubmitChecks(change_info, committing, True)
|
|
|
@ -1065,7 +1070,10 @@ def CMDcommit(change_info, args):
|
|
|
|
change_info.issue, False)
|
|
|
|
change_info.issue, False)
|
|
|
|
patch_num = len(props['patchsets'])
|
|
|
|
patch_num = len(props['patchsets'])
|
|
|
|
comment = "Committed patchset #%d manually as r%s" % (patch_num, revision)
|
|
|
|
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 '.'
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
comment += ' (presubmit successful).'
|
|
|
|
change_info.AddComment(comment)
|
|
|
|
change_info.AddComment(comment)
|
|
|
|
return 0
|
|
|
|
return 0
|
|
|
|
|
|
|
|
|
|
|
|