|
|
|
@ -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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|