From 3f5ea0b18207a81f58595b1a2e10e5ffb784b74f Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Sat, 17 Nov 2012 03:13:09 +0900 Subject: [PATCH] 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 --- subcmds/init.py | 4 ++++ 1 file changed, 4 insertions(+) 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. dest='config_name', action="store_true", default=False, help='Always prompt for name/e-mail') + def _RegisteredEnvironmentOptions(self): + return {'REPO_MANIFEST_URL': 'manifest_url', + 'REPO_MIRROR_LOCATION': 'reference'} + def _SyncManifest(self, opt): m = self.manifest.manifestProject is_new = not m.Exists