Mercurial > hg-stable
diff tests/test-rename @ 1822:64df4220b349
copy/rename to a removed destination file
When the destination of a copy or rename operation has been
marked for removal, we need to restore it before we overwrite
it with the new content. This also handles the case of
idempotent renames, i.e.
hg rename "a" "b"
hg rename "b" "a"
author | Robin Farine <robin.farine@terminus.org> |
---|---|
date | Tue, 28 Feb 2006 23:47:40 -0800 |
parents | 91c56c427171 |
children | 7544700fd931 |
line wrap: on
line diff
--- a/tests/test-rename Wed Mar 01 01:45:05 2006 +0100 +++ b/tests/test-rename Tue Feb 28 23:47:40 2006 -0800 @@ -171,3 +171,11 @@ hg rename --after d1/bb d1/bc hg status hg update -C + +echo "# idempotent renames (d1/b -> d1/bb followed by d1/bb -> d1/b)" +hg rename d1/b d1/bb +echo "some stuff added to d1/bb" >> d1/bb +hg rename d1/bb d1/b +hg status +hg debugstate | grep copy +hg update -C