Show More
@@ -182,7 +182,7 b' def readgitpatch(patchname):' | |||
|
182 | 182 | |
|
183 | 183 | return (dopatch, gitpatches) |
|
184 | 184 | |
|
185 | def dogitpatch(patchname, gitpatches): | |
|
185 | def dogitpatch(patchname, gitpatches, cwd=None): | |
|
186 | 186 | """Preprocess git patch so that vanilla patch can handle it""" |
|
187 | 187 | pf = file(patchname) |
|
188 | 188 | pfline = 1 |
@@ -196,7 +196,7 b' def dogitpatch(patchname, gitpatches):' | |||
|
196 | 196 | if not p.copymod: |
|
197 | 197 | continue |
|
198 | 198 | |
|
199 | copyfile(p.oldpath, p.path) | |
|
199 | copyfile(p.oldpath, p.path, basedir=cwd) | |
|
200 | 200 | |
|
201 | 201 | # rewrite patch hunk |
|
202 | 202 | while pfline < p.lineno: |
@@ -233,7 +233,7 b' def patch(patchname, ui, strip=1, cwd=No' | |||
|
233 | 233 | fuzz = False |
|
234 | 234 | if dopatch: |
|
235 | 235 | if dopatch == 'filter': |
|
236 | patchname = dogitpatch(patchname, gitpatches) | |
|
236 | patchname = dogitpatch(patchname, gitpatches, cwd=cwd) | |
|
237 | 237 | patcher = util.find_in_path('gpatch', os.environ.get('PATH', ''), 'patch') |
|
238 | 238 | args = [] |
|
239 | 239 | if cwd: |
General Comments 0
You need to be logged in to leave comments.
Login now