Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/cmdutil.py @ 24169:ac41aa4a66ab stable
amend: check for directory renames for both merge parents (issue4516)
Before this change, amending a merge would lose the rename information for file
adding in the second parents and implicitly renamed into a new directory.
In case of the merge, we also look for directory rename data from the second
parent. This seems to fix the bug and does not show other issues from the test
suite.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Mon, 02 Mar 2015 19:01:00 +0000 |
parents | 942a5a34b2d0 |
children | 67952dc7a88f c780a63f61ca |
comparison
equal
deleted
inserted
replaced
24166:aae338f9da70 | 24169:ac41aa4a66ab |
---|---|
2279 | 2279 |
2280 user = ctx.user() | 2280 user = ctx.user() |
2281 date = ctx.date() | 2281 date = ctx.date() |
2282 # Recompute copies (avoid recording a -> b -> a) | 2282 # Recompute copies (avoid recording a -> b -> a) |
2283 copied = copies.pathcopies(base, ctx) | 2283 copied = copies.pathcopies(base, ctx) |
2284 if old.p2: | |
2285 copied.update(copies.pathcopies(old.p2(), ctx)) | |
2284 | 2286 |
2285 # Prune files which were reverted by the updates: if old | 2287 # Prune files which were reverted by the updates: if old |
2286 # introduced file X and our intermediate commit, node, | 2288 # introduced file X and our intermediate commit, node, |
2287 # renamed that file, then those two files are the same and | 2289 # renamed that file, then those two files are the same and |
2288 # we can discard X from our list of files. Likewise if X | 2290 # we can discard X from our list of files. Likewise if X |