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

Side by Side Diff: git_cl.py

Issue 11094033: Make repos without VIEW_VC also post Committed to the codereview. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « gcl.py ('k') | 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 import json 10 import json
(...skipping 1326 matching lines...) Expand 10 before | Expand all | Expand 10 after
1337 match = filter(None, match) 1337 match = filter(None, match)
1338 if len(match) != 1: 1338 if len(match) != 1:
1339 DieWithError("Couldn't parse ouput to extract the committed hash:\n%s" % 1339 DieWithError("Couldn't parse ouput to extract the committed hash:\n%s" %
1340 output) 1340 output)
1341 revision = match[0].group(2) 1341 revision = match[0].group(2)
1342 else: 1342 else:
1343 return 1 1343 return 1
1344 viewvc_url = settings.GetViewVCUrl() 1344 viewvc_url = settings.GetViewVCUrl()
1345 if viewvc_url and revision: 1345 if viewvc_url and revision:
1346 cl.description += ('\n\nCommitted: ' + viewvc_url + revision) 1346 cl.description += ('\n\nCommitted: ' + viewvc_url + revision)
1347 elif revision:
1348 cl.description += ('\n\nCommitted: ' + revision)
1347 print ('Closing issue ' 1349 print ('Closing issue '
1348 '(you may be prompted for your codereview password)...') 1350 '(you may be prompted for your codereview password)...')
1349 cl.CloseIssue() 1351 cl.CloseIssue()
1350 cl.SetIssue(0) 1352 cl.SetIssue(0)
1351 1353
1352 if retcode == 0: 1354 if retcode == 0:
1353 hook = POSTUPSTREAM_HOOK_PATTERN % cmd 1355 hook = POSTUPSTREAM_HOOK_PATTERN % cmd
1354 if os.path.isfile(hook): 1356 if os.path.isfile(hook):
1355 RunCommand([hook, base_branch], error_ok=True) 1357 RunCommand([hook, base_branch], error_ok=True)
1356 1358
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
1716 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) 1718 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)))
1717 1719
1718 # Not a known command. Default to help. 1720 # Not a known command. Default to help.
1719 GenUsage(parser, 'help') 1721 GenUsage(parser, 'help')
1720 return CMDhelp(parser, argv) 1722 return CMDhelp(parser, argv)
1721 1723
1722 1724
1723 if __name__ == '__main__': 1725 if __name__ == '__main__':
1724 fix_encoding.fix_encoding() 1726 fix_encoding.fix_encoding()
1725 sys.exit(main(sys.argv[1:])) 1727 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « gcl.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698