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

Side by Side Diff: git_cl.py

Issue 592293002: Report a 12-digit abbreviated hash in the "committed" message (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Use the enitre hash Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 # Copyright (C) 2008 Evan Martin <martine@danga.com> 6 # Copyright (C) 2008 Evan Martin <martine@danga.com>
7 7
8 """A git-command for integrating reviews on Rietveld.""" 8 """A git-command for integrating reviews on Rietveld."""
9 9
10 from distutils.version import LooseVersion 10 from distutils.version import LooseVersion
(...skipping 2097 matching lines...) Expand 10 before | Expand all | Expand 10 after
2108 'Committed: %s%s' % (viewvc_url, revision)) 2108 'Committed: %s%s' % (viewvc_url, revision))
2109 elif revision: 2109 elif revision:
2110 change_desc.append_footer('Committed: %s' % (revision,)) 2110 change_desc.append_footer('Committed: %s' % (revision,))
2111 print ('Closing issue ' 2111 print ('Closing issue '
2112 '(you may be prompted for your codereview password)...') 2112 '(you may be prompted for your codereview password)...')
2113 cl.UpdateDescription(change_desc.description) 2113 cl.UpdateDescription(change_desc.description)
2114 cl.CloseIssue() 2114 cl.CloseIssue()
2115 props = cl.GetIssueProperties() 2115 props = cl.GetIssueProperties()
2116 patch_num = len(props['patchsets']) 2116 patch_num = len(props['patchsets'])
2117 comment = "Committed patchset #%d (id:%d)%s manually as %s" % ( 2117 comment = "Committed patchset #%d (id:%d)%s manually as %s" % (
2118 patch_num, props['patchsets'][-1], to_pending, revision[:7]) 2118 patch_num, props['patchsets'][-1], to_pending, revision)
2119 if options.bypass_hooks: 2119 if options.bypass_hooks:
2120 comment += ' (tree was closed).' if GetTreeStatus() == 'closed' else '.' 2120 comment += ' (tree was closed).' if GetTreeStatus() == 'closed' else '.'
2121 else: 2121 else:
2122 comment += ' (presubmit successful).' 2122 comment += ' (presubmit successful).'
2123 cl.RpcServer().add_comment(cl.GetIssue(), comment) 2123 cl.RpcServer().add_comment(cl.GetIssue(), comment)
2124 cl.SetIssue(None) 2124 cl.SetIssue(None)
2125 2125
2126 if pushed_to_pending: 2126 if pushed_to_pending:
2127 _, branch = cl.FetchUpstreamTuple(cl.GetBranch()) 2127 _, branch = cl.FetchUpstreamTuple(cl.GetBranch())
2128 print 'The commit is in the pending queue (%s).' % pending_ref 2128 print 'The commit is in the pending queue (%s).' % pending_ref
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
2874 ('AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' 2874 ('AppEngine is misbehaving and returned HTTP %d, again. Keep faith '
2875 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) 2875 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)))
2876 2876
2877 2877
2878 if __name__ == '__main__': 2878 if __name__ == '__main__':
2879 # These affect sys.stdout so do it outside of main() to simplify mocks in 2879 # These affect sys.stdout so do it outside of main() to simplify mocks in
2880 # unit testing. 2880 # unit testing.
2881 fix_encoding.fix_encoding() 2881 fix_encoding.fix_encoding()
2882 colorama.init() 2882 colorama.init()
2883 sys.exit(main(sys.argv[1:])) 2883 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698