summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@sonymobile.com>2012-11-21 14:41:58 +0900
committerDavid Pursehouse <david.pursehouse@sonymobile.com>2013-01-29 09:47:07 +0900
commit254709804d83d611831d4c78fe17280750e2eb2a (patch)
tree0c7559bdcc8cdf1d4b18e8f141745e36f0b9efae
parente0b6de32f74cd2f069d1544bbbb08f6d45f6d27b (diff)
downloadgit-repo-254709804d83d611831d4c78fe17280750e2eb2a.tar.gz
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
-rw-r--r--subcmds/init.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/subcmds/init.py b/subcmds/init.py
index 9396f3c0..55497d82 100644
--- a/subcmds/init.py
+++ b/subcmds/init.py
@@ -180,8 +180,10 @@ to update the working directory files.
180 if is_new: 180 if is_new:
181 m.config.SetString('repo.mirror', 'true') 181 m.config.SetString('repo.mirror', 'true')
182 else: 182 else:
183 print('fatal: --mirror not supported on existing client', 183 print('fatal: --mirror is only supported when initializing a new '
184 file=sys.stderr) 184 'workspace.', file=sys.stderr)
185 print('Either delete the .repo folder in this workspace, or initialize '
186 'in another location.', file=sys.stderr)
185 sys.exit(1) 187 sys.exit(1)
186 188
187 if not m.Sync_NetworkHalf(is_new=is_new): 189 if not m.Sync_NetworkHalf(is_new=is_new):