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

Side by Side Diff: git_cl.py

Issue 12300005: Fix parameters for git_cl and gcl (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Fix unittest too Created 7 years, 10 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 | « gcl.py ('k') | tests/gcl_unittest.py » ('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.""" 8 """A git-command for integrating reviews on Rietveld."""
9 9
10 import json 10 import json
(...skipping 1477 matching lines...) Expand 10 before | Expand all | Expand 10 after
1488 else: 1488 else:
1489 return 1 1489 return 1
1490 viewvc_url = settings.GetViewVCUrl() 1490 viewvc_url = settings.GetViewVCUrl()
1491 if viewvc_url and revision: 1491 if viewvc_url and revision:
1492 cl.description += ('\n\nCommitted: ' + viewvc_url + revision) 1492 cl.description += ('\n\nCommitted: ' + viewvc_url + revision)
1493 elif revision: 1493 elif revision:
1494 cl.description += ('\n\nCommitted: ' + revision) 1494 cl.description += ('\n\nCommitted: ' + revision)
1495 print ('Closing issue ' 1495 print ('Closing issue '
1496 '(you may be prompted for your codereview password)...') 1496 '(you may be prompted for your codereview password)...')
1497 cl.CloseIssue() 1497 cl.CloseIssue()
1498 props = cl.RpcServer().get_issue_properties(cl.GetIssue()) 1498 props = cl.RpcServer().get_issue_properties(cl.GetIssue(), False)
1499 patch_num = len(props['patchset']) 1499 patch_num = len(props['patchset'])
1500 comment = "Committed patchset #%d manually as r%s" % (patch_num, revision) 1500 comment = "Committed patchset #%d manually as r%s" % (patch_num, revision)
1501 comment += ' (presubmit successful).' if not options.bypass_hooks else '.' 1501 comment += ' (presubmit successful).' if not options.bypass_hooks else '.'
1502 cl.RpcServer().add_comment(cl.GetIssue(), comment) 1502 cl.RpcServer().add_comment(cl.GetIssue(), comment)
1503 cl.SetIssue(0) 1503 cl.SetIssue(0)
1504 1504
1505 if retcode == 0: 1505 if retcode == 0:
1506 hook = POSTUPSTREAM_HOOK_PATTERN % cmd 1506 hook = POSTUPSTREAM_HOOK_PATTERN % cmd
1507 if os.path.isfile(hook): 1507 if os.path.isfile(hook):
1508 RunCommand([hook, base_branch], error_ok=True) 1508 RunCommand([hook, base_branch], error_ok=True)
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
1871 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) 1871 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)))
1872 1872
1873 # Not a known command. Default to help. 1873 # Not a known command. Default to help.
1874 GenUsage(parser, 'help') 1874 GenUsage(parser, 'help')
1875 return CMDhelp(parser, argv) 1875 return CMDhelp(parser, argv)
1876 1876
1877 1877
1878 if __name__ == '__main__': 1878 if __name__ == '__main__':
1879 fix_encoding.fix_encoding() 1879 fix_encoding.fix_encoding()
1880 sys.exit(main(sys.argv[1:])) 1880 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « gcl.py ('k') | tests/gcl_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698