equal
deleted
inserted
replaced
204 fname = c.filename() |
204 fname = c.filename() |
205 if fname in backups: |
205 if fname in backups: |
206 c.write(fp) |
206 c.write(fp) |
207 dopatch = fp.tell() |
207 dopatch = fp.tell() |
208 fp.seek(0) |
208 fp.seek(0) |
|
209 |
|
210 # 2.5 optionally review / modify patch in text editor |
|
211 if opts.get('review', False): |
|
212 patchtext = (crecordmod.diffhelptext |
|
213 + crecordmod.patchhelptext |
|
214 + fp.read()) |
|
215 reviewedpatch = ui.edit(patchtext, "", |
|
216 extra={"suffix": ".diff"}) |
|
217 fp.truncate(0) |
|
218 fp.write(reviewedpatch) |
|
219 fp.seek(0) |
209 |
220 |
210 [os.unlink(repo.wjoin(c)) for c in newlyaddedandmodifiedfiles] |
221 [os.unlink(repo.wjoin(c)) for c in newlyaddedandmodifiedfiles] |
211 # 3a. apply filtered patch to clean repo (clean) |
222 # 3a. apply filtered patch to clean repo (clean) |
212 if backups: |
223 if backups: |
213 # Equivalent to hg.revert |
224 # Equivalent to hg.revert |