# HG changeset patch # User Frank Kingswood # Date 1276529916 -3600 # Node ID 18680b0e20a72421b75f2e8d6661c3327b17c504 # Parent e740f36cfb4bc8bfb24128866540406a135cc4ee Fix shell quoting on p4 conversion diff -r e740f36cfb4b -r 18680b0e20a7 hgext/convert/p4.py --- 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