Mercurial > public > mercurial-scm > hg-stable
diff tests/test-convert-filemap.t @ 17174:32b2e6d641e4 stable
convert: make filemap renames consistently override revision renames
When the source repository had a revision renaming "$new -> $old",
but the filemap a "$old -> $new" rename, the converted revision could
use either $new (deleting the file) or $old (keeping the file) when
getting the file data, depending on the lexicographical order of
those names. So the resulting revision would leave some files
untouched (as expected), but delete others arbitrarely.
author | Wagner Bruna <wbruna@yahoo.com> |
---|---|
date | Fri, 06 Jul 2012 01:14:02 -0300 |
parents | 41885892796e |
children | f76e2196ee70 |
line wrap: on
line diff
--- a/tests/test-convert-filemap.t Mon Jul 09 17:51:46 2012 +0200 +++ b/tests/test-convert-filemap.t Fri Jul 06 01:14:02 2012 -0300 @@ -375,3 +375,36 @@ | o 0 "addb" files: b + +filemap rename undoing revision rename + + $ hg init renameundo + $ cd renameundo + $ echo 1 > a + $ echo 1 > c + $ hg ci -qAm add + $ hg mv -q a b/a + $ hg mv -q c b/c + $ hg ci -qm rename + $ echo 2 > b/a + $ echo 2 > b/c + $ hg ci -qm modify + $ cd .. + + $ echo "rename b ." > renameundo.fmap + $ hg convert --filemap renameundo.fmap renameundo renameundo2 + initializing destination renameundo2 repository + scanning source... + sorting... + converting... + 2 add + 1 rename + filtering out empty revision + repository tip rolled back to revision 0 (undo commit) + 0 modify + $ glog -R renameundo2 + o 1 "modify" files: a c + | + o 0 "add" files: a c + +