diff options
Diffstat (limited to 'subcmds/sync.py')
| -rw-r--r-- | subcmds/sync.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py index b84d169f..1b716351 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py | |||
| @@ -316,8 +316,7 @@ later is required to fix a server side protocol bug. | |||
| 316 | if not path: | 316 | if not path: |
| 317 | continue | 317 | continue |
| 318 | if path not in new_project_paths: | 318 | if path not in new_project_paths: |
| 319 | """If the path has already been deleted, we don't need to do it | 319 | # If the path has already been deleted, we don't need to do it |
| 320 | """ | ||
| 321 | if os.path.exists(self.manifest.topdir + '/' + path): | 320 | if os.path.exists(self.manifest.topdir + '/' + path): |
| 322 | project = Project( | 321 | project = Project( |
| 323 | manifest = self.manifest, | 322 | manifest = self.manifest, |
| @@ -495,16 +494,16 @@ uncommitted changes are present' % project.relpath | |||
| 495 | self.manifest._Unload() | 494 | self.manifest._Unload() |
| 496 | if opt.jobs is None: | 495 | if opt.jobs is None: |
| 497 | self.jobs = self.manifest.default.sync_j | 496 | self.jobs = self.manifest.default.sync_j |
| 498 | all = self.GetProjects(args, missing_ok=True) | 497 | all_projects = self.GetProjects(args, missing_ok=True) |
| 499 | 498 | ||
| 500 | if not opt.local_only: | 499 | if not opt.local_only: |
| 501 | to_fetch = [] | 500 | to_fetch = [] |
| 502 | now = time.time() | 501 | now = time.time() |
| 503 | if (24 * 60 * 60) <= (now - rp.LastFetch): | 502 | if (24 * 60 * 60) <= (now - rp.LastFetch): |
| 504 | to_fetch.append(rp) | 503 | to_fetch.append(rp) |
| 505 | to_fetch.extend(all) | 504 | to_fetch.extend(all_projects) |
| 506 | 505 | ||
| 507 | fetched = self._Fetch(to_fetch, opt) | 506 | self._Fetch(to_fetch, opt) |
| 508 | _PostRepoFetch(rp, opt.no_repo_verify) | 507 | _PostRepoFetch(rp, opt.no_repo_verify) |
| 509 | if opt.network_only: | 508 | if opt.network_only: |
| 510 | # bail out now; the rest touches the working tree | 509 | # bail out now; the rest touches the working tree |
| @@ -519,8 +518,8 @@ uncommitted changes are present' % project.relpath | |||
| 519 | 518 | ||
| 520 | syncbuf = SyncBuffer(mp.config, | 519 | syncbuf = SyncBuffer(mp.config, |
| 521 | detach_head = opt.detach_head) | 520 | detach_head = opt.detach_head) |
| 522 | pm = Progress('Syncing work tree', len(all)) | 521 | pm = Progress('Syncing work tree', len(all_projects)) |
| 523 | for project in all: | 522 | for project in all_projects: |
| 524 | pm.update() | 523 | pm.update() |
| 525 | if project.worktree: | 524 | if project.worktree: |
| 526 | project.Sync_LocalHalf(syncbuf) | 525 | project.Sync_LocalHalf(syncbuf) |
