Mercurial > public > mercurial-scm > hg
comparison mercurial/sshrepo.py @ 3084:75dcfe28da4a
sshrepo: don't try to validate when creating the repo
- This removes the "repo not found" error when cloning or init-ing a remote
repo.
- Since the remote hg will abort if the repo already exists we don't need to
validate it.
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Wed, 13 Sep 2006 19:57:40 +0200 |
parents | adf7f3421c55 |
children | 7ae37d99d47e |
comparison
equal
deleted
inserted
replaced
3083:82c9d1aac308 | 3084:75dcfe28da4a |
---|---|
30 | 30 |
31 sshcmd = self.ui.config("ui", "ssh", "ssh") | 31 sshcmd = self.ui.config("ui", "ssh", "ssh") |
32 remotecmd = self.ui.config("ui", "remotecmd", "hg") | 32 remotecmd = self.ui.config("ui", "remotecmd", "hg") |
33 | 33 |
34 if create: | 34 if create: |
35 try: | |
36 self.validate_repo(ui, sshcmd, args, remotecmd) | |
37 except hg.RepoError: | |
38 pass | |
39 else: | |
40 raise hg.RepoError(_("repository %s already exists") % path) | |
41 | |
42 cmd = '%s %s "%s init %s"' | 35 cmd = '%s %s "%s init %s"' |
43 cmd = cmd % (sshcmd, args, remotecmd, self.path) | 36 cmd = cmd % (sshcmd, args, remotecmd, self.path) |
44 | 37 |
45 ui.note('running %s\n' % cmd) | 38 ui.note('running %s\n' % cmd) |
46 res = os.system(cmd) | 39 res = os.system(cmd) |