diff options
Diffstat (limited to 'subcmds/sync.py')
-rw-r--r-- | subcmds/sync.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py index d1a06412..5e7385db 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py | |||
@@ -272,7 +272,7 @@ later is required to fix a server side protocol bug. | |||
272 | quiet=opt.quiet, | 272 | quiet=opt.quiet, |
273 | current_branch_only=opt.current_branch_only, | 273 | current_branch_only=opt.current_branch_only, |
274 | clone_bundle=not opt.no_clone_bundle, | 274 | clone_bundle=not opt.no_clone_bundle, |
275 | no_tags=opt.no_tags) | 275 | no_tags=opt.no_tags, archive=self.manifest.IsArchive) |
276 | self._fetch_times.Set(project, time.time() - start) | 276 | self._fetch_times.Set(project, time.time() - start) |
277 | 277 | ||
278 | # Lock around all the rest of the code, since printing, updating a set | 278 | # Lock around all the rest of the code, since printing, updating a set |
@@ -315,7 +315,8 @@ later is required to fix a server side protocol bug. | |||
315 | quiet=opt.quiet, | 315 | quiet=opt.quiet, |
316 | current_branch_only=opt.current_branch_only, | 316 | current_branch_only=opt.current_branch_only, |
317 | clone_bundle=not opt.no_clone_bundle, | 317 | clone_bundle=not opt.no_clone_bundle, |
318 | no_tags=opt.no_tags): | 318 | no_tags=opt.no_tags, |
319 | archive=self.manifest.IsArchive): | ||
319 | fetched.add(project.gitdir) | 320 | fetched.add(project.gitdir) |
320 | else: | 321 | else: |
321 | print('error: Cannot fetch %s' % project.name, file=sys.stderr) | 322 | print('error: Cannot fetch %s' % project.name, file=sys.stderr) |
@@ -363,7 +364,9 @@ later is required to fix a server side protocol bug. | |||
363 | pm.end() | 364 | pm.end() |
364 | self._fetch_times.Save() | 365 | self._fetch_times.Save() |
365 | 366 | ||
366 | self._GCProjects(projects) | 367 | if not self.manifest.IsArchive: |
368 | self._GCProjects(projects) | ||
369 | |||
367 | return fetched | 370 | return fetched |
368 | 371 | ||
369 | def _GCProjects(self, projects): | 372 | def _GCProjects(self, projects): |
@@ -671,7 +674,7 @@ later is required to fix a server side protocol bug. | |||
671 | previously_missing_set = missing_set | 674 | previously_missing_set = missing_set |
672 | fetched.update(self._Fetch(missing, opt)) | 675 | fetched.update(self._Fetch(missing, opt)) |
673 | 676 | ||
674 | if self.manifest.IsMirror: | 677 | if self.manifest.IsMirror or self.manifest.IsArchive: |
675 | # bail out now, we have no working tree | 678 | # bail out now, we have no working tree |
676 | return | 679 | return |
677 | 680 | ||
@@ -791,7 +794,7 @@ class _FetchTimes(object): | |||
791 | def _Load(self): | 794 | def _Load(self): |
792 | if self._times is None: | 795 | if self._times is None: |
793 | try: | 796 | try: |
794 | f = open(self._path) | 797 | f = open(self._path, 'rb') |
795 | except IOError: | 798 | except IOError: |
796 | self._times = {} | 799 | self._times = {} |
797 | return self._times | 800 | return self._times |