| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 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 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 748 return 0 | 748 return 0 |
| 749 | 749 |
| 750 | 750 |
| 751 def GenerateDiff(files): | 751 def GenerateDiff(files): |
| 752 return SVN.GenerateDiff( | 752 return SVN.GenerateDiff( |
| 753 files, GetRepositoryRoot(), full_move=False, revision=None) | 753 files, GetRepositoryRoot(), full_move=False, revision=None) |
| 754 | 754 |
| 755 | 755 |
| 756 def OptionallyDoPresubmitChecks(change_info, committing, args): | 756 def OptionallyDoPresubmitChecks(change_info, committing, args): |
| 757 if FilterFlag(args, "--no_presubmit") or FilterFlag(args, "--force"): | 757 if FilterFlag(args, "--no_presubmit") or FilterFlag(args, "--force"): |
| 758 breakpad.SendStack( |
| 759 'GclHooksBypassedCommit', |
| 760 'Issue %s/%s bypassed hook when committing' % |
| 761 (change_info.rietveld, change_info.issue)) |
| 758 return presubmit_support.PresubmitOutput() | 762 return presubmit_support.PresubmitOutput() |
| 759 return DoPresubmitChecks(change_info, committing, True) | 763 return DoPresubmitChecks(change_info, committing, True) |
| 760 | 764 |
| 761 | 765 |
| 762 def defer_attributes(a, b): | 766 def defer_attributes(a, b): |
| 763 """Copy attributes from an object (like a function) to another.""" | 767 """Copy attributes from an object (like a function) to another.""" |
| 764 for x in dir(a): | 768 for x in dir(a): |
| 765 if not getattr(b, x, None): | 769 if not getattr(b, x, None): |
| 766 setattr(b, x, getattr(a, x)) | 770 setattr(b, x, getattr(a, x)) |
| 767 | 771 |
| (...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1464 raise | 1468 raise |
| 1465 print >> sys.stderr, ( | 1469 print >> sys.stderr, ( |
| 1466 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' | 1470 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' |
| 1467 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)) | 1471 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)) |
| 1468 return 1 | 1472 return 1 |
| 1469 | 1473 |
| 1470 | 1474 |
| 1471 if __name__ == "__main__": | 1475 if __name__ == "__main__": |
| 1472 fix_encoding.fix_encoding() | 1476 fix_encoding.fix_encoding() |
| 1473 sys.exit(main(sys.argv[1:])) | 1477 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |