OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2006-2009 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 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
870 trychange_args.extend(args) | 870 trychange_args.extend(args) |
871 file_list = None | 871 file_list = None |
872 return trychange.TryChange(trychange_args, | 872 return trychange.TryChange(trychange_args, |
873 file_list=file_list, | 873 file_list=file_list, |
874 swallow_exception=swallow_exception, | 874 swallow_exception=swallow_exception, |
875 prog='gcl try') | 875 prog='gcl try') |
876 | 876 |
877 | 877 |
878 @need_change_and_args | 878 @need_change_and_args |
879 @attrs(usage='[--no_presubmit]') | 879 @attrs(usage='[--no_presubmit]') |
880 def CMDcommit(change_list, args): | 880 def CMDcommit(change_info, args): |
881 """Commits the changelist to the repository.""" | 881 """Commits the changelist to the repository.""" |
882 if not change_info.GetFiles(): | 882 if not change_info.GetFiles(): |
883 print "Nothing to commit, changelist is empty." | 883 print "Nothing to commit, changelist is empty." |
884 return 1 | 884 return 1 |
885 if not OptionallyDoPresubmitChecks(change_info, True, args): | 885 if not OptionallyDoPresubmitChecks(change_info, True, args): |
886 return 1 | 886 return 1 |
887 | 887 |
888 # We face a problem with svn here: Let's say change 'bleh' modifies | 888 # We face a problem with svn here: Let's say change 'bleh' modifies |
889 # svn:ignore on dir1\. but another unrelated change 'pouet' modifies | 889 # svn:ignore on dir1\. but another unrelated change 'pouet' modifies |
890 # dir1\foo.cc. When the user `gcl commit bleh`, foo.cc is *also committed*. | 890 # dir1\foo.cc. When the user `gcl commit bleh`, foo.cc is *also committed*. |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1308 argv = ['help'] | 1308 argv = ['help'] |
1309 command = Command(argv[0]) | 1309 command = Command(argv[0]) |
1310 if command: | 1310 if command: |
1311 return command(argv[1:]) | 1311 return command(argv[1:]) |
1312 # Unknown command, try to pass that to svn | 1312 # Unknown command, try to pass that to svn |
1313 return CMDpassthru(argv) | 1313 return CMDpassthru(argv) |
1314 | 1314 |
1315 | 1315 |
1316 if __name__ == "__main__": | 1316 if __name__ == "__main__": |
1317 sys.exit(main(sys.argv[1:])) | 1317 sys.exit(main(sys.argv[1:])) |
OLD | NEW |