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 | 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 1458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1469 parser.add_option('-n', '--nohooks', action='store_true', | 1469 parser.add_option('-n', '--nohooks', action='store_true', |
1470 help='don\'t run hooks after the update is complete') | 1470 help='don\'t run hooks after the update is complete') |
1471 parser.add_option('-r', '--revision', action='append', | 1471 parser.add_option('-r', '--revision', action='append', |
1472 dest='revisions', metavar='REV', default=[], | 1472 dest='revisions', metavar='REV', default=[], |
1473 help='Enforces revision/hash for the solutions with the ' | 1473 help='Enforces revision/hash for the solutions with the ' |
1474 'format src@rev. The src@ part is optional and can be ' | 1474 'format src@rev. The src@ part is optional and can be ' |
1475 'skipped. -r can be used multiple times when .gclient ' | 1475 'skipped. -r can be used multiple times when .gclient ' |
1476 'has multiple solutions configured and will work even ' | 1476 'has multiple solutions configured and will work even ' |
1477 'if the src@ part is skipped. Note that specifying ' | 1477 'if the src@ part is skipped. Note that specifying ' |
1478 '--revision means your safesync_url gets ignored.') | 1478 '--revision means your safesync_url gets ignored.') |
| 1479 parser.add_option('--with_branch_heads', action='store_true', |
| 1480 help='Clone git "branch_heads" refspecs in addition to ' |
| 1481 'the default refspecs. This adds about 1/2GB to a ' |
| 1482 'full checkout. (git only)') |
1479 parser.add_option('-t', '--transitive', action='store_true', | 1483 parser.add_option('-t', '--transitive', action='store_true', |
1480 help='When a revision is specified (in the DEPS file or ' | 1484 help='When a revision is specified (in the DEPS file or ' |
1481 'with the command-line flag), transitively update ' | 1485 'with the command-line flag), transitively update ' |
1482 'the dependencies to the date of the given revision. ' | 1486 'the dependencies to the date of the given revision. ' |
1483 'Only supported for SVN repositories.') | 1487 'Only supported for SVN repositories.') |
1484 parser.add_option('-H', '--head', action='store_true', | 1488 parser.add_option('-H', '--head', action='store_true', |
1485 help='skips any safesync_urls specified in ' | 1489 help='skips any safesync_urls specified in ' |
1486 'configured solutions and sync to head instead') | 1490 'configured solutions and sync to head instead') |
1487 parser.add_option('-D', '--delete_unversioned_trees', action='store_true', | 1491 parser.add_option('-D', '--delete_unversioned_trees', action='store_true', |
1488 help='Deletes from the working copy any dependencies that ' | 1492 help='Deletes from the working copy any dependencies that ' |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1754 except (gclient_utils.Error, subprocess2.CalledProcessError), e: | 1758 except (gclient_utils.Error, subprocess2.CalledProcessError), e: |
1755 print >> sys.stderr, 'Error: %s' % str(e) | 1759 print >> sys.stderr, 'Error: %s' % str(e) |
1756 return 1 | 1760 return 1 |
1757 | 1761 |
1758 | 1762 |
1759 if '__main__' == __name__: | 1763 if '__main__' == __name__: |
1760 fix_encoding.fix_encoding() | 1764 fix_encoding.fix_encoding() |
1761 sys.exit(Main(sys.argv[1:])) | 1765 sys.exit(Main(sys.argv[1:])) |
1762 | 1766 |
1763 # vim: ts=2:sw=2:tw=80:et: | 1767 # vim: ts=2:sw=2:tw=80:et: |
OLD | NEW |