From 5ea32d135963da5542b78895f95332c6a17bbe11 Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Tue, 8 Sep 2015 13:27:20 -0700 Subject: GITC: Always update the gitc manifest from the repo manifest This way any changes made to the main manifest are reflected in the gitc manifest. It's also necessary to use both manifests to sync since the information required to update the gitc manifest is actually in the repo manifest. This also fixes a few issues that came up when testing. notdefault groups weren't being saved to the gitc manifest in a method that matched 'sync'. The merge branch wasn't always being set to the correct value either. Change-Id: I435235cb5622a048ffad0059affd32ecf71f1f5b --- subcmds/gitc_init.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'subcmds/gitc_init.py') diff --git a/subcmds/gitc_init.py b/subcmds/gitc_init.py index e99affa5..71c50515 100644 --- a/subcmds/gitc_init.py +++ b/subcmds/gitc_init.py @@ -19,6 +19,7 @@ import sys import gitc_utils from command import RequiresGitcCommand +from manifest_xml import GitcManifest from subcmds import init @@ -68,15 +69,16 @@ use for this GITC client. os.mkdir(self.client_dir) super(GitcInit, self).Execute(opt, args) - for name, remote in self.manifest.remotes.iteritems(): - remote.fetchUrl = remote.resolvedFetchUrl - + manifest_file = self.manifest.manifestFile if opt.manifest_file: if not os.path.exists(opt.manifest_file): print('fatal: Specified manifest file %s does not exist.' % opt.manifest_file) sys.exit(1) - self.manifest.Override(opt.manifest_file) - gitc_utils.generate_gitc_manifest(self.client_dir, self.manifest) + manifest_file = opt.manifest_file + + manifest = GitcManifest(self.repodir, opt.gitc_client) + manifest.Override(manifest_file) + gitc_utils.generate_gitc_manifest(None, manifest) print('Please run `cd %s` to view your GITC client.' % os.path.join(gitc_utils.GITC_FS_ROOT_DIR, opt.gitc_client)) -- cgit v1.2.3-54-g00ecf