Mercurial > public > mercurial-scm > hg
comparison mercurial/sshrepo.py @ 5292:5a65d870871d
sshrepo: fix Windows command quoting
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Mon, 10 Sep 2007 23:34:33 +0200 |
parents | 6d5ed61c508c |
children | 32ec518ee3cb |
comparison
equal
deleted
inserted
replaced
5291:23651848d638 | 5292:5a65d870871d |
---|---|
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_(hg.RepoError(_("could not create remote repo"))) | 40 self.raise_(hg.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") |