| 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 """Meta checkout manager supporting both Subversion and GIT. | 6 """Meta checkout manager supporting both Subversion and GIT. |
| 7 | 7 |
| 8 Files | 8 Files |
| 9 .gclient : Current client configuration, written by 'config' command. | 9 .gclient : Current client configuration, written by 'config' command. |
| 10 Format is a Python script defining 'solutions', a list whose | 10 Format is a Python script defining 'solutions', a list whose |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 # normpath is required to allow DEPS to use .. in their | 289 # normpath is required to allow DEPS to use .. in their |
| 290 # dependency local path. | 290 # dependency local path. |
| 291 rel_deps[os.path.normpath(os.path.join(self.name, d))] = url | 291 rel_deps[os.path.normpath(os.path.join(self.name, d))] = url |
| 292 deps = rel_deps | 292 deps = rel_deps |
| 293 | 293 |
| 294 # Convert the deps into real Dependency. | 294 # Convert the deps into real Dependency. |
| 295 for name, url in deps.iteritems(): | 295 for name, url in deps.iteritems(): |
| 296 if name in [s.name for s in self.dependencies]: | 296 if name in [s.name for s in self.dependencies]: |
| 297 raise | 297 raise |
| 298 self.dependencies.append(Dependency(self, name, url)) | 298 self.dependencies.append(Dependency(self, name, url)) |
| 299 # Note: do not sort by name, the dependencies must be specified in the | 299 # Sort by name. |
| 300 # logical order. | 300 self.dependencies.sort(key=lambda x: x.name) |
| 301 logging.info('Loaded: %s' % str(self)) | 301 logging.info('Loaded: %s' % str(self)) |
| 302 | 302 |
| 303 def RunCommandRecursively(self, options, revision_overrides, | 303 def RunCommandRecursively(self, options, revision_overrides, |
| 304 command, args, pm): | 304 command, args, pm): |
| 305 """Runs 'command' before parsing the DEPS in case it's a initial checkout | 305 """Runs 'command' before parsing the DEPS in case it's a initial checkout |
| 306 or a revert.""" | 306 or a revert.""" |
| 307 assert self.file_list == [] | 307 assert self.file_list == [] |
| 308 # When running runhooks, there's no need to consult the SCM. | 308 # When running runhooks, there's no need to consult the SCM. |
| 309 # All known hooks are expected to run unconditionally regardless of working | 309 # All known hooks are expected to run unconditionally regardless of working |
| 310 # copy state, so skip the SCM status check. | 310 # copy state, so skip the SCM status check. |
| (...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1151 return CMDhelp(parser, argv) | 1151 return CMDhelp(parser, argv) |
| 1152 except gclient_utils.Error, e: | 1152 except gclient_utils.Error, e: |
| 1153 print >> sys.stderr, 'Error: %s' % str(e) | 1153 print >> sys.stderr, 'Error: %s' % str(e) |
| 1154 return 1 | 1154 return 1 |
| 1155 | 1155 |
| 1156 | 1156 |
| 1157 if '__main__' == __name__: | 1157 if '__main__' == __name__: |
| 1158 sys.exit(Main(sys.argv[1:])) | 1158 sys.exit(Main(sys.argv[1:])) |
| 1159 | 1159 |
| 1160 # vim: ts=2:sw=2:tw=80:et: | 1160 # vim: ts=2:sw=2:tw=80:et: |
| OLD | NEW |