summaryrefslogtreecommitdiffstats
path: root/subcmds/sync.py
diff options
context:
space:
mode:
authorTorne (Richard Coles) <torne@google.com>2012-12-05 10:58:06 +0000
committerTorne (Richard Coles) <torne@google.com>2012-12-05 11:01:36 +0000
commit7bdbde7af84036d2d900150e67f462e1a50f4b0e (patch)
tree399f7adf345ce5cf195b786939765b6b98ce9bc6 /subcmds/sync.py
parentb2bd91c99b9435cf950ecf8efbb8439f31d3fcbc (diff)
downloadgit-repo-7bdbde7af84036d2d900150e67f462e1a50f4b0e.tar.gz
Allow sync to run even when the manifest is broken.
If the current manifest is broken then "repo sync" fails because it can't retrieve the default value for --jobs. Use 1 in this case, in order that you can "repo sync" to get a fixed manifest (assuming someone fixed it upstream). Change-Id: I4262abb59311f1e851ca2a663438a7e9f796b9f6
Diffstat (limited to 'subcmds/sync.py')
-rw-r--r--subcmds/sync.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py
index f8094738..228a279a 100644
--- a/subcmds/sync.py
+++ b/subcmds/sync.py
@@ -51,7 +51,7 @@ from main import WrapperModule
51from project import Project 51from project import Project
52from project import RemoteSpec 52from project import RemoteSpec
53from command import Command, MirrorSafeCommand 53from command import Command, MirrorSafeCommand
54from error import RepoChangedException, GitError 54from error import RepoChangedException, GitError, ManifestParseError
55from project import SyncBuffer 55from project import SyncBuffer
56from progress import Progress 56from progress import Progress
57 57
@@ -148,7 +148,10 @@ later is required to fix a server side protocol bug.
148""" 148"""
149 149
150 def _Options(self, p, show_smart=True): 150 def _Options(self, p, show_smart=True):
151 self.jobs = self.manifest.default.sync_j 151 try:
152 self.jobs = self.manifest.default.sync_j
153 except ManifestParseError:
154 self.jobs = 1
152 155
153 p.add_option('-f', '--force-broken', 156 p.add_option('-f', '--force-broken',
154 dest='force_broken', action='store_true', 157 dest='force_broken', action='store_true',