| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 # Files | 7 # Files |
| 8 # .gclient : Current client configuration, written by 'config' command. | 8 # .gclient : Current client configuration, written by 'config' command. |
| 9 # Format is a Python script defining 'solutions', a list whose | 9 # Format is a Python script defining 'solutions', a list whose |
| 10 # entries each are maps binding the strings "name" and "url" | 10 # entries each are maps binding the strings "name" and "url" |
| (...skipping 1463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1474 """Checks for revision overrides.""" | 1474 """Checks for revision overrides.""" |
| 1475 revision_overrides = {} | 1475 revision_overrides = {} |
| 1476 if not self._options.revisions: | 1476 if not self._options.revisions: |
| 1477 for s in self.dependencies: | 1477 for s in self.dependencies: |
| 1478 if not s.managed and not self._options.head: | 1478 if not s.managed and not self._options.head: |
| 1479 self._options.revisions.append('%s@unmanaged' % s.name) | 1479 self._options.revisions.append('%s@unmanaged' % s.name) |
| 1480 if not self._options.revisions: | 1480 if not self._options.revisions: |
| 1481 return revision_overrides | 1481 return revision_overrides |
| 1482 solutions_names = [s.name for s in self.dependencies] | 1482 solutions_names = [s.name for s in self.dependencies] |
| 1483 for i, revision in enumerate(self._options.revisions): | 1483 for i, revision in enumerate(self._options.revisions): |
| 1484 if not '@' in revision: | 1484 if '@' in revision: |
| 1485 name, rev = revision.split('@', 1) |
| 1486 else: |
| 1485 # Support for --revision 123 | 1487 # Support for --revision 123 |
| 1486 name, rev = solutions_names[i], revision | 1488 name, rev = solutions_names[i], revision |
| 1487 else: | |
| 1488 name, rev = revision.split('@', 1) | |
| 1489 revision_overrides[name] = rev | 1489 revision_overrides[name] = rev |
| 1490 return revision_overrides | 1490 return revision_overrides |
| 1491 | 1491 |
| 1492 def RunOnDeps(self, command, args, ignore_requirements=False, progress=True): | 1492 def RunOnDeps(self, command, args, ignore_requirements=False, progress=True): |
| 1493 """Runs a command on each dependency in a client and its dependencies. | 1493 """Runs a command on each dependency in a client and its dependencies. |
| 1494 | 1494 |
| 1495 Args: | 1495 Args: |
| 1496 command: The command to use (e.g., 'status' or 'diff') | 1496 command: The command to use (e.g., 'status' or 'diff') |
| 1497 args: list of str - extra arguments to add to the command line. | 1497 args: list of str - extra arguments to add to the command line. |
| 1498 """ | 1498 """ |
| (...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2315 | 2315 |
| 2316 | 2316 |
| 2317 if '__main__' == __name__: | 2317 if '__main__' == __name__: |
| 2318 try: | 2318 try: |
| 2319 sys.exit(main(sys.argv[1:])) | 2319 sys.exit(main(sys.argv[1:])) |
| 2320 except KeyboardInterrupt: | 2320 except KeyboardInterrupt: |
| 2321 sys.stderr.write('interrupted\n') | 2321 sys.stderr.write('interrupted\n') |
| 2322 sys.exit(1) | 2322 sys.exit(1) |
| 2323 | 2323 |
| 2324 # vim: ts=2:sw=2:tw=80:et: | 2324 # vim: ts=2:sw=2:tw=80:et: |
| OLD | NEW |