mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
repo: Add check of REPO_URL env variable
We want to be able to run repo on a system that is not connected to the Internet and cannot access https://gerrit.googlesource.com. We can put a clone of that repos there, but would prefer to use the stable version of the repo script instead of a locally modified version. This commit adds a check for the REPO_URL environment variable. If that is set and not empty its value will be set in the REPO_URL global in repo. Otherwise the standard path will be used. Change-Id: I0616f5f81ef75f3463b73623b892cb5eed6bb7ba
This commit is contained in:
parent
5ed805a98e
commit
5553628601
6
repo
6
repo
@ -2,7 +2,10 @@
|
|||||||
|
|
||||||
## repo default configuration
|
## repo default configuration
|
||||||
##
|
##
|
||||||
REPO_URL = 'https://gerrit.googlesource.com/git-repo'
|
import os
|
||||||
|
REPO_URL = os.environ.get('REPO_URL', None)
|
||||||
|
if not REPO_URL:
|
||||||
|
REPO_URL = 'https://gerrit.googlesource.com/git-repo'
|
||||||
REPO_REV = 'stable'
|
REPO_REV = 'stable'
|
||||||
|
|
||||||
# Copyright (C) 2008 Google Inc.
|
# Copyright (C) 2008 Google Inc.
|
||||||
@ -114,7 +117,6 @@ GITC_FS_ROOT_DIR = '/gitc/manifest-rw/'
|
|||||||
|
|
||||||
import errno
|
import errno
|
||||||
import optparse
|
import optparse
|
||||||
import os
|
|
||||||
import re
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
import stat
|
import stat
|
||||||
|
Loading…
Reference in New Issue
Block a user