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

Side by Side Diff: git_cl.py

Issue 112123003: Fix TypeError: cannot concatenate 'str' and 'int' objects (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: 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 | 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 from distutils.version import LooseVersion 10 from distutils.version import LooseVersion
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 ('\nWhile fetching the description for issue %d, received a ' 647 ('\nWhile fetching the description for issue %d, received a '
648 '404 (not found)\n' 648 '404 (not found)\n'
649 'error. It is likely that you deleted this ' 649 'error. It is likely that you deleted this '
650 'issue on the server. If this is the\n' 650 'issue on the server. If this is the\n'
651 'case, please run\n\n' 651 'case, please run\n\n'
652 ' git cl issue 0\n\n' 652 ' git cl issue 0\n\n'
653 'to clear the association with the deleted issue. Then run ' 653 'to clear the association with the deleted issue. Then run '
654 'this command again.') % issue) 654 'this command again.') % issue)
655 else: 655 else:
656 DieWithError( 656 DieWithError(
657 '\nFailed to fetch issue description. HTTP error ' + e.code) 657 '\nFailed to fetch issue description. HTTP error %d' % e.code)
658 self.has_description = True 658 self.has_description = True
659 if pretty: 659 if pretty:
660 wrapper = textwrap.TextWrapper() 660 wrapper = textwrap.TextWrapper()
661 wrapper.initial_indent = wrapper.subsequent_indent = ' ' 661 wrapper.initial_indent = wrapper.subsequent_indent = ' '
662 return wrapper.fill(self.description) 662 return wrapper.fill(self.description)
663 return self.description 663 return self.description
664 664
665 def GetPatchset(self): 665 def GetPatchset(self):
666 """Returns the patchset number as a int or None if not set.""" 666 """Returns the patchset number as a int or None if not set."""
667 if self.patchset is None and not self.lookedup_patchset: 667 if self.patchset is None and not self.lookedup_patchset:
(...skipping 1694 matching lines...) Expand 10 before | Expand all | Expand 10 after
2362 ('AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' 2362 ('AppEngine is misbehaving and returned HTTP %d, again. Keep faith '
2363 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) 2363 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)))
2364 2364
2365 2365
2366 if __name__ == '__main__': 2366 if __name__ == '__main__':
2367 # These affect sys.stdout so do it outside of main() to simplify mocks in 2367 # These affect sys.stdout so do it outside of main() to simplify mocks in
2368 # unit testing. 2368 # unit testing.
2369 fix_encoding.fix_encoding() 2369 fix_encoding.fix_encoding()
2370 colorama.init() 2370 colorama.init()
2371 sys.exit(main(sys.argv[1:])) 2371 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698