| 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 1025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1036 return client.RunOnDeps('runhooks', args) | 1036 return client.RunOnDeps('runhooks', args) |
| 1037 | 1037 |
| 1038 | 1038 |
| 1039 def CMDrevinfo(parser, args): | 1039 def CMDrevinfo(parser, args): |
| 1040 """Outputs details for every dependencies.""" | 1040 """Outputs details for every dependencies.""" |
| 1041 parser.add_option("--snapshot", action="store_true", | 1041 parser.add_option("--snapshot", action="store_true", |
| 1042 help="create a snapshot file of the current " | 1042 help="create a snapshot file of the current " |
| 1043 "version of all repositories") | 1043 "version of all repositories") |
| 1044 (options, args) = parser.parse_args(args) | 1044 (options, args) = parser.parse_args(args) |
| 1045 client = GClient.LoadCurrentConfig(options) | 1045 client = GClient.LoadCurrentConfig(options) |
| 1046 options.deps_os = None |
| 1046 if not client: | 1047 if not client: |
| 1047 raise gclient_utils.Error("client not configured; see 'gclient config'") | 1048 raise gclient_utils.Error("client not configured; see 'gclient config'") |
| 1048 client.PrintRevInfo() | 1049 client.PrintRevInfo() |
| 1049 return 0 | 1050 return 0 |
| 1050 | 1051 |
| 1051 | 1052 |
| 1052 def Command(name): | 1053 def Command(name): |
| 1053 return getattr(sys.modules[__name__], 'CMD' + name, None) | 1054 return getattr(sys.modules[__name__], 'CMD' + name, None) |
| 1054 | 1055 |
| 1055 | 1056 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1116 | 1117 |
| 1117 | 1118 |
| 1118 if "__main__" == __name__: | 1119 if "__main__" == __name__: |
| 1119 try: | 1120 try: |
| 1120 sys.exit(Main(sys.argv[1:])) | 1121 sys.exit(Main(sys.argv[1:])) |
| 1121 except gclient_utils.Error, e: | 1122 except gclient_utils.Error, e: |
| 1122 print >> sys.stderr, "Error: %s" % str(e) | 1123 print >> sys.stderr, "Error: %s" % str(e) |
| 1123 sys.exit(1) | 1124 sys.exit(1) |
| 1124 | 1125 |
| 1125 # vim: ts=2:sw=2:tw=80:et: | 1126 # vim: ts=2:sw=2:tw=80:et: |
| OLD | NEW |