##// END OF EJS Templates
sshrepo: when creating a repo, raise an error if it already exists
Benoit Boissinot -
r3036:adf7f342 default
parent child Browse files
Show More
@@ -34,9 +34,10 b' class sshrepository(remoterepository):'
34 if create:
34 if create:
35 try:
35 try:
36 self.validate_repo(ui, sshcmd, args, remotecmd)
36 self.validate_repo(ui, sshcmd, args, remotecmd)
37 return # the repo is good, nothing more to do
38 except hg.RepoError:
37 except hg.RepoError:
39 pass
38 pass
39 else:
40 raise hg.RepoError(_("repository %s already exists") % path)
40
41
41 cmd = '%s %s "%s init %s"'
42 cmd = '%s %s "%s init %s"'
42 cmd = cmd % (sshcmd, args, remotecmd, self.path)
43 cmd = cmd % (sshcmd, args, remotecmd, self.path)
General Comments 0
You need to be logged in to leave comments. Login now