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