| 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 dependency manager for Git.""" | 6 """Meta checkout dependency manager for 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 1544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1555 return True | 1555 return True |
| 1556 | 1556 |
| 1557 @property | 1557 @property |
| 1558 def target_os(self): | 1558 def target_os(self): |
| 1559 return self._enforced_os | 1559 return self._enforced_os |
| 1560 | 1560 |
| 1561 | 1561 |
| 1562 #### gclient commands. | 1562 #### gclient commands. |
| 1563 | 1563 |
| 1564 | 1564 |
| 1565 def CMDcleanup(parser, args): | |
| 1566 """DEPRECATED: SVN-only. Cleaned up all working copies. | |
| 1567 | |
| 1568 This is a no-op in Git. | |
| 1569 """ | |
| 1570 parser.add_option('--deps', dest='deps_os', metavar='OS_LIST', | |
| 1571 help='override deps for the specified (comma-separated) ' | |
| 1572 'platform(s); \'all\' will process all deps_os ' | |
| 1573 'references') | |
| 1574 (options, args) = parser.parse_args(args) | |
| 1575 client = GClient.LoadCurrentConfig(options) | |
| 1576 if not client: | |
| 1577 raise gclient_utils.Error('client not configured; see \'gclient config\'') | |
| 1578 if options.verbose: | |
| 1579 client.PrintLocationAndContents() | |
| 1580 return client.RunOnDeps('cleanup', args) | |
| 1581 | |
| 1582 | |
| 1583 @subcommand.usage('[command] [args ...]') | 1565 @subcommand.usage('[command] [args ...]') |
| 1584 def CMDrecurse(parser, args): | 1566 def CMDrecurse(parser, args): |
| 1585 """Operates [command args ...] on all the dependencies. | 1567 """Operates [command args ...] on all the dependencies. |
| 1586 | 1568 |
| 1587 Runs a shell command on all entries. | 1569 Runs a shell command on all entries. |
| 1588 Sets GCLIENT_DEP_PATH environment variable as the dep's relative location to | 1570 Sets GCLIENT_DEP_PATH environment variable as the dep's relative location to |
| 1589 root directory of the checkout. | 1571 root directory of the checkout. |
| 1590 """ | 1572 """ |
| 1591 # Stop parsing at the first non-arg so that these go through to the command | 1573 # Stop parsing at the first non-arg so that these go through to the command |
| 1592 parser.disable_interspersed_args() | 1574 parser.disable_interspersed_args() |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2142 | 2124 |
| 2143 | 2125 |
| 2144 if '__main__' == __name__: | 2126 if '__main__' == __name__: |
| 2145 try: | 2127 try: |
| 2146 sys.exit(main(sys.argv[1:])) | 2128 sys.exit(main(sys.argv[1:])) |
| 2147 except KeyboardInterrupt: | 2129 except KeyboardInterrupt: |
| 2148 sys.stderr.write('interrupted\n') | 2130 sys.stderr.write('interrupted\n') |
| 2149 sys.exit(1) | 2131 sys.exit(1) |
| 2150 | 2132 |
| 2151 # vim: ts=2:sw=2:tw=80:et: | 2133 # vim: ts=2:sw=2:tw=80:et: |
| OLD | NEW |