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

Side by Side Diff: git_cl.py

Issue 432023003: Do not put an 'r' in front of the revision when commenting on Rietveld after committing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« 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 2015 matching lines...) Expand 10 before | Expand all | Expand 10 after
2026 if viewvc_url and revision: 2026 if viewvc_url and revision:
2027 change_desc.append_footer('Committed: ' + viewvc_url + revision) 2027 change_desc.append_footer('Committed: ' + viewvc_url + revision)
2028 elif revision: 2028 elif revision:
2029 change_desc.append_footer('Committed: ' + revision) 2029 change_desc.append_footer('Committed: ' + revision)
2030 print ('Closing issue ' 2030 print ('Closing issue '
2031 '(you may be prompted for your codereview password)...') 2031 '(you may be prompted for your codereview password)...')
2032 cl.UpdateDescription(change_desc.description) 2032 cl.UpdateDescription(change_desc.description)
2033 cl.CloseIssue() 2033 cl.CloseIssue()
2034 props = cl.GetIssueProperties() 2034 props = cl.GetIssueProperties()
2035 patch_num = len(props['patchsets']) 2035 patch_num = len(props['patchsets'])
2036 comment = "Committed patchset #%d manually as r%s" % (patch_num, revision) 2036 comment = "Committed patchset #%d manually as %s" % (patch_num, revision)
2037 if options.bypass_hooks: 2037 if options.bypass_hooks:
2038 comment += ' (tree was closed).' if GetTreeStatus() == 'closed' else '.' 2038 comment += ' (tree was closed).' if GetTreeStatus() == 'closed' else '.'
2039 else: 2039 else:
2040 comment += ' (presubmit successful).' 2040 comment += ' (presubmit successful).'
2041 cl.RpcServer().add_comment(cl.GetIssue(), comment) 2041 cl.RpcServer().add_comment(cl.GetIssue(), comment)
2042 cl.SetIssue(None) 2042 cl.SetIssue(None)
2043 2043
2044 if retcode == 0: 2044 if retcode == 0:
2045 hook = POSTUPSTREAM_HOOK_PATTERN % cmd 2045 hook = POSTUPSTREAM_HOOK_PATTERN % cmd
2046 if os.path.isfile(hook): 2046 if os.path.isfile(hook):
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
2633 ('AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' 2633 ('AppEngine is misbehaving and returned HTTP %d, again. Keep faith '
2634 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) 2634 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)))
2635 2635
2636 2636
2637 if __name__ == '__main__': 2637 if __name__ == '__main__':
2638 # These affect sys.stdout so do it outside of main() to simplify mocks in 2638 # These affect sys.stdout so do it outside of main() to simplify mocks in
2639 # unit testing. 2639 # unit testing.
2640 fix_encoding.fix_encoding() 2640 fix_encoding.fix_encoding()
2641 colorama.init() 2641 colorama.init()
2642 sys.exit(main(sys.argv[1:])) 2642 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