| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2010 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 971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 982 'When called from gcl, use the format gcl try <change_name>.\n') | 982 'When called from gcl, use the format gcl try <change_name>.\n') |
| 983 | 983 |
| 984 | 984 |
| 985 @need_change_and_args | 985 @need_change_and_args |
| 986 @attrs(usage='[--no_presubmit]') | 986 @attrs(usage='[--no_presubmit]') |
| 987 def CMDcommit(change_info, args): | 987 def CMDcommit(change_info, args): |
| 988 """Commits the changelist to the repository.""" | 988 """Commits the changelist to the repository.""" |
| 989 if not change_info.GetFiles(): | 989 if not change_info.GetFiles(): |
| 990 print "Nothing to commit, changelist is empty." | 990 print "Nothing to commit, changelist is empty." |
| 991 return 1 | 991 return 1 |
| 992 if not OptionallyDoPresubmitChecks(change_info, True, args): | 992 |
| 993 output = OptionallyDoPresubmitChecks(change_info, True, args) |
| 994 if not output.should_continue(): |
| 993 return 1 | 995 return 1 |
| 994 | 996 |
| 995 # We face a problem with svn here: Let's say change 'bleh' modifies | 997 # We face a problem with svn here: Let's say change 'bleh' modifies |
| 996 # svn:ignore on dir1\. but another unrelated change 'pouet' modifies | 998 # svn:ignore on dir1\. but another unrelated change 'pouet' modifies |
| 997 # dir1\foo.cc. When the user `gcl commit bleh`, foo.cc is *also committed*. | 999 # dir1\foo.cc. When the user `gcl commit bleh`, foo.cc is *also committed*. |
| 998 # The only fix is to use --non-recursive but that has its issues too: | 1000 # The only fix is to use --non-recursive but that has its issues too: |
| 999 # Let's say if dir1 is deleted, --non-recursive must *not* be used otherwise | 1001 # Let's say if dir1 is deleted, --non-recursive must *not* be used otherwise |
| 1000 # you'll get "svn: Cannot non-recursively commit a directory deletion of a | 1002 # you'll get "svn: Cannot non-recursively commit a directory deletion of a |
| 1001 # directory with child nodes". Yay... | 1003 # directory with child nodes". Yay... |
| 1002 commit_cmd = ["svn", "commit"] | 1004 commit_cmd = ["svn", "commit"] |
| (...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1465 if e.code != 500: | 1467 if e.code != 500: |
| 1466 raise | 1468 raise |
| 1467 print >> sys.stderr, ( | 1469 print >> sys.stderr, ( |
| 1468 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' | 1470 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' |
| 1469 '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)) |
| 1470 return 1 | 1472 return 1 |
| 1471 | 1473 |
| 1472 | 1474 |
| 1473 if __name__ == "__main__": | 1475 if __name__ == "__main__": |
| 1474 sys.exit(main(sys.argv[1:])) | 1476 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |