mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
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
This commit is contained in:
parent
b2bd91c99b
commit
7bdbde7af8
@ -51,7 +51,7 @@ from main import WrapperModule
|
|||||||
from project import Project
|
from project import Project
|
||||||
from project import RemoteSpec
|
from project import RemoteSpec
|
||||||
from command import Command, MirrorSafeCommand
|
from command import Command, MirrorSafeCommand
|
||||||
from error import RepoChangedException, GitError
|
from error import RepoChangedException, GitError, ManifestParseError
|
||||||
from project import SyncBuffer
|
from project import SyncBuffer
|
||||||
from progress import Progress
|
from progress import Progress
|
||||||
|
|
||||||
@ -148,7 +148,10 @@ later is required to fix a server side protocol bug.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def _Options(self, p, show_smart=True):
|
def _Options(self, p, show_smart=True):
|
||||||
self.jobs = self.manifest.default.sync_j
|
try:
|
||||||
|
self.jobs = self.manifest.default.sync_j
|
||||||
|
except ManifestParseError:
|
||||||
|
self.jobs = 1
|
||||||
|
|
||||||
p.add_option('-f', '--force-broken',
|
p.add_option('-f', '--force-broken',
|
||||||
dest='force_broken', action='store_true',
|
dest='force_broken', action='store_true',
|
||||||
|
Loading…
Reference in New Issue
Block a user