OLD | NEW |
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 1448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1459 | 1459 |
1460 cl = Changelist() | 1460 cl = Changelist() |
1461 print | 1461 print |
1462 print 'Current branch:', | 1462 print 'Current branch:', |
1463 if not cl.GetIssue(): | 1463 if not cl.GetIssue(): |
1464 print 'no issue assigned.' | 1464 print 'no issue assigned.' |
1465 return 0 | 1465 return 0 |
1466 print cl.GetBranch() | 1466 print cl.GetBranch() |
1467 print 'Issue number: %s (%s)' % (cl.GetIssue(), cl.GetIssueURL()) | 1467 print 'Issue number: %s (%s)' % (cl.GetIssue(), cl.GetIssueURL()) |
1468 if not options.fast: | 1468 if not options.fast: |
| 1469 print 'Issue owner: %s <%s>' % (cl.GetIssueProperties()['owner'], |
| 1470 cl.GetIssueProperties()['owner_email']) |
1469 print 'Issue description:' | 1471 print 'Issue description:' |
1470 print cl.GetDescription(pretty=True) | 1472 print cl.GetDescription(pretty=True) |
1471 return 0 | 1473 return 0 |
1472 | 1474 |
1473 | 1475 |
1474 def colorize_CMDstatus_doc(): | 1476 def colorize_CMDstatus_doc(): |
1475 """To be called once in main() to add colors to git cl status help.""" | 1477 """To be called once in main() to add colors to git cl status help.""" |
1476 colors = [i for i in dir(Fore) if i[0].isupper()] | 1478 colors = [i for i in dir(Fore) if i[0].isupper()] |
1477 | 1479 |
1478 def colorize_line(line): | 1480 def colorize_line(line): |
(...skipping 1676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3155 if __name__ == '__main__': | 3157 if __name__ == '__main__': |
3156 # These affect sys.stdout so do it outside of main() to simplify mocks in | 3158 # These affect sys.stdout so do it outside of main() to simplify mocks in |
3157 # unit testing. | 3159 # unit testing. |
3158 fix_encoding.fix_encoding() | 3160 fix_encoding.fix_encoding() |
3159 colorama.init() | 3161 colorama.init() |
3160 try: | 3162 try: |
3161 sys.exit(main(sys.argv[1:])) | 3163 sys.exit(main(sys.argv[1:])) |
3162 except KeyboardInterrupt: | 3164 except KeyboardInterrupt: |
3163 sys.stderr.write('interrupted\n') | 3165 sys.stderr.write('interrupted\n') |
3164 sys.exit(1) | 3166 sys.exit(1) |
OLD | NEW |