diff options
Diffstat (limited to 'project.py')
-rw-r--r-- | project.py | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -54,6 +54,7 @@ class SyncNetworkHalfResult(NamedTuple): | |||
54 | # commit already present. | 54 | # commit already present. |
55 | remote_fetched: bool | 55 | remote_fetched: bool |
56 | 56 | ||
57 | |||
57 | # Maximum sleep time allowed during retries. | 58 | # Maximum sleep time allowed during retries. |
58 | MAXIMUM_RETRY_SLEEP_SEC = 3600.0 | 59 | MAXIMUM_RETRY_SLEEP_SEC = 3600.0 |
59 | # +-10% random jitter is added to each Fetches retry sleep duration. | 60 | # +-10% random jitter is added to each Fetches retry sleep duration. |
@@ -63,6 +64,7 @@ RETRY_JITTER_PERCENT = 0.1 | |||
63 | # TODO(vapier): Remove knob once behavior is verified. | 64 | # TODO(vapier): Remove knob once behavior is verified. |
64 | _ALTERNATES = os.environ.get('REPO_USE_ALTERNATES') == '1' | 65 | _ALTERNATES = os.environ.get('REPO_USE_ALTERNATES') == '1' |
65 | 66 | ||
67 | |||
66 | def _lwrite(path, content): | 68 | def _lwrite(path, content): |
67 | lock = '%s.lock' % path | 69 | lock = '%s.lock' % path |
68 | 70 | ||
@@ -3415,6 +3417,7 @@ class RepoProject(MetaProject): | |||
3415 | except OSError: | 3417 | except OSError: |
3416 | return 0 | 3418 | return 0 |
3417 | 3419 | ||
3420 | |||
3418 | class ManifestProject(MetaProject): | 3421 | class ManifestProject(MetaProject): |
3419 | """The MetaProject for manifests.""" | 3422 | """The MetaProject for manifests.""" |
3420 | 3423 | ||
@@ -3845,11 +3848,12 @@ class ManifestProject(MetaProject): | |||
3845 | self.config.SetBoolean('repo.superproject', use_superproject) | 3848 | self.config.SetBoolean('repo.superproject', use_superproject) |
3846 | 3849 | ||
3847 | if not standalone_manifest: | 3850 | if not standalone_manifest: |
3848 | if not self.Sync_NetworkHalf( | 3851 | success = self.Sync_NetworkHalf( |
3849 | is_new=is_new, quiet=not verbose, verbose=verbose, | 3852 | is_new=is_new, quiet=not verbose, verbose=verbose, |
3850 | clone_bundle=clone_bundle, current_branch_only=current_branch_only, | 3853 | clone_bundle=clone_bundle, current_branch_only=current_branch_only, |
3851 | tags=tags, submodules=submodules, clone_filter=clone_filter, | 3854 | tags=tags, submodules=submodules, clone_filter=clone_filter, |
3852 | partial_clone_exclude=self.manifest.PartialCloneExclude).success: | 3855 | partial_clone_exclude=self.manifest.PartialCloneExclude).success |
3856 | if not success: | ||
3853 | r = self.GetRemote() | 3857 | r = self.GetRemote() |
3854 | print('fatal: cannot obtain manifest %s' % r.url, file=sys.stderr) | 3858 | print('fatal: cannot obtain manifest %s' % r.url, file=sys.stderr) |
3855 | 3859 | ||