mercurial/util.py
changeset 2793 1e8b8107a2c9
parent 2791 f4d916351366
child 2859 345bac2bc4ec
child 2860 b3d1145ed06c
--- a/mercurial/util.py	Sat Aug 05 14:59:47 2006 -0700
+++ b/mercurial/util.py	Sun Aug 06 16:42:36 2006 +0200
@@ -99,9 +99,9 @@
     patcher = find_in_path('gpatch', os.environ.get('PATH', ''), 'patch')
     args = []
     if cwd:
-        args.append('-d "%s"' % cwd)
-    fp = os.popen('%s %s -p%d < "%s"' % (patcher, ' '.join(args), strip,
-                                         patchname))
+        args.append('-d %s' % shellquote(cwd))
+    fp = os.popen('%s %s -p%d < %s' % (patcher, ' '.join(args), strip,
+                                       shellquote(patchname)))
     files = {}
     for line in fp:
         line = line.rstrip()