mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
git_superproject: only print beta notice once.
This eliminates duplicate notices during multi-manifest syncs. Change-Id: Idcb038ddeb363368637c58c11346ebf8fd2b27ac Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/334939 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: LaMont Jones <lamontjones@google.com>
This commit is contained in:
parent
d56e2eb421
commit
2cc3ab7663
@ -238,8 +238,8 @@ class Superproject(object):
|
|||||||
f'{self._manifest.manifestFile}')
|
f'{self._manifest.manifestFile}')
|
||||||
return SyncResult(False, False)
|
return SyncResult(False, False)
|
||||||
|
|
||||||
print('NOTICE: --use-superproject is in beta; report any issues to the '
|
_PrintBetaNotice()
|
||||||
'address described in `repo version`', file=sys.stderr)
|
|
||||||
should_exit = True
|
should_exit = True
|
||||||
if not self._remote_url:
|
if not self._remote_url:
|
||||||
self._LogWarning(f'superproject URL is not defined in manifest: '
|
self._LogWarning(f'superproject URL is not defined in manifest: '
|
||||||
@ -364,6 +364,13 @@ class Superproject(object):
|
|||||||
return UpdateProjectsResult(manifest_path, False)
|
return UpdateProjectsResult(manifest_path, False)
|
||||||
|
|
||||||
|
|
||||||
|
@functools.lru_cache(maxsize=10)
|
||||||
|
def _PrintBetaNotice():
|
||||||
|
"""Print the notice of beta status."""
|
||||||
|
print('NOTICE: --use-superproject is in beta; report any issues to the '
|
||||||
|
'address described in `repo version`', file=sys.stderr)
|
||||||
|
|
||||||
|
|
||||||
@functools.lru_cache(maxsize=None)
|
@functools.lru_cache(maxsize=None)
|
||||||
def _UseSuperprojectFromConfiguration():
|
def _UseSuperprojectFromConfiguration():
|
||||||
"""Returns the user choice of whether to use superproject."""
|
"""Returns the user choice of whether to use superproject."""
|
||||||
|
Loading…
Reference in New Issue
Block a user