mercurial/sshrepo.py
changeset 5293 32ec518ee3cb
parent 5255 65dc707606ed
parent 5292 5a65d870871d
equal deleted inserted replaced
5290:05889b6b1468 5293:32ec518ee3cb
    33         if create:
    33         if create:
    34             cmd = '%s %s "%s init %s"'
    34             cmd = '%s %s "%s init %s"'
    35             cmd = cmd % (sshcmd, args, remotecmd, self.path)
    35             cmd = cmd % (sshcmd, args, remotecmd, self.path)
    36 
    36 
    37             ui.note('running %s\n' % cmd)
    37             ui.note('running %s\n' % cmd)
    38             res = os.system(cmd)
    38             res = util.system(cmd)
    39             if res != 0:
    39             if res != 0:
    40                 self.raise_(repo.RepoError(_("could not create remote repo")))
    40                 self.raise_(repo.RepoError(_("could not create remote repo")))
    41 
    41 
    42         self.validate_repo(ui, sshcmd, args, remotecmd)
    42         self.validate_repo(ui, sshcmd, args, remotecmd)
    43 
    43 
    49         self.cleanup()
    49         self.cleanup()
    50 
    50 
    51         cmd = '%s %s "%s -R %s serve --stdio"'
    51         cmd = '%s %s "%s -R %s serve --stdio"'
    52         cmd = cmd % (sshcmd, args, remotecmd, self.path)
    52         cmd = cmd % (sshcmd, args, remotecmd, self.path)
    53 
    53 
       
    54         cmd = util.quotecommand(cmd)
    54         ui.note('running %s\n' % cmd)
    55         ui.note('running %s\n' % cmd)
    55         self.pipeo, self.pipei, self.pipee = os.popen3(cmd, 'b')
    56         self.pipeo, self.pipei, self.pipee = os.popen3(cmd, 'b')
    56 
    57 
    57         # skip any noise generated by remote shell
    58         # skip any noise generated by remote shell
    58         self.do_cmd("hello")
    59         self.do_cmd("hello")