mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
Revert "Default repo manifest settings in git config"
This reverts commit ee1c2f5717
.
This breaks a lot of buildbot systems. Rolling it back for now
until we can understand what the breakage was and how to fix it.
This commit is contained in:
parent
ecff4f17b0
commit
34fb20f67c
@ -228,11 +228,7 @@ class XmlManifest(object):
|
|||||||
@property
|
@property
|
||||||
def manifest_server(self):
|
def manifest_server(self):
|
||||||
self._Load()
|
self._Load()
|
||||||
|
return self._manifest_server
|
||||||
if self._manifest_server:
|
|
||||||
return self._manifest_server
|
|
||||||
|
|
||||||
return self.manifestProject.config.GetString('repo.manifest-server')
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def IsMirror(self):
|
def IsMirror(self):
|
||||||
|
4
repo
4
repo
@ -28,7 +28,7 @@ if __name__ == '__main__':
|
|||||||
del magic
|
del magic
|
||||||
|
|
||||||
# increment this whenever we make important changes to this script
|
# increment this whenever we make important changes to this script
|
||||||
VERSION = (1, 14)
|
VERSION = (1, 13)
|
||||||
|
|
||||||
# increment this if the MAINTAINER_KEYS block is modified
|
# increment this if the MAINTAINER_KEYS block is modified
|
||||||
KEYRING_VERSION = (1,0)
|
KEYRING_VERSION = (1,0)
|
||||||
@ -154,7 +154,7 @@ def _Init(args):
|
|||||||
"""Installs repo by cloning it over the network.
|
"""Installs repo by cloning it over the network.
|
||||||
"""
|
"""
|
||||||
opt, args = init_optparse.parse_args(args)
|
opt, args = init_optparse.parse_args(args)
|
||||||
if args:
|
if args or not opt.manifest_url:
|
||||||
init_optparse.print_usage()
|
init_optparse.print_usage()
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
@ -23,7 +23,6 @@ from error import ManifestParseError
|
|||||||
from project import SyncBuffer
|
from project import SyncBuffer
|
||||||
from git_config import GitConfig
|
from git_config import GitConfig
|
||||||
from git_command import git_require, MIN_GIT_VERSION
|
from git_command import git_require, MIN_GIT_VERSION
|
||||||
from git_config import GitConfig
|
|
||||||
|
|
||||||
class Init(InteractiveCommand, MirrorSafeCommand):
|
class Init(InteractiveCommand, MirrorSafeCommand):
|
||||||
common = True
|
common = True
|
||||||
@ -37,20 +36,6 @@ The latest repo source code and manifest collection is downloaded
|
|||||||
from the server and is installed in the .repo/ directory in the
|
from the server and is installed in the .repo/ directory in the
|
||||||
current working directory.
|
current working directory.
|
||||||
|
|
||||||
The optional -u argument can be used to specify a URL to the
|
|
||||||
manifest project. It is also possible to have a git configuration
|
|
||||||
section as below to use 'identifier' as argument to -u:
|
|
||||||
|
|
||||||
[repo-manifest "identifier"]
|
|
||||||
url = ...
|
|
||||||
server = ...
|
|
||||||
reference = ...
|
|
||||||
|
|
||||||
Only the url is required - the others are optional.
|
|
||||||
|
|
||||||
If no -u argument is specified, the 'repo-manifest' section named
|
|
||||||
'default' will be used if present.
|
|
||||||
|
|
||||||
The optional -b argument can be used to select the manifest branch
|
The optional -b argument can be used to select the manifest branch
|
||||||
to checkout and use. If no branch is specified, master is assumed.
|
to checkout and use. If no branch is specified, master is assumed.
|
||||||
|
|
||||||
@ -84,7 +69,7 @@ to update the working directory files.
|
|||||||
# Manifest
|
# Manifest
|
||||||
g = p.add_option_group('Manifest options')
|
g = p.add_option_group('Manifest options')
|
||||||
g.add_option('-u', '--manifest-url',
|
g.add_option('-u', '--manifest-url',
|
||||||
dest='manifest_url', default='default',
|
dest='manifest_url',
|
||||||
help='manifest repository location', metavar='URL')
|
help='manifest repository location', metavar='URL')
|
||||||
g.add_option('-b', '--manifest-branch',
|
g.add_option('-b', '--manifest-branch',
|
||||||
dest='manifest_branch',
|
dest='manifest_branch',
|
||||||
@ -123,25 +108,10 @@ to update the working directory files.
|
|||||||
def _SyncManifest(self, opt):
|
def _SyncManifest(self, opt):
|
||||||
m = self.manifest.manifestProject
|
m = self.manifest.manifestProject
|
||||||
is_new = not m.Exists
|
is_new = not m.Exists
|
||||||
manifest_server = None
|
|
||||||
|
|
||||||
# The manifest url may point out a manifest section in the config
|
|
||||||
key = 'repo-manifest.%s.' % opt.manifest_url
|
|
||||||
if GitConfig.ForUser().GetString(key + 'url'):
|
|
||||||
opt.manifest_url = GitConfig.ForUser().GetString(key + 'url')
|
|
||||||
|
|
||||||
# Also copy other options to the manifest config if not specified already.
|
|
||||||
if not opt.reference:
|
|
||||||
opt.reference = GitConfig.ForUser().GetString(key + 'reference')
|
|
||||||
manifest_server = GitConfig.ForUser().GetString(key + 'server')
|
|
||||||
|
|
||||||
if is_new:
|
if is_new:
|
||||||
if not opt.manifest_url or opt.manifest_url == 'default':
|
if not opt.manifest_url:
|
||||||
print >>sys.stderr, """\
|
print >>sys.stderr, 'fatal: manifest url (-u) is required.'
|
||||||
fatal: missing manifest url (-u) and no default found.
|
|
||||||
|
|
||||||
tip: The global git configuration key 'repo-manifest.default.url' can
|
|
||||||
be used to specify a default url."""
|
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
if not opt.quiet:
|
if not opt.quiet:
|
||||||
@ -165,9 +135,6 @@ fatal: missing manifest url (-u) and no default found.
|
|||||||
r.ResetFetch()
|
r.ResetFetch()
|
||||||
r.Save()
|
r.Save()
|
||||||
|
|
||||||
if manifest_server:
|
|
||||||
m.config.SetString('repo.manifest-server', manifest_server)
|
|
||||||
|
|
||||||
if opt.reference:
|
if opt.reference:
|
||||||
m.config.SetString('repo.reference', opt.reference)
|
m.config.SetString('repo.reference', opt.reference)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user