diff options
author | David Pursehouse <david.pursehouse@sonymobile.com> | 2012-11-17 03:13:09 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@sonymobile.com> | 2012-11-17 12:40:42 +0900 |
commit | 3f5ea0b18207a81f58595b1a2e10e5ffb784b74f (patch) | |
tree | 32707cff2cf21c9a004e02b2c3fcec2864673119 /subcmds/init.py | |
parent | b148ac9d9aefb18baddbf9e28ed33b1b8c6e96e6 (diff) | |
download | git-repo-3f5ea0b18207a81f58595b1a2e10e5ffb784b74f.tar.gz |
Allow init command to set options from environment variables
The manifest URL and mirror location can be specified in environment
variables which will be used if the options are not passed on the
command line
Change-Id: Ida87968b4a91189822c3738f835e2631e10b847e
Diffstat (limited to 'subcmds/init.py')
-rw-r--r-- | subcmds/init.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/subcmds/init.py b/subcmds/init.py index eeadc70d..9396f3c0 100644 --- a/subcmds/init.py +++ b/subcmds/init.py | |||
@@ -118,6 +118,10 @@ to update the working directory files. | |||
118 | dest='config_name', action="store_true", default=False, | 118 | dest='config_name', action="store_true", default=False, |
119 | help='Always prompt for name/e-mail') | 119 | help='Always prompt for name/e-mail') |
120 | 120 | ||
121 | def _RegisteredEnvironmentOptions(self): | ||
122 | return {'REPO_MANIFEST_URL': 'manifest_url', | ||
123 | 'REPO_MIRROR_LOCATION': 'reference'} | ||
124 | |||
121 | def _SyncManifest(self, opt): | 125 | def _SyncManifest(self, opt): |
122 | m = self.manifest.manifestProject | 126 | m = self.manifest.manifestProject |
123 | is_new = not m.Exists | 127 | is_new = not m.Exists |