| 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 """\ | 6 """\ |
| 7 Wrapper script around Rietveld's upload.py that simplifies working with groups | 7 Wrapper script around Rietveld's upload.py that simplifies working with groups |
| 8 of files. | 8 of files. |
| 9 """ | 9 """ |
| 10 | 10 |
| (...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 740 | 740 |
| 741 | 741 |
| 742 def GenerateDiff(files): | 742 def GenerateDiff(files): |
| 743 return SVN.GenerateDiff( | 743 return SVN.GenerateDiff( |
| 744 files, GetRepositoryRoot(), full_move=False, revision=None) | 744 files, GetRepositoryRoot(), full_move=False, revision=None) |
| 745 | 745 |
| 746 | 746 |
| 747 def OptionallyDoPresubmitChecks(change_info, committing, args): | 747 def OptionallyDoPresubmitChecks(change_info, committing, args): |
| 748 if FilterFlag(args, "--no_presubmit") or FilterFlag(args, "--force"): | 748 if FilterFlag(args, "--no_presubmit") or FilterFlag(args, "--force"): |
| 749 breakpad.SendStack( | 749 breakpad.SendStack( |
| 750 breakpad.DEFAULT_URL + '/breakpad', |
| 750 'GclHooksBypassedCommit', | 751 'GclHooksBypassedCommit', |
| 751 'Issue %s/%s bypassed hook when committing' % | 752 'Issue %s/%s bypassed hook when committing' % |
| 752 (change_info.rietveld, change_info.issue)) | 753 (change_info.rietveld, change_info.issue), |
| 754 verbose=False) |
| 753 return presubmit_support.PresubmitOutput() | 755 return presubmit_support.PresubmitOutput() |
| 754 return DoPresubmitChecks(change_info, committing, True) | 756 return DoPresubmitChecks(change_info, committing, True) |
| 755 | 757 |
| 756 | 758 |
| 757 def defer_attributes(a, b): | 759 def defer_attributes(a, b): |
| 758 """Copy attributes from an object (like a function) to another.""" | 760 """Copy attributes from an object (like a function) to another.""" |
| 759 for x in dir(a): | 761 for x in dir(a): |
| 760 if not getattr(b, x, None): | 762 if not getattr(b, x, None): |
| 761 setattr(b, x, getattr(a, x)) | 763 setattr(b, x, getattr(a, x)) |
| 762 | 764 |
| (...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1459 raise | 1461 raise |
| 1460 print >> sys.stderr, ( | 1462 print >> sys.stderr, ( |
| 1461 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' | 1463 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' |
| 1462 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)) | 1464 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)) |
| 1463 return 1 | 1465 return 1 |
| 1464 | 1466 |
| 1465 | 1467 |
| 1466 if __name__ == "__main__": | 1468 if __name__ == "__main__": |
| 1467 fix_encoding.fix_encoding() | 1469 fix_encoding.fix_encoding() |
| 1468 sys.exit(main(sys.argv[1:])) | 1470 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |