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 import logging | 10 import logging |
(...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1083 print ('The tree is closed. Please wait for it to reopen. Use ' | 1083 print ('The tree is closed. Please wait for it to reopen. Use ' |
1084 '"git cl dcommit -f" to commit on a closed tree.') | 1084 '"git cl dcommit -f" to commit on a closed tree.') |
1085 return 1 | 1085 return 1 |
1086 elif 'unknown' == status: | 1086 elif 'unknown' == status: |
1087 print ('Unable to determine tree status. Please verify manually and ' | 1087 print ('Unable to determine tree status. Please verify manually and ' |
1088 'use "git cl dcommit -f" to commit on a closed tree.') | 1088 'use "git cl dcommit -f" to commit on a closed tree.') |
1089 else: | 1089 else: |
1090 breakpad.SendStack( | 1090 breakpad.SendStack( |
1091 'GitClHooksBypassedCommit', | 1091 'GitClHooksBypassedCommit', |
1092 'Issue %s/%s bypassed hook when committing' % | 1092 'Issue %s/%s bypassed hook when committing' % |
1093 (cl.GetRietveldServer(), cl.GetIssue())) | 1093 (cl.GetRietveldServer(), cl.GetIssue()), |
| 1094 verbose=False) |
1094 | 1095 |
1095 description = options.message | 1096 description = options.message |
1096 if not description and cl.GetIssue(): | 1097 if not description and cl.GetIssue(): |
1097 description = cl.GetDescription() | 1098 description = cl.GetDescription() |
1098 | 1099 |
1099 if not description: | 1100 if not description: |
1100 print 'No description set.' | 1101 print 'No description set.' |
1101 print 'Visit %s/edit to set it.' % (cl.GetIssueURL()) | 1102 print 'Visit %s/edit to set it.' % (cl.GetIssueURL()) |
1102 return 1 | 1103 return 1 |
1103 | 1104 |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1428 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) | 1429 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) |
1429 | 1430 |
1430 # Not a known command. Default to help. | 1431 # Not a known command. Default to help. |
1431 GenUsage(parser, 'help') | 1432 GenUsage(parser, 'help') |
1432 return CMDhelp(parser, argv) | 1433 return CMDhelp(parser, argv) |
1433 | 1434 |
1434 | 1435 |
1435 if __name__ == '__main__': | 1436 if __name__ == '__main__': |
1436 fix_encoding.fix_encoding() | 1437 fix_encoding.fix_encoding() |
1437 sys.exit(main(sys.argv[1:])) | 1438 sys.exit(main(sys.argv[1:])) |
OLD | NEW |