diff options
| author | Shawn O. Pearce <sop@google.com> | 2011-11-30 13:41:02 -0800 |
|---|---|---|
| committer | Shawn O. Pearce <sop@google.com> | 2011-11-30 13:41:02 -0800 |
| commit | 34fb20f67c7bdca2b1321a40f2fd558f9a34d866 (patch) | |
| tree | b3f9f06b115d2d52aa01c6deda8a3f3c3af345c2 | |
| parent | ecff4f17b08f791466b73d935c772de57f2257e6 (diff) | |
| download | git-repo-34fb20f67c7bdca2b1321a40f2fd558f9a34d866.tar.gz | |
Revert "Default repo manifest settings in git config"v1.7.8.1
This reverts commit ee1c2f5717fcc137ab887a4aae8a08d50a539b9a.
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.
| -rw-r--r-- | manifest_xml.py | 6 | ||||
| -rwxr-xr-x | repo | 4 | ||||
| -rw-r--r-- | subcmds/init.py | 39 |
3 files changed, 6 insertions, 43 deletions
diff --git a/manifest_xml.py b/manifest_xml.py index c9e5c405..9189eec4 100644 --- a/manifest_xml.py +++ b/manifest_xml.py | |||
| @@ -228,11 +228,7 @@ class XmlManifest(object): | |||
| 228 | @property | 228 | @property |
| 229 | def manifest_server(self): | 229 | def manifest_server(self): |
| 230 | self._Load() | 230 | self._Load() |
| 231 | 231 | return self._manifest_server | |
| 232 | if self._manifest_server: | ||
| 233 | return self._manifest_server | ||
| 234 | |||
| 235 | return self.manifestProject.config.GetString('repo.manifest-server') | ||
| 236 | 232 | ||
| 237 | @property | 233 | @property |
| 238 | def IsMirror(self): | 234 | def IsMirror(self): |
| @@ -28,7 +28,7 @@ if __name__ == '__main__': | |||
| 28 | del magic | 28 | del magic |
| 29 | 29 | ||
| 30 | # increment this whenever we make important changes to this script | 30 | # increment this whenever we make important changes to this script |
| 31 | VERSION = (1, 14) | 31 | VERSION = (1, 13) |
| 32 | 32 | ||
| 33 | # increment this if the MAINTAINER_KEYS block is modified | 33 | # increment this if the MAINTAINER_KEYS block is modified |
| 34 | KEYRING_VERSION = (1,0) | 34 | KEYRING_VERSION = (1,0) |
| @@ -154,7 +154,7 @@ def _Init(args): | |||
| 154 | """Installs repo by cloning it over the network. | 154 | """Installs repo by cloning it over the network. |
| 155 | """ | 155 | """ |
| 156 | opt, args = init_optparse.parse_args(args) | 156 | opt, args = init_optparse.parse_args(args) |
| 157 | if args: | 157 | if args or not opt.manifest_url: |
| 158 | init_optparse.print_usage() | 158 | init_optparse.print_usage() |
| 159 | sys.exit(1) | 159 | sys.exit(1) |
| 160 | 160 | ||
diff --git a/subcmds/init.py b/subcmds/init.py index a653c80d..1cba3665 100644 --- a/subcmds/init.py +++ b/subcmds/init.py | |||
| @@ -23,7 +23,6 @@ from error import ManifestParseError | |||
| 23 | from project import SyncBuffer | 23 | from project import SyncBuffer |
| 24 | from git_config import GitConfig | 24 | from git_config import GitConfig |
| 25 | from git_command import git_require, MIN_GIT_VERSION | 25 | from git_command import git_require, MIN_GIT_VERSION |
| 26 | from git_config import GitConfig | ||
| 27 | 26 | ||
| 28 | class Init(InteractiveCommand, MirrorSafeCommand): | 27 | class Init(InteractiveCommand, MirrorSafeCommand): |
| 29 | common = True | 28 | common = True |
| @@ -37,20 +36,6 @@ The latest repo source code and manifest collection is downloaded | |||
| 37 | from the server and is installed in the .repo/ directory in the | 36 | from the server and is installed in the .repo/ directory in the |
| 38 | current working directory. | 37 | current working directory. |
| 39 | 38 | ||
| 40 | The optional -u argument can be used to specify a URL to the | ||
| 41 | manifest project. It is also possible to have a git configuration | ||
| 42 | section as below to use 'identifier' as argument to -u: | ||
| 43 | |||
| 44 | [repo-manifest "identifier"] | ||
| 45 | url = ... | ||
| 46 | server = ... | ||
| 47 | reference = ... | ||
| 48 | |||
| 49 | Only the url is required - the others are optional. | ||
| 50 | |||
| 51 | If no -u argument is specified, the 'repo-manifest' section named | ||
| 52 | 'default' will be used if present. | ||
| 53 | |||
| 54 | The optional -b argument can be used to select the manifest branch | 39 | The optional -b argument can be used to select the manifest branch |
| 55 | to checkout and use. If no branch is specified, master is assumed. | 40 | to checkout and use. If no branch is specified, master is assumed. |
| 56 | 41 | ||
| @@ -84,7 +69,7 @@ to update the working directory files. | |||
| 84 | # Manifest | 69 | # Manifest |
| 85 | g = p.add_option_group('Manifest options') | 70 | g = p.add_option_group('Manifest options') |
| 86 | g.add_option('-u', '--manifest-url', | 71 | g.add_option('-u', '--manifest-url', |
| 87 | dest='manifest_url', default='default', | 72 | dest='manifest_url', |
| 88 | help='manifest repository location', metavar='URL') | 73 | help='manifest repository location', metavar='URL') |
| 89 | g.add_option('-b', '--manifest-branch', | 74 | g.add_option('-b', '--manifest-branch', |
| 90 | dest='manifest_branch', | 75 | dest='manifest_branch', |
| @@ -123,25 +108,10 @@ to update the working directory files. | |||
| 123 | def _SyncManifest(self, opt): | 108 | def _SyncManifest(self, opt): |
| 124 | m = self.manifest.manifestProject | 109 | m = self.manifest.manifestProject |
| 125 | is_new = not m.Exists | 110 | is_new = not m.Exists |
| 126 | manifest_server = None | ||
| 127 | |||
| 128 | # The manifest url may point out a manifest section in the config | ||
| 129 | key = 'repo-manifest.%s.' % opt.manifest_url | ||
| 130 | if GitConfig.ForUser().GetString(key + 'url'): | ||
| 131 | opt.manifest_url = GitConfig.ForUser().GetString(key + 'url') | ||
| 132 | |||
| 133 | # Also copy other options to the manifest config if not specified already. | ||
| 134 | if not opt.reference: | ||
| 135 | opt.reference = GitConfig.ForUser().GetString(key + 'reference') | ||
| 136 | manifest_server = GitConfig.ForUser().GetString(key + 'server') | ||
| 137 | 111 | ||
| 138 | if is_new: | 112 | if is_new: |
| 139 | if not opt.manifest_url or opt.manifest_url == 'default': | 113 | if not opt.manifest_url: |
| 140 | print >>sys.stderr, """\ | 114 | print >>sys.stderr, 'fatal: manifest url (-u) is required.' |
| 141 | fatal: missing manifest url (-u) and no default found. | ||
| 142 | |||
| 143 | tip: The global git configuration key 'repo-manifest.default.url' can | ||
| 144 | be used to specify a default url.""" | ||
| 145 | sys.exit(1) | 115 | sys.exit(1) |
| 146 | 116 | ||
| 147 | if not opt.quiet: | 117 | if not opt.quiet: |
| @@ -165,9 +135,6 @@ fatal: missing manifest url (-u) and no default found. | |||
| 165 | r.ResetFetch() | 135 | r.ResetFetch() |
| 166 | r.Save() | 136 | r.Save() |
| 167 | 137 | ||
| 168 | if manifest_server: | ||
| 169 | m.config.SetString('repo.manifest-server', manifest_server) | ||
| 170 | |||
| 171 | if opt.reference: | 138 | if opt.reference: |
| 172 | m.config.SetString('repo.reference', opt.reference) | 139 | m.config.SetString('repo.reference', opt.reference) |
| 173 | 140 | ||
