comparison hgext/histedit.py @ 19392:f6b047cf9272 stable

histedit: use base for computing renames when folding (issue3729) When a file was renamed in the very first changeset being histedited, the rename was not detected. Consider a history like this: 0 base: add a.txt 1 first: rename a.txt to b.txt 2 last: edit b.txt When 1 and 2 are edited, copies.pathcopies(first, last) correctly returns that nothing was renamed. We must instead use copies.pathcopies(first, last) to detect the initial rename.
author Martin Geisler <martin@geisler.net>
date Mon, 15 Jul 2013 15:04:42 +0200
parents 87bb53367633
children 33e1b2d4bdbc
comparison
equal deleted inserted replaced
19391:347ccd936fa6 19392:f6b047cf9272
245 files = set() 245 files = set()
246 for ctx in ctxs: 246 for ctx in ctxs:
247 files.update(ctx.files()) 247 files.update(ctx.files())
248 248
249 # Recompute copies (avoid recording a -> b -> a) 249 # Recompute copies (avoid recording a -> b -> a)
250 copied = copies.pathcopies(first, last) 250 copied = copies.pathcopies(base, last)
251 251
252 # prune files which were reverted by the updates 252 # prune files which were reverted by the updates
253 def samefile(f): 253 def samefile(f):
254 if f in last.manifest(): 254 if f in last.manifest():
255 a = last.filectx(f) 255 a = last.filectx(f)