diff --git a/gcl.py b/gcl.py index b020e74bb9..a32b950fe4 100755 --- a/gcl.py +++ b/gcl.py @@ -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: diff --git a/git_cl.py b/git_cl.py index 063e9c5f1e..8be31201c2 100755 --- a/git_cl.py +++ b/git_cl.py @@ -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: diff --git a/tests/gcl_unittest.py b/tests/gcl_unittest.py index 602bafb763..b3787447be 100755 --- a/tests/gcl_unittest.py +++ b/tests/gcl_unittest.py @@ -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__':