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 """A wrapper script to manage a set of client modules in different SCM. | 6 """A wrapper script to manage a set of client modules in different SCM. |
7 | 7 |
8 This script is intended to be used to help basic management of client | 8 This script is intended to be used to help basic management of client |
9 program sources residing in one or more Subversion modules and Git | 9 program sources residing in one or more Subversion modules and Git |
10 repositories, along with other modules it depends on, also in Subversion or Git, | 10 repositories, along with other modules it depends on, also in Subversion or Git, |
(...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
997 return client.RunOnDeps('diff', args) | 997 return client.RunOnDeps('diff', args) |
998 | 998 |
999 | 999 |
1000 def CMDrevert(parser, args): | 1000 def CMDrevert(parser, args): |
1001 """Revert all modifications in every dependencies.""" | 1001 """Revert all modifications in every dependencies.""" |
1002 parser.add_option("--nohooks", action="store_true", | 1002 parser.add_option("--nohooks", action="store_true", |
1003 help="don't run hooks after the revert is complete") | 1003 help="don't run hooks after the revert is complete") |
1004 (options, args) = parser.parse_args(args) | 1004 (options, args) = parser.parse_args(args) |
1005 # --force is implied. | 1005 # --force is implied. |
1006 options.force = True | 1006 options.force = True |
| 1007 options.deps_os = None |
1007 client = GClient.LoadCurrentConfig(options) | 1008 client = GClient.LoadCurrentConfig(options) |
1008 if not client: | 1009 if not client: |
1009 raise gclient_utils.Error("client not configured; see 'gclient config'") | 1010 raise gclient_utils.Error("client not configured; see 'gclient config'") |
1010 return client.RunOnDeps('revert', args) | 1011 return client.RunOnDeps('revert', args) |
1011 | 1012 |
1012 | 1013 |
1013 def CMDrunhooks(parser, args): | 1014 def CMDrunhooks(parser, args): |
1014 """Runs hooks for files that have been modified in the local working copy.""" | 1015 """Runs hooks for files that have been modified in the local working copy.""" |
1015 parser.add_option("--force", action="store_true", default=True, | 1016 parser.add_option("--force", action="store_true", default=True, |
1016 help="Deprecated. No effect.") | 1017 help="Deprecated. No effect.") |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1108 | 1109 |
1109 | 1110 |
1110 if "__main__" == __name__: | 1111 if "__main__" == __name__: |
1111 try: | 1112 try: |
1112 sys.exit(Main(sys.argv[1:])) | 1113 sys.exit(Main(sys.argv[1:])) |
1113 except gclient_utils.Error, e: | 1114 except gclient_utils.Error, e: |
1114 print >> sys.stderr, "Error: %s" % str(e) | 1115 print >> sys.stderr, "Error: %s" % str(e) |
1115 sys.exit(1) | 1116 sys.exit(1) |
1116 | 1117 |
1117 # vim: ts=2:sw=2:tw=80:et: | 1118 # vim: ts=2:sw=2:tw=80:et: |
OLD | NEW |