Mercurial > hg
changeset 3036:adf7f3421c55
sshrepo: when creating a repo, raise an error if it already exists
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Sat, 02 Sep 2006 23:14:35 +0200 |
parents | 4d0e0f149581 |
children | 3acb76f0124d |
files | mercurial/sshrepo.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/sshrepo.py Sat Sep 02 23:06:47 2006 +0200 +++ b/mercurial/sshrepo.py Sat Sep 02 23:14:35 2006 +0200 @@ -34,9 +34,10 @@ 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)