changeset 2788 | 1e8b8107a2c9 |
parent 2786 | f4d916351366 |
child 2858 | 345bac2bc4ec |
child 2859 | b3d1145ed06c |
--- a/mercurial/util.py +++ b/mercurial/util.py @@ -99,9 +99,9 @@ def patch(strip, patchname, ui, cwd=None 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()