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

Side by Side Diff: git_cl.py

Issue 118613003: git_cl.py: In the "status" command, add space after the branch name. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: fix tests (maybe?) Created 7 years 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 | « 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.""" 8 """A git-command for integrating reviews on Rietveld."""
9 9
10 from distutils.version import LooseVersion 10 from distutils.version import LooseVersion
(...skipping 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after
1221 alignment = max(5, max(len(ShortBranchName(b)) for b in branches)) 1221 alignment = max(5, max(len(ShortBranchName(b)) for b in branches))
1222 for branch in sorted(branches): 1222 for branch in sorted(branches):
1223 while branch not in tmp: 1223 while branch not in tmp:
1224 b, i, color = output.get() 1224 b, i, color = output.get()
1225 tmp[b] = (i, color) 1225 tmp[b] = (i, color)
1226 issue, color = tmp.pop(branch) 1226 issue, color = tmp.pop(branch)
1227 reset = Fore.RESET 1227 reset = Fore.RESET
1228 if not sys.stdout.isatty(): 1228 if not sys.stdout.isatty():
1229 color = '' 1229 color = ''
1230 reset = '' 1230 reset = ''
1231 print ' %*s: %s%s%s' % ( 1231 print ' %*s : %s%s%s' % (
1232 alignment, ShortBranchName(branch), color, issue, reset) 1232 alignment, ShortBranchName(branch), color, issue, reset)
1233 1233
1234 cl = Changelist() 1234 cl = Changelist()
1235 print 1235 print
1236 print 'Current branch:', 1236 print 'Current branch:',
1237 if not cl.GetIssue(): 1237 if not cl.GetIssue():
1238 print 'no issue assigned.' 1238 print 'no issue assigned.'
1239 return 0 1239 return 0
1240 print cl.GetBranch() 1240 print cl.GetBranch()
1241 print 'Issue number: %s (%s)' % (cl.GetIssue(), cl.GetIssueURL()) 1241 print 'Issue number: %s (%s)' % (cl.GetIssue(), cl.GetIssueURL())
(...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after
2368 ('AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' 2368 ('AppEngine is misbehaving and returned HTTP %d, again. Keep faith '
2369 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) 2369 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)))
2370 2370
2371 2371
2372 if __name__ == '__main__': 2372 if __name__ == '__main__':
2373 # These affect sys.stdout so do it outside of main() to simplify mocks in 2373 # These affect sys.stdout so do it outside of main() to simplify mocks in
2374 # unit testing. 2374 # unit testing.
2375 fix_encoding.fix_encoding() 2375 fix_encoding.fix_encoding()
2376 colorama.init() 2376 colorama.init()
2377 sys.exit(main(sys.argv[1:])) 2377 sys.exit(main(sys.argv[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