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

Side by Side Diff: git_cl.py

Issue 2111543002: Do not remove issue from branch after it is landed manually (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Fix Created 4 years, 5 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 | tests/basic.sh » ('j') | 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 and Gerrit.""" 8 """A git-command for integrating reviews on Rietveld and Gerrit."""
9 9
10 from __future__ import print_function 10 from __future__ import print_function
(...skipping 4079 matching lines...) Expand 10 before | Expand all | Expand 10 after
4090 cl.CloseIssue() 4090 cl.CloseIssue()
4091 props = cl.GetIssueProperties() 4091 props = cl.GetIssueProperties()
4092 patch_num = len(props['patchsets']) 4092 patch_num = len(props['patchsets'])
4093 comment = "Committed patchset #%d (id:%d)%s manually as %s" % ( 4093 comment = "Committed patchset #%d (id:%d)%s manually as %s" % (
4094 patch_num, props['patchsets'][-1], to_pending, revision) 4094 patch_num, props['patchsets'][-1], to_pending, revision)
4095 if options.bypass_hooks: 4095 if options.bypass_hooks:
4096 comment += ' (tree was closed).' if GetTreeStatus() == 'closed' else '.' 4096 comment += ' (tree was closed).' if GetTreeStatus() == 'closed' else '.'
4097 else: 4097 else:
4098 comment += ' (presubmit successful).' 4098 comment += ' (presubmit successful).'
4099 cl.RpcServer().add_comment(cl.GetIssue(), comment) 4099 cl.RpcServer().add_comment(cl.GetIssue(), comment)
4100 cl.SetIssue(None)
4101 4100
4102 if pushed_to_pending: 4101 if pushed_to_pending:
4103 _, branch = cl.FetchUpstreamTuple(cl.GetBranch()) 4102 _, branch = cl.FetchUpstreamTuple(cl.GetBranch())
4104 print('The commit is in the pending queue (%s).' % pending_ref) 4103 print('The commit is in the pending queue (%s).' % pending_ref)
4105 print('It will show up on %s in ~1 min, once it gets a Cr-Commit-Position ' 4104 print('It will show up on %s in ~1 min, once it gets a Cr-Commit-Position '
4106 'footer.' % branch) 4105 'footer.' % branch)
4107 4106
4108 hook = POSTUPSTREAM_HOOK_PATTERN % cmd 4107 hook = POSTUPSTREAM_HOOK_PATTERN % cmd
4109 if os.path.isfile(hook): 4108 if os.path.isfile(hook):
4110 RunCommand([hook, merge_base], error_ok=True) 4109 RunCommand([hook, merge_base], error_ok=True)
(...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after
5079 if __name__ == '__main__': 5078 if __name__ == '__main__':
5080 # These affect sys.stdout so do it outside of main() to simplify mocks in 5079 # These affect sys.stdout so do it outside of main() to simplify mocks in
5081 # unit testing. 5080 # unit testing.
5082 fix_encoding.fix_encoding() 5081 fix_encoding.fix_encoding()
5083 setup_color.init() 5082 setup_color.init()
5084 try: 5083 try:
5085 sys.exit(main(sys.argv[1:])) 5084 sys.exit(main(sys.argv[1:]))
5086 except KeyboardInterrupt: 5085 except KeyboardInterrupt:
5087 sys.stderr.write('interrupted\n') 5086 sys.stderr.write('interrupted\n')
5088 sys.exit(1) 5087 sys.exit(1)
OLDNEW
« no previous file with comments | « no previous file | tests/basic.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698