comparison 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
comparison
equal deleted inserted replaced
1116:0cdd73b0767c 1117:30ab5b8ee8ec
1 #!/bin/sh
2
3 hg init
4 echo foo > foo
5 hg add foo
6 hg commit -m1 -d"0 0"
7
8 echo "# should show copy"
9 cp foo bar
10 hg copy foo bar
11 hg debugstate
12
13 echo "# shouldn't show copy"
14 hg commit -m2 -d"0 0"
15 hg debugstate
16
17 echo "# should match"
18 hg debugindex .hg/data/foo.i
19 hg debugrename bar
20
21 echo bleah > foo
22 echo quux > bar
23 hg commit -m3 -d"0 0"
24
25 echo "# should not be renamed"
26 hg debugrename bar
27
28 cp foo bar
29 hg copy foo bar
30 echo "# should show copy"
31 hg debugstate
32 hg commit -m3 -d"0 0"
33
34 echo "# should show no parents for tip"
35 hg debugindex .hg/data/bar.i
36 echo "# should match"
37 hg debugindex .hg/data/foo.i
38 hg debugrename bar
39
40 echo "# should show no copies"
41 hg debugstate