Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Side by Side Diff: repo

Issue 7111045: Add --depth option to repo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: '' Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/sh 1 #!/bin/sh
2 2
3 ## repo default configuration 3 ## repo default configuration
4 ## 4 ##
5 REPO_URL='git://android.git.kernel.org/tools/repo.git' 5 REPO_URL='git://android.git.kernel.org/tools/repo.git'
6 REPO_REV='stable' 6 REPO_REV='stable'
7 7
8 # Copyright (C) 2008 Google Inc. 8 # Copyright (C) 2008 Google Inc.
9 # 9 #
10 # Licensed under the Apache License, Version 2.0 (the "License"); 10 # Licensed under the Apache License, Version 2.0 (the "License");
(...skipping 10 matching lines...) Expand all
21 21
22 magic='--calling-python-from-/bin/sh--' 22 magic='--calling-python-from-/bin/sh--'
23 """exec" python -E "$0" "$@" """#$magic" 23 """exec" python -E "$0" "$@" """#$magic"
24 if __name__ == '__main__': 24 if __name__ == '__main__':
25 import sys 25 import sys
26 if sys.argv[-1] == '#%s' % magic: 26 if sys.argv[-1] == '#%s' % magic:
27 del sys.argv[-1] 27 del sys.argv[-1]
28 del magic 28 del magic
29 29
30 # increment this whenever we make important changes to this script 30 # increment this whenever we make important changes to this script
31 VERSION = (1, 10) 31 VERSION = (1, 11)
32 32
33 # increment this if the MAINTAINER_KEYS block is modified 33 # increment this if the MAINTAINER_KEYS block is modified
34 KEYRING_VERSION = (1,0) 34 KEYRING_VERSION = (1,0)
35 MAINTAINER_KEYS = """ 35 MAINTAINER_KEYS = """
36 36
37 Repo Maintainer <repo@android.kernel.org> 37 Repo Maintainer <repo@android.kernel.org>
38 -----BEGIN PGP PUBLIC KEY BLOCK----- 38 -----BEGIN PGP PUBLIC KEY BLOCK-----
39 Version: GnuPG v1.4.2.2 (GNU/Linux) 39 Version: GnuPG v1.4.2.2 (GNU/Linux)
40 40
41 mQGiBEj3ugERBACrLJh/ZPyVSKeClMuznFIrsQ+hpNnmJGw1a9GXKYKk8qHPhAZf 41 mQGiBEj3ugERBACrLJh/ZPyVSKeClMuznFIrsQ+hpNnmJGw1a9GXKYKk8qHPhAZf
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 group = init_optparse.add_option_group('Logging options') 102 group = init_optparse.add_option_group('Logging options')
103 group.add_option('-q', '--quiet', 103 group.add_option('-q', '--quiet',
104 dest="quiet", action="store_true", default=False, 104 dest="quiet", action="store_true", default=False,
105 help="be quiet") 105 help="be quiet")
106 106
107 # Manifest 107 # Manifest
108 group = init_optparse.add_option_group('Manifest options') 108 group = init_optparse.add_option_group('Manifest options')
109 group.add_option('-u', '--manifest-url', 109 group.add_option('-u', '--manifest-url',
110 dest='manifest_url', 110 dest='manifest_url',
111 help='manifest repository location', metavar='URL') 111 help='manifest repository location', metavar='URL')
112 group.add_option('-o', '--origin',
113 dest='manifest_origin',
114 help="use REMOTE instead of 'origin' to track upstream",
115 metavar='REMOTE')
116 group.add_option('-b', '--manifest-branch', 112 group.add_option('-b', '--manifest-branch',
117 dest='manifest_branch', 113 dest='manifest_branch',
118 help='manifest branch or revision', metavar='REVISION') 114 help='manifest branch or revision', metavar='REVISION')
119 group.add_option('-m', '--manifest-name', 115 group.add_option('-m', '--manifest-name',
120 dest='manifest_name', 116 dest='manifest_name',
121 help='initial manifest file (deprecated)', 117 help='initial manifest file', metavar='NAME.xml')
122 metavar='NAME.xml')
123 group.add_option('--mirror', 118 group.add_option('--mirror',
124 dest='mirror', action='store_true', 119 dest='mirror', action='store_true',
125 help='mirror the forrest') 120 help='mirror the forrest')
126 group.add_option('--reference', 121 group.add_option('--reference',
127 dest='reference', 122 dest='reference',
128 help='location of mirror directory', metavar='DIR') 123 help='location of mirror directory', metavar='DIR')
124 group.add_option('--depth', type='int', default=None,
125 dest='depth',
126 help='create a shallow clone with given depth; see git clone')
127
129 128
130 # Tool 129 # Tool
131 group = init_optparse.add_option_group('repo Version options') 130 group = init_optparse.add_option_group('repo Version options')
132 group.add_option('--repo-url', 131 group.add_option('--repo-url',
133 dest='repo_url', 132 dest='repo_url',
134 help='repo repository location', metavar='URL') 133 help='repo repository location', metavar='URL')
135 group.add_option('--repo-branch', 134 group.add_option('--repo-branch',
136 dest='repo_branch', 135 dest='repo_branch',
137 help='repo branch or revision', metavar='REVISION') 136 help='repo branch or revision', metavar='REVISION')
138 group.add_option('--no-repo-verify', 137 group.add_option('--no-repo-verify',
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 try: 593 try:
595 os.execv(main, me) 594 os.execv(main, me)
596 except OSError, e: 595 except OSError, e:
597 print >>sys.stderr, "fatal: unable to start %s" % main 596 print >>sys.stderr, "fatal: unable to start %s" % main
598 print >>sys.stderr, "fatal: %s" % e 597 print >>sys.stderr, "fatal: %s" % e
599 sys.exit(148) 598 sys.exit(148)
600 599
601 600
602 if __name__ == '__main__': 601 if __name__ == '__main__':
603 main(sys.argv[1:]) 602 main(sys.argv[1:])
604
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698