--- a/hgext/convert/p4.py Mon Jun 14 13:39:00 2010 -0400
+++ b/hgext/convert/p4.py Mon Jun 14 16:38:36 2010 +0100
@@ -53,7 +53,7 @@
def _parse_view(self, path):
"Read changes affecting the path"
- cmd = 'p4 -G changes -s submitted "%s"' % path
+ cmd = 'p4 -G changes -s submitted %s' % util.shellquote(path)
stdout = util.popen(cmd, mode='rb')
for d in loaditer(stdout):
c = d.get("change", None)
@@ -72,7 +72,7 @@
else:
views = {"//": ""}
else:
- cmd = 'p4 -G client -o "%s"' % path
+ cmd = 'p4 -G client -o %s' % util.shellquote(path)
clientspec = marshal.load(util.popen(cmd, mode='rb'))
views = {}
@@ -148,7 +148,7 @@
return self.heads
def getfile(self, name, rev):
- cmd = 'p4 -G print "%s#%s"' % (self.depotname[name], rev)
+ cmd = 'p4 -G print %s' % util.shellquote("%s#%s"%(self.depotname[name], rev))
stdout = util.popen(cmd, mode='rb')
mode = None