summaryrefslogtreecommitdiffstats
path: root/subcmds/sync.py
diff options
context:
space:
mode:
Diffstat (limited to 'subcmds/sync.py')
-rw-r--r--subcmds/sync.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py
index 5fc834d0..d89c2b8c 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:
@@ -194,6 +193,15 @@ uncommitted changes are present' % project.relpath
194 if opt.repo_upgraded: 193 if opt.repo_upgraded:
195 _PostRepoUpgrade(self.manifest) 194 _PostRepoUpgrade(self.manifest)
196 195
196 if not opt.local_only:
197 mp.Sync_NetworkHalf()
198
199 if mp.HasChanges:
200 syncbuf = SyncBuffer(mp.config)
201 mp.Sync_LocalHalf(syncbuf)
202 if not syncbuf.Finish():
203 sys.exit(1)
204 self.manifest._Unload()
197 all = self.GetProjects(args, missing_ok=True) 205 all = self.GetProjects(args, missing_ok=True)
198 206
199 if not opt.local_only: 207 if not opt.local_only:
@@ -201,7 +209,6 @@ uncommitted changes are present' % project.relpath
201 now = time.time() 209 now = time.time()
202 if (24 * 60 * 60) <= (now - rp.LastFetch): 210 if (24 * 60 * 60) <= (now - rp.LastFetch):
203 to_fetch.append(rp) 211 to_fetch.append(rp)
204 to_fetch.append(mp)
205 to_fetch.extend(all) 212 to_fetch.extend(all)
206 213
207 fetched = self._Fetch(to_fetch) 214 fetched = self._Fetch(to_fetch)