mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
sshrepo: when creating a repo, raise an error if it already exists
This commit is contained in:
parent
4456f11f57
commit
955f1cbc96
@ -34,9 +34,10 @@ class sshrepository(remoterepository):
|
||||
if create:
|
||||
try:
|
||||
self.validate_repo(ui, sshcmd, args, remotecmd)
|
||||
return # the repo is good, nothing more to do
|
||||
except hg.RepoError:
|
||||
pass
|
||||
else:
|
||||
raise hg.RepoError(_("repository %s already exists") % path)
|
||||
|
||||
cmd = '%s %s "%s init %s"'
|
||||
cmd = cmd % (sshcmd, args, remotecmd, self.path)
|
||||
|
Loading…
Reference in New Issue
Block a user