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

Side by Side Diff: git_cl.py

Issue 12047089: Make gcl commit/git cl dcommit append a commit notification to rietveld. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Pull AddComment from git_cl.py Created 7 years, 11 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 comment = "Committed manually as r%s" % revision
1499 comment += ' (presubmit successful).' if not options.bypass_hooks else '.'
1500 cl.RpcServer().add_comment(cl.GetIssue(), comment)
1498 cl.SetIssue(0) 1501 cl.SetIssue(0)
1499 1502
1500 if retcode == 0: 1503 if retcode == 0:
1501 hook = POSTUPSTREAM_HOOK_PATTERN % cmd 1504 hook = POSTUPSTREAM_HOOK_PATTERN % cmd
1502 if os.path.isfile(hook): 1505 if os.path.isfile(hook):
1503 RunCommand([hook, base_branch], error_ok=True) 1506 RunCommand([hook, base_branch], error_ok=True)
1504 1507
1505 return 0 1508 return 0
1506 1509
1507 1510
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
1866 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) 1869 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)))
1867 1870
1868 # Not a known command. Default to help. 1871 # Not a known command. Default to help.
1869 GenUsage(parser, 'help') 1872 GenUsage(parser, 'help')
1870 return CMDhelp(parser, argv) 1873 return CMDhelp(parser, argv)
1871 1874
1872 1875
1873 if __name__ == '__main__': 1876 if __name__ == '__main__':
1874 fix_encoding.fix_encoding() 1877 fix_encoding.fix_encoding()
1875 sys.exit(main(sys.argv[1:])) 1878 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