diff options
author | Conley Owens <cco3@android.com> | 2013-12-18 17:44:58 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2013-12-18 17:44:59 +0000 |
commit | f045d49a71b64b854589c8821d8bf220c6ed9fd3 (patch) | |
tree | b4facc31b41327b5478b12e9213b4f4179ebb171 /subcmds/sync.py | |
parent | 53d6a7b8955e9377cc0a12206be357e7936621b1 (diff) | |
parent | 335f5ef4ad25a85c69fe6d8c848c5d1d447e22c8 (diff) | |
download | git-repo-f045d49a71b64b854589c8821d8bf220c6ed9fd3.tar.gz |
Merge "Add --archive option to init to sync using git archive"
Diffstat (limited to 'subcmds/sync.py')
-rw-r--r-- | subcmds/sync.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py index d8aec59b..0279ff60 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py | |||
@@ -253,7 +253,7 @@ later is required to fix a server side protocol bug. | |||
253 | quiet=opt.quiet, | 253 | quiet=opt.quiet, |
254 | current_branch_only=opt.current_branch_only, | 254 | current_branch_only=opt.current_branch_only, |
255 | clone_bundle=not opt.no_clone_bundle, | 255 | clone_bundle=not opt.no_clone_bundle, |
256 | no_tags=opt.no_tags) | 256 | no_tags=opt.no_tags, archive=self.manifest.IsArchive) |
257 | self._fetch_times.Set(project, time.time() - start) | 257 | self._fetch_times.Set(project, time.time() - start) |
258 | 258 | ||
259 | # Lock around all the rest of the code, since printing, updating a set | 259 | # Lock around all the rest of the code, since printing, updating a set |
@@ -294,7 +294,8 @@ later is required to fix a server side protocol bug. | |||
294 | quiet=opt.quiet, | 294 | quiet=opt.quiet, |
295 | current_branch_only=opt.current_branch_only, | 295 | current_branch_only=opt.current_branch_only, |
296 | clone_bundle=not opt.no_clone_bundle, | 296 | clone_bundle=not opt.no_clone_bundle, |
297 | no_tags=opt.no_tags): | 297 | no_tags=opt.no_tags, |
298 | archive=self.manifest.IsArchive): | ||
298 | fetched.add(project.gitdir) | 299 | fetched.add(project.gitdir) |
299 | else: | 300 | else: |
300 | print('error: Cannot fetch %s' % project.name, file=sys.stderr) | 301 | print('error: Cannot fetch %s' % project.name, file=sys.stderr) |
@@ -338,7 +339,9 @@ later is required to fix a server side protocol bug. | |||
338 | pm.end() | 339 | pm.end() |
339 | self._fetch_times.Save() | 340 | self._fetch_times.Save() |
340 | 341 | ||
341 | self._GCProjects(projects) | 342 | if not self.manifest.IsArchive: |
343 | self._GCProjects(projects) | ||
344 | |||
342 | return fetched | 345 | return fetched |
343 | 346 | ||
344 | def _GCProjects(self, projects): | 347 | def _GCProjects(self, projects): |
@@ -641,7 +644,7 @@ later is required to fix a server side protocol bug. | |||
641 | previously_missing_set = missing_set | 644 | previously_missing_set = missing_set |
642 | fetched.update(self._Fetch(missing, opt)) | 645 | fetched.update(self._Fetch(missing, opt)) |
643 | 646 | ||
644 | if self.manifest.IsMirror: | 647 | if self.manifest.IsMirror or self.manifest.IsArchive: |
645 | # bail out now, we have no working tree | 648 | # bail out now, we have no working tree |
646 | return | 649 | return |
647 | 650 | ||