mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
repo: allow REPO_REV to be an env var
We do this for REPO_URL already.
Bug: https://crbug.com/gerrit/10233
Change-Id: I53410645474b00d900467c96fa5d8446f3a607d3
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/253552
Reviewed-by: David Pursehouse <dpursehouse@collab.net>
Tested-by: Mike Frysinger <vapier@google.com>
(cherry picked from commit 563f1a6512
)
This commit is contained in:
parent
68744dbc01
commit
19607b2817
8
repo
8
repo
@ -16,7 +16,9 @@ import os
|
||||
REPO_URL = os.environ.get('REPO_URL', None)
|
||||
if not REPO_URL:
|
||||
REPO_URL = 'https://gerrit.googlesource.com/git-repo'
|
||||
REPO_REV = 'repo-1'
|
||||
REPO_REV = os.environ.get('REPO_REV')
|
||||
if not REPO_REV:
|
||||
REPO_REV = 'repo-1'
|
||||
|
||||
# Copyright (C) 2008 Google Inc.
|
||||
#
|
||||
@ -235,10 +237,10 @@ group.add_option('--no-tags',
|
||||
group = init_optparse.add_option_group('repo Version options')
|
||||
group.add_option('--repo-url',
|
||||
dest='repo_url',
|
||||
help='repo repository location', metavar='URL')
|
||||
help='repo repository location ($REPO_URL)', metavar='URL')
|
||||
group.add_option('--repo-branch',
|
||||
dest='repo_branch',
|
||||
help='repo branch or revision', metavar='REVISION')
|
||||
help='repo branch or revision ($REPO_REV)', metavar='REVISION')
|
||||
group.add_option('--no-repo-verify',
|
||||
dest='no_repo_verify', action='store_true',
|
||||
help='do not verify repo source code')
|
||||
|
Loading…
Reference in New Issue
Block a user