Commit 52d224a2 authored by rmistry@google.com's avatar rmistry@google.com

Add the patchset id to the manual commit messages

Context is here:
https://groups.google.com/a/chromium.org/d/msg/chromium-dev/M7f9VTqrR8w/RECOX2Y5YasJ

Review URL: https://codereview.chromium.org/513763002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291687 0039d316-1c4b-4281-b951-d872f2087c98
parent d612e493
......@@ -1075,7 +1075,8 @@ def CMDcommit(change_info, args):
props = change_info.RpcServer().get_issue_properties(
change_info.issue, False)
patch_num = len(props['patchsets'])
comment = "Committed patchset #%d manually as r%s" % (patch_num, revision)
comment = "Committed patchset #%d (id:%d) manually as r%s" % (
patch_num, props['patchsets'][-1], revision)
if bypassed:
comment += ' (tree was closed).' if GetTreeStatus() == 'closed' else '.'
else:
......
......@@ -2053,8 +2053,8 @@ def SendUpstream(parser, args, cmd):
cl.CloseIssue()
props = cl.GetIssueProperties()
patch_num = len(props['patchsets'])
comment = "Committed patchset #%d%s manually as %s" % (
patch_num, to_pending, revision)
comment = "Committed patchset #%d (id:%d)%s manually as %s" % (
patch_num, props['patchsets'][-1], to_pending, revision)
if options.bypass_hooks:
comment += ' (tree was closed).' if GetTreeStatus() == 'closed' else '.'
else:
......
......@@ -613,7 +613,8 @@ class CMDCommitUnittest(GclTestsBase):
self.assertTrue(change_info._closed)
self.assertEqual(
change_info._comments_added,
["Committed patchset #1 manually as r12345 (presubmit successful)."])
["Committed patchset #1 (id:1337) manually as r12345 (presubmit "
"successful)."])
if __name__ == '__main__':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment