Mercurial > hg > mercurial-crew-with-dirclash
comparison 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 |
comparison
equal
deleted
inserted
replaced
1815:3e2a2f230296 | 1822:64df4220b349 |
---|---|
169 hg rename d1/b d1/bb | 169 hg rename d1/b d1/bb |
170 mv d1/bb d1/bc | 170 mv d1/bb d1/bc |
171 hg rename --after d1/bb d1/bc | 171 hg rename --after d1/bb d1/bc |
172 hg status | 172 hg status |
173 hg update -C | 173 hg update -C |
174 | |
175 echo "# idempotent renames (d1/b -> d1/bb followed by d1/bb -> d1/b)" | |
176 hg rename d1/b d1/bb | |
177 echo "some stuff added to d1/bb" >> d1/bb | |
178 hg rename d1/bb d1/b | |
179 hg status | |
180 hg debugstate | grep copy | |
181 hg update -C |