diff options
Diffstat (limited to 'subcmds/sync.py')
| -rw-r--r-- | subcmds/sync.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py index bd07dd9f..ceb81eaa 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py | |||
| @@ -111,7 +111,6 @@ later is required to fix a server side protocol bug. | |||
| 111 | pm = Progress('Fetching projects', len(projects)) | 111 | pm = Progress('Fetching projects', len(projects)) |
| 112 | for project in projects: | 112 | for project in projects: |
| 113 | pm.update() | 113 | pm.update() |
| 114 | |||
| 115 | if project.Sync_NetworkHalf(): | 114 | if project.Sync_NetworkHalf(): |
| 116 | fetched.add(project.gitdir) | 115 | fetched.add(project.gitdir) |
| 117 | else: | 116 | else: |
| @@ -192,6 +191,15 @@ uncommitted changes are present' % project.relpath | |||
| 192 | if opt.repo_upgraded: | 191 | if opt.repo_upgraded: |
| 193 | _PostRepoUpgrade(self.manifest) | 192 | _PostRepoUpgrade(self.manifest) |
| 194 | 193 | ||
| 194 | if not opt.local_only: | ||
| 195 | mp.Sync_NetworkHalf() | ||
| 196 | |||
| 197 | if mp.HasChanges: | ||
| 198 | syncbuf = SyncBuffer(mp.config) | ||
| 199 | mp.Sync_LocalHalf(syncbuf) | ||
| 200 | if not syncbuf.Finish(): | ||
| 201 | sys.exit(1) | ||
| 202 | self.manifest._Unload() | ||
| 195 | all = self.GetProjects(args, missing_ok=True) | 203 | all = self.GetProjects(args, missing_ok=True) |
| 196 | 204 | ||
| 197 | if not opt.local_only: | 205 | if not opt.local_only: |
| @@ -199,7 +207,6 @@ uncommitted changes are present' % project.relpath | |||
| 199 | now = time.time() | 207 | now = time.time() |
| 200 | if (24 * 60 * 60) <= (now - rp.LastFetch): | 208 | if (24 * 60 * 60) <= (now - rp.LastFetch): |
| 201 | to_fetch.append(rp) | 209 | to_fetch.append(rp) |
| 202 | to_fetch.append(mp) | ||
| 203 | to_fetch.extend(all) | 210 | to_fetch.extend(all) |
| 204 | 211 | ||
| 205 | fetched = self._Fetch(to_fetch) | 212 | fetched = self._Fetch(to_fetch) |
| @@ -208,12 +215,6 @@ uncommitted changes are present' % project.relpath | |||
| 208 | # bail out now; the rest touches the working tree | 215 | # bail out now; the rest touches the working tree |
| 209 | return | 216 | return |
| 210 | 217 | ||
| 211 | if mp.HasChanges: | ||
| 212 | syncbuf = SyncBuffer(mp.config) | ||
| 213 | mp.Sync_LocalHalf(syncbuf) | ||
| 214 | if not syncbuf.Finish(): | ||
| 215 | sys.exit(1) | ||
| 216 | |||
| 217 | self.manifest._Unload() | 218 | self.manifest._Unload() |
| 218 | all = self.GetProjects(args, missing_ok=True) | 219 | all = self.GetProjects(args, missing_ok=True) |
| 219 | missing = [] | 220 | missing = [] |
| @@ -241,7 +242,6 @@ uncommitted changes are present' % project.relpath | |||
| 241 | if not syncbuf.Finish(): | 242 | if not syncbuf.Finish(): |
| 242 | sys.exit(1) | 243 | sys.exit(1) |
| 243 | 244 | ||
| 244 | |||
| 245 | def _PostRepoUpgrade(manifest): | 245 | def _PostRepoUpgrade(manifest): |
| 246 | for project in manifest.projects.values(): | 246 | for project in manifest.projects.values(): |
| 247 | if project.Exists: | 247 | if project.Exists: |
