From 4bedb9d8c81887f4fd36afa83a04d00daab83c90 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 11 May 2021 15:37:51 +0000 Subject: [PATCH] repo: update to latest version Change-Id: I81a29cf241f1633ed3fac830c0982a2dab7cc7fb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2887605 Reviewed-by: Stephane Belmon Commit-Queue: Mike Frysinger --- repo_launcher | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/repo_launcher b/repo_launcher index 20b1d6f1bc..2a0661cef4 100755 --- a/repo_launcher +++ b/repo_launcher @@ -117,7 +117,7 @@ def check_python_version(): # If the python3 version looks like it's new enough, give it a try. if (python3_ver and python3_ver >= MIN_PYTHON_VERSION_HARD - and python3_ver != (major, minor)): + and python3_ver != (major, minor)): reexec('python3') # We're still here, so diagnose things for the user. @@ -145,9 +145,11 @@ if not REPO_URL: REPO_REV = os.environ.get('REPO_REV') if not REPO_REV: REPO_REV = 'stable' +# URL to file bug reports for repo tool issues. +BUG_URL = 'https://bugs.chromium.org/p/gerrit/issues/entry?template=Repo+tool+issue' # increment this whenever we make important changes to this script -VERSION = (2, 14) +VERSION = (2, 15) # increment this if the MAINTAINER_KEYS block is modified KEYRING_VERSION = (2, 3) @@ -298,7 +300,7 @@ def InitParser(parser, gitc_init=False): help='manifest repository location', metavar='URL') group.add_option('-b', '--manifest-branch', metavar='REVISION', help='manifest branch or revision (use HEAD for default)') - group.add_option('-m', '--manifest-name', + group.add_option('-m', '--manifest-name', default='default.xml', help='initial manifest file', metavar='NAME.xml') group.add_option('-g', '--groups', default='default', help='restrict manifest projects to ones with specified ' @@ -322,8 +324,14 @@ def InitParser(parser, gitc_init=False): group.add_option(*cbr_opts, dest='current_branch_only', action='store_true', help='fetch only current manifest branch from server') + group.add_option('--no-current-branch', + dest='current_branch_only', action='store_false', + help='fetch all manifest branches from server') + group.add_option('--tags', + action='store_true', + help='fetch tags in the manifest') group.add_option('--no-tags', - dest='tags', default=True, action='store_false', + dest='tags', action='store_false', help="don't fetch tags in the manifest") # These are fundamentally different ways of structuring the checkout. @@ -851,11 +859,10 @@ def _DownloadBundle(url, cwd, quiet, verbose): try: r = urllib.request.urlopen(url) except urllib.error.HTTPError as e: - if e.code in [401, 403, 404, 501]: - return False - print('fatal: Cannot get %s' % url, file=sys.stderr) - print('fatal: HTTP error %s' % e.code, file=sys.stderr) - raise CloneFailure() + if e.code not in [400, 401, 403, 404, 501]: + print('warning: Cannot get %s' % url, file=sys.stderr) + print('warning: HTTP error %s' % e.code, file=sys.stderr) + return False except urllib.error.URLError as e: print('fatal: Cannot get %s' % url, file=sys.stderr) print('fatal: error %s' % e.reason, file=sys.stderr) @@ -1171,6 +1178,7 @@ The most commonly used repo commands are: For access to the full online help, install repo ("repo init"). """) + print('Bug reports:', BUG_URL) sys.exit(0) @@ -1204,6 +1212,7 @@ def _Version(): print('OS %s %s (%s)' % (uname.system, uname.release, uname.version)) print('CPU %s (%s)' % (uname.machine, uname.processor if uname.processor else 'unknown')) + print('Bug reports:', BUG_URL) sys.exit(0)