Mercurial > hg
diff tests/test-copy2 @ 1117:30ab5b8ee8ec
fix some rename/copy bugs
- delete copy information when we update dirstate
hg was keeping the copy state and marking things as copied on
multiple commits
- files that are renamed should have no parents
if you do a rename/copy to an existing file, it should not be marked
as descending from its previous revisions.
- remove spurious print from filelog.renamed
- add some more copy tests
author | mpm@selenic.com |
---|---|
date | Sat, 27 Aug 2005 22:04:17 -0700 |
parents | |
children | 19b048da4da9 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-copy2 Sat Aug 27 22:04:17 2005 -0700 @@ -0,0 +1,41 @@ +#!/bin/sh + +hg init +echo foo > foo +hg add foo +hg commit -m1 -d"0 0" + +echo "# should show copy" +cp foo bar +hg copy foo bar +hg debugstate + +echo "# shouldn't show copy" +hg commit -m2 -d"0 0" +hg debugstate + +echo "# should match" +hg debugindex .hg/data/foo.i +hg debugrename bar + +echo bleah > foo +echo quux > bar +hg commit -m3 -d"0 0" + +echo "# should not be renamed" +hg debugrename bar + +cp foo bar +hg copy foo bar +echo "# should show copy" +hg debugstate +hg commit -m3 -d"0 0" + +echo "# should show no parents for tip" +hg debugindex .hg/data/bar.i +echo "# should match" +hg debugindex .hg/data/foo.i +hg debugrename bar + +echo "# should show no copies" +hg debugstate \ No newline at end of file