mercurial/sshrepo.py
changeset 3033 adf7f3421c55
parent 3031 2b0bc36a48d8
child 3081 75dcfe28da4a
equal deleted inserted replaced
3032:4d0e0f149581 3033:adf7f3421c55
    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:
    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)
    43 
    44 
    44             ui.note('running %s\n' % cmd)
    45             ui.note('running %s\n' % cmd)