mercurial/sshrepo.py
changeset 3081 75dcfe28da4a
parent 3033 adf7f3421c55
child 3274 7ae37d99d47e
equal deleted inserted replaced
3080:82c9d1aac308 3081: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)