mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
Better error message when using --mirror in existing workspace
If repo init is run with the --mirror option, repo checks if there is already a workspace initialized in the current location, and if so, exits with an error message: --mirror not supported on existing client This error can cause confusion; the users do not understand what is wrong and what they need to do to fix it. Change the error message to make it a bit clearer. Change-Id: Ifd06ef64fd264bd1117e4184c49afe0345b75d8c
This commit is contained in:
parent
e0b6de32f7
commit
254709804d
@ -180,8 +180,10 @@ to update the working directory files.
|
|||||||
if is_new:
|
if is_new:
|
||||||
m.config.SetString('repo.mirror', 'true')
|
m.config.SetString('repo.mirror', 'true')
|
||||||
else:
|
else:
|
||||||
print('fatal: --mirror not supported on existing client',
|
print('fatal: --mirror is only supported when initializing a new '
|
||||||
file=sys.stderr)
|
'workspace.', file=sys.stderr)
|
||||||
|
print('Either delete the .repo folder in this workspace, or initialize '
|
||||||
|
'in another location.', file=sys.stderr)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
if not m.Sync_NetworkHalf(is_new=is_new):
|
if not m.Sync_NetworkHalf(is_new=is_new):
|
||||||
|
Loading…
Reference in New Issue
Block a user