equal
deleted
inserted
replaced
97 """apply the patch <patchname> to the working directory. |
97 """apply the patch <patchname> to the working directory. |
98 a list of patched files is returned""" |
98 a list of patched files is returned""" |
99 patcher = find_in_path('gpatch', os.environ.get('PATH', ''), 'patch') |
99 patcher = find_in_path('gpatch', os.environ.get('PATH', ''), 'patch') |
100 args = [] |
100 args = [] |
101 if cwd: |
101 if cwd: |
102 args.append('-d "%s"' % cwd) |
102 args.append('-d %s' % shellquote(cwd)) |
103 fp = os.popen('%s %s -p%d < "%s"' % (patcher, ' '.join(args), strip, |
103 fp = os.popen('%s %s -p%d < %s' % (patcher, ' '.join(args), strip, |
104 patchname)) |
104 shellquote(patchname))) |
105 files = {} |
105 files = {} |
106 for line in fp: |
106 for line in fp: |
107 line = line.rstrip() |
107 line = line.rstrip() |
108 ui.status("%s\n" % line) |
108 ui.status("%s\n" % line) |
109 if line.startswith('patching file '): |
109 if line.startswith('patching file '): |