diff options
author | Shawn O. Pearce <sop@google.com> | 2010-03-06 19:29:56 -0800 |
---|---|---|
committer | Shawn O. Pearce <sop@google.com> | 2010-03-06 19:29:56 -0800 |
commit | 69b1e8aa65ab933fa919166d88aec90c86852beb (patch) | |
tree | 0a8635a835abfd8c05a04bd03639ab2d07e70d5f /subcmds/sync.py | |
parent | 840ed0fab7cb4c2ab296c7d7d45f13e2523bae1c (diff) | |
parent | 9452e4ec0941fbee163e35ebdcd6ca6ee7df55cb (diff) | |
download | git-repo-69b1e8aa65ab933fa919166d88aec90c86852beb.tar.gz |
Merge branch 'stable'
* stable:
Automatically install Gerrit Code Review's commit-msg hook
Fail sync when encountering "N commits behind."
Check that we are not overwriting a local repository when syncing.
Honor url.insteadOf when setting up SSH control master connection
sync: Fix split call on malformed email addresses
Fixing project renaming bug.
Conflicts:
hooks/commit-msg
project.py
subcmds/sync.py
Change-Id: I5eaf8fef8cbe4a95d124368112293a9ca64325bf
Diffstat (limited to 'subcmds/sync.py')
-rw-r--r-- | subcmds/sync.py | 11 |
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) |