diff options
author | Dan Willemsen <dwillemsen@google.com> | 2015-09-08 13:27:20 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@google.com> | 2015-09-09 12:35:56 -0700 |
commit | 250303b437855c2b50d052a05a08ed517423af8b (patch) | |
tree | ae9df65083e7e0e53d3438adb752cad2dbe27cb5 /subcmds/gitc_init.py | |
parent | ba72d8301e33344b3b11e286619c99568c37db1a (diff) | |
download | git-repo-250303b437855c2b50d052a05a08ed517423af8b.tar.gz |
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: I5dbc850dd73a9fbd10ab2470ae4c40e46ff894de
Diffstat (limited to 'subcmds/gitc_init.py')
-rw-r--r-- | subcmds/gitc_init.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/subcmds/gitc_init.py b/subcmds/gitc_init.py index e99affa5..c957a9dc 100644 --- a/subcmds/gitc_init.py +++ b/subcmds/gitc_init.py | |||
@@ -68,15 +68,13 @@ use for this GITC client. | |||
68 | os.mkdir(self.client_dir) | 68 | os.mkdir(self.client_dir) |
69 | super(GitcInit, self).Execute(opt, args) | 69 | super(GitcInit, self).Execute(opt, args) |
70 | 70 | ||
71 | for name, remote in self.manifest.remotes.iteritems(): | 71 | manifest_file = self.manifest.manifestFile |
72 | remote.fetchUrl = remote.resolvedFetchUrl | ||
73 | |||
74 | if opt.manifest_file: | 72 | if opt.manifest_file: |
75 | if not os.path.exists(opt.manifest_file): | 73 | if not os.path.exists(opt.manifest_file): |
76 | print('fatal: Specified manifest file %s does not exist.' % | 74 | print('fatal: Specified manifest file %s does not exist.' % |
77 | opt.manifest_file) | 75 | opt.manifest_file) |
78 | sys.exit(1) | 76 | sys.exit(1) |
79 | self.manifest.Override(opt.manifest_file) | 77 | manifest_file = opt.manifest_file |
80 | gitc_utils.generate_gitc_manifest(self.client_dir, self.manifest) | 78 | gitc_utils.generate_gitc_manifest(self.repodir, opt.gitc_client, None, manifest_file) |
81 | print('Please run `cd %s` to view your GITC client.' % | 79 | print('Please run `cd %s` to view your GITC client.' % |
82 | os.path.join(gitc_utils.GITC_FS_ROOT_DIR, opt.gitc_client)) | 80 | os.path.join(gitc_utils.GITC_FS_ROOT_DIR, opt.gitc_client)) |