mercurial/commands.py
changeset 826 16700cdd9055
parent 825 0108c602feb9
child 836 1fe3b14c7044
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -703,7 +703,7 @@ def import_(ui, repo, patch1, *patches, 
             message = "%s\n" % '\n'.join(message)
         ui.debug('message:\n%s\n' % message)
 
-        f = os.popen("patch -p%d < %s" % (strip, pf))
+        f = os.popen("patch -p%d < '%s'" % (strip, pf))
         files = []
         for l in f.read().splitlines():
             l.rstrip('\r\n');