diff -r 81bef3c355c5 -r 003d1f174fe1 mercurial/patch.py --- a/mercurial/patch.py Tue Oct 30 16:54:25 2007 -0700 +++ b/mercurial/patch.py Thu Nov 01 12:05:14 2007 +0100 @@ -249,7 +249,7 @@ fuzz = False if cwd: args.append('-d %s' % util.shellquote(cwd)) - fp = os.popen('%s %s -p%d < %s' % (patcher, ' '.join(args), strip, + fp = util.popen('%s %s -p%d < %s' % (patcher, ' '.join(args), strip, util.shellquote(patchname))) for line in fp: