summaryrefslogtreecommitdiffstats
path: root/repo
diff options
context:
space:
mode:
Diffstat (limited to 'repo')
-rwxr-xr-xrepo29
1 files changed, 21 insertions, 8 deletions
diff --git a/repo b/repo
index d9c97de1..4cddbf1e 100755
--- a/repo
+++ b/repo
@@ -117,7 +117,7 @@ def check_python_version():
117 117
118 # If the python3 version looks like it's new enough, give it a try. 118 # If the python3 version looks like it's new enough, give it a try.
119 if (python3_ver and python3_ver >= MIN_PYTHON_VERSION_HARD 119 if (python3_ver and python3_ver >= MIN_PYTHON_VERSION_HARD
120 and python3_ver != (major, minor)): 120 and python3_ver != (major, minor)):
121 reexec('python3') 121 reexec('python3')
122 122
123 # We're still here, so diagnose things for the user. 123 # We're still here, so diagnose things for the user.
@@ -145,9 +145,11 @@ if not REPO_URL:
145REPO_REV = os.environ.get('REPO_REV') 145REPO_REV = os.environ.get('REPO_REV')
146if not REPO_REV: 146if not REPO_REV:
147 REPO_REV = 'stable' 147 REPO_REV = 'stable'
148# URL to file bug reports for repo tool issues.
149BUG_URL = 'https://bugs.chromium.org/p/gerrit/issues/entry?template=Repo+tool+issue'
148 150
149# increment this whenever we make important changes to this script 151# increment this whenever we make important changes to this script
150VERSION = (2, 14) 152VERSION = (2, 17)
151 153
152# increment this if the MAINTAINER_KEYS block is modified 154# increment this if the MAINTAINER_KEYS block is modified
153KEYRING_VERSION = (2, 3) 155KEYRING_VERSION = (2, 3)
@@ -310,6 +312,10 @@ def InitParser(parser, gitc_init=False):
310 metavar='PLATFORM') 312 metavar='PLATFORM')
311 group.add_option('--submodules', action='store_true', 313 group.add_option('--submodules', action='store_true',
312 help='sync any submodules associated with the manifest repo') 314 help='sync any submodules associated with the manifest repo')
315 group.add_option('--standalone-manifest', action='store_true',
316 help='download the manifest as a static file '
317 'rather then create a git checkout of '
318 'the manifest repo')
313 319
314 # Options that only affect manifest project, and not any of the projects 320 # Options that only affect manifest project, and not any of the projects
315 # specified in the manifest itself. 321 # specified in the manifest itself.
@@ -322,8 +328,14 @@ def InitParser(parser, gitc_init=False):
322 group.add_option(*cbr_opts, 328 group.add_option(*cbr_opts,
323 dest='current_branch_only', action='store_true', 329 dest='current_branch_only', action='store_true',
324 help='fetch only current manifest branch from server') 330 help='fetch only current manifest branch from server')
331 group.add_option('--no-current-branch',
332 dest='current_branch_only', action='store_false',
333 help='fetch all manifest branches from server')
334 group.add_option('--tags',
335 action='store_true',
336 help='fetch tags in the manifest')
325 group.add_option('--no-tags', 337 group.add_option('--no-tags',
326 dest='tags', default=True, action='store_false', 338 dest='tags', action='store_false',
327 help="don't fetch tags in the manifest") 339 help="don't fetch tags in the manifest")
328 340
329 # These are fundamentally different ways of structuring the checkout. 341 # These are fundamentally different ways of structuring the checkout.
@@ -851,11 +863,10 @@ def _DownloadBundle(url, cwd, quiet, verbose):
851 try: 863 try:
852 r = urllib.request.urlopen(url) 864 r = urllib.request.urlopen(url)
853 except urllib.error.HTTPError as e: 865 except urllib.error.HTTPError as e:
854 if e.code in [401, 403, 404, 501]: 866 if e.code not in [400, 401, 403, 404, 501]:
855 return False 867 print('warning: Cannot get %s' % url, file=sys.stderr)
856 print('fatal: Cannot get %s' % url, file=sys.stderr) 868 print('warning: HTTP error %s' % e.code, file=sys.stderr)
857 print('fatal: HTTP error %s' % e.code, file=sys.stderr) 869 return False
858 raise CloneFailure()
859 except urllib.error.URLError as e: 870 except urllib.error.URLError as e:
860 print('fatal: Cannot get %s' % url, file=sys.stderr) 871 print('fatal: Cannot get %s' % url, file=sys.stderr)
861 print('fatal: error %s' % e.reason, file=sys.stderr) 872 print('fatal: error %s' % e.reason, file=sys.stderr)
@@ -1171,6 +1182,7 @@ The most commonly used repo commands are:
1171 1182
1172For access to the full online help, install repo ("repo init"). 1183For access to the full online help, install repo ("repo init").
1173""") 1184""")
1185 print('Bug reports:', BUG_URL)
1174 sys.exit(0) 1186 sys.exit(0)
1175 1187
1176 1188
@@ -1204,6 +1216,7 @@ def _Version():
1204 print('OS %s %s (%s)' % (uname.system, uname.release, uname.version)) 1216 print('OS %s %s (%s)' % (uname.system, uname.release, uname.version))
1205 print('CPU %s (%s)' % 1217 print('CPU %s (%s)' %
1206 (uname.machine, uname.processor if uname.processor else 'unknown')) 1218 (uname.machine, uname.processor if uname.processor else 'unknown'))
1219 print('Bug reports:', BUG_URL)
1207 sys.exit(0) 1220 sys.exit(0)
1208 1221
1209 1222