##// END OF EJS Templates
tests: fix repeatability for test-filebranch with dirstate granularity
Matt Mackall -
r6329:3f754be7 default
parent child Browse files
Show More
@@ -1,79 +1,79 b''
1 #!/bin/sh
1 #!/bin/sh
2
2
3 # This test makes sure that we don't mark a file as merged with its ancestor
3 # This test makes sure that we don't mark a file as merged with its ancestor
4 # when we do a merge.
4 # when we do a merge.
5
5
6 cat <<EOF > merge
6 cat <<EOF > merge
7 import sys, os
7 import sys, os
8 print "merging for", os.path.basename(sys.argv[1])
8 print "merging for", os.path.basename(sys.argv[1])
9 EOF
9 EOF
10 HGMERGE="python ../merge"; export HGMERGE
10 HGMERGE="python ../merge"; export HGMERGE
11
11
12 echo creating base
12 echo creating base
13 hg init a
13 hg init a
14 cd a
14 cd a
15 echo 1 > foo
15 echo 1 > foo
16 echo 1 > bar
16 echo 1 > bar
17 echo 1 > baz
17 echo 1 > baz
18 echo 1 > quux
18 echo 1 > quux
19 hg add foo bar baz quux
19 hg add foo bar baz quux
20 hg commit -m "base" -d "1000000 0"
20 hg commit -m "base" -d "1000000 0"
21
21
22 cd ..
22 cd ..
23 hg clone a b
23 hg clone a b
24
24
25 echo creating branch a
25 echo creating branch a
26 cd a
26 cd a
27 echo 2a > foo
27 echo 2a > foo
28 echo 2a > bar
28 echo 2a > bar
29 hg commit -m "branch a" -d "1000000 0"
29 hg commit -m "branch a" -d "1000000 0"
30
30
31 echo creating branch b
31 echo creating branch b
32
32
33 cd ..
33 cd ..
34 cd b
34 cd b
35 echo 2b > foo
35 echo 2b > foo
36 echo 2b > baz
36 echo 2b > baz
37 hg commit -m "branch b" -d "1000000 0"
37 hg commit -m "branch b" -d "1000000 0"
38
38
39 echo "we shouldn't have anything but n state here"
39 echo "we shouldn't have anything but n state here"
40 hg debugstate --nodates
40 hg debugstate --nodates | grep -v "^n"
41
41
42 echo merging
42 echo merging
43 hg pull ../a
43 hg pull ../a
44 hg merge -v
44 hg merge -v
45
45
46 echo 2m > foo
46 echo 2m > foo
47 echo 2b > baz
47 echo 2b > baz
48 echo new > quux
48 echo new > quux
49
49
50 echo "we shouldn't have anything but foo in merge state here"
50 echo "we shouldn't have anything but foo in merge state here"
51 hg debugstate --nodates | grep "^m"
51 hg debugstate --nodates | grep "^m"
52
52
53 hg ci -m "merge" -d "1000000 0"
53 hg ci -m "merge" -d "1000000 0"
54
54
55 echo "main: we should have a merge here"
55 echo "main: we should have a merge here"
56 hg debugindex .hg/store/00changelog.i
56 hg debugindex .hg/store/00changelog.i
57
57
58 echo "log should show foo and quux changed"
58 echo "log should show foo and quux changed"
59 hg log -v -r tip
59 hg log -v -r tip
60
60
61 echo "foo: we should have a merge here"
61 echo "foo: we should have a merge here"
62 hg debugindex .hg/store/data/foo.i
62 hg debugindex .hg/store/data/foo.i
63
63
64 echo "bar: we shouldn't have a merge here"
64 echo "bar: we shouldn't have a merge here"
65 hg debugindex .hg/store/data/bar.i
65 hg debugindex .hg/store/data/bar.i
66
66
67 echo "baz: we shouldn't have a merge here"
67 echo "baz: we shouldn't have a merge here"
68 hg debugindex .hg/store/data/baz.i
68 hg debugindex .hg/store/data/baz.i
69
69
70 echo "quux: we shouldn't have a merge here"
70 echo "quux: we shouldn't have a merge here"
71 hg debugindex .hg/store/data/quux.i
71 hg debugindex .hg/store/data/quux.i
72
72
73 echo "manifest entries should match tips of all files"
73 echo "manifest entries should match tips of all files"
74 hg manifest --debug
74 hg manifest --debug
75
75
76 echo "everything should be clean now"
76 echo "everything should be clean now"
77 hg status
77 hg status
78
78
79 hg verify
79 hg verify
@@ -1,72 +1,68 b''
1 creating base
1 creating base
2 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
2 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
3 creating branch a
3 creating branch a
4 creating branch b
4 creating branch b
5 we shouldn't have anything but n state here
5 we shouldn't have anything but n state here
6 n 0 -1 bar
7 n 0 -1 baz
8 n 0 -1 foo
9 n 0 -1 quux
10 merging
6 merging
11 pulling from ../a
7 pulling from ../a
12 searching for changes
8 searching for changes
13 adding changesets
9 adding changesets
14 adding manifests
10 adding manifests
15 adding file changes
11 adding file changes
16 added 1 changesets with 2 changes to 2 files (+1 heads)
12 added 1 changesets with 2 changes to 2 files (+1 heads)
17 (run 'hg heads' to see heads, 'hg merge' to merge)
13 (run 'hg heads' to see heads, 'hg merge' to merge)
18 merging for foo
14 merging for foo
19 resolving manifests
15 resolving manifests
20 getting bar
16 getting bar
21 merging foo
17 merging foo
22 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
18 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
23 (branch merge, don't forget to commit)
19 (branch merge, don't forget to commit)
24 we shouldn't have anything but foo in merge state here
20 we shouldn't have anything but foo in merge state here
25 m 644 3 foo
21 m 644 3 foo
26 main: we should have a merge here
22 main: we should have a merge here
27 rev offset length base linkrev nodeid p1 p2
23 rev offset length base linkrev nodeid p1 p2
28 0 0 77 0 0 c36078bec30d 000000000000 000000000000
24 0 0 77 0 0 c36078bec30d 000000000000 000000000000
29 1 77 73 1 1 182b283965f1 c36078bec30d 000000000000
25 1 77 73 1 1 182b283965f1 c36078bec30d 000000000000
30 2 150 71 2 2 a6aef98656b7 c36078bec30d 000000000000
26 2 150 71 2 2 a6aef98656b7 c36078bec30d 000000000000
31 3 221 72 3 3 0c2cc6fc80e2 182b283965f1 a6aef98656b7
27 3 221 72 3 3 0c2cc6fc80e2 182b283965f1 a6aef98656b7
32 log should show foo and quux changed
28 log should show foo and quux changed
33 changeset: 3:0c2cc6fc80e2
29 changeset: 3:0c2cc6fc80e2
34 tag: tip
30 tag: tip
35 parent: 1:182b283965f1
31 parent: 1:182b283965f1
36 parent: 2:a6aef98656b7
32 parent: 2:a6aef98656b7
37 user: test
33 user: test
38 date: Mon Jan 12 13:46:40 1970 +0000
34 date: Mon Jan 12 13:46:40 1970 +0000
39 files: foo quux
35 files: foo quux
40 description:
36 description:
41 merge
37 merge
42
38
43
39
44 foo: we should have a merge here
40 foo: we should have a merge here
45 rev offset length base linkrev nodeid p1 p2
41 rev offset length base linkrev nodeid p1 p2
46 0 0 3 0 0 b8e02f643373 000000000000 000000000000
42 0 0 3 0 0 b8e02f643373 000000000000 000000000000
47 1 3 4 1 1 2ffeddde1b65 b8e02f643373 000000000000
43 1 3 4 1 1 2ffeddde1b65 b8e02f643373 000000000000
48 2 7 4 2 2 33d1fb69067a b8e02f643373 000000000000
44 2 7 4 2 2 33d1fb69067a b8e02f643373 000000000000
49 3 11 4 3 3 aa27919ee430 2ffeddde1b65 33d1fb69067a
45 3 11 4 3 3 aa27919ee430 2ffeddde1b65 33d1fb69067a
50 bar: we shouldn't have a merge here
46 bar: we shouldn't have a merge here
51 rev offset length base linkrev nodeid p1 p2
47 rev offset length base linkrev nodeid p1 p2
52 0 0 3 0 0 b8e02f643373 000000000000 000000000000
48 0 0 3 0 0 b8e02f643373 000000000000 000000000000
53 1 3 4 1 2 33d1fb69067a b8e02f643373 000000000000
49 1 3 4 1 2 33d1fb69067a b8e02f643373 000000000000
54 baz: we shouldn't have a merge here
50 baz: we shouldn't have a merge here
55 rev offset length base linkrev nodeid p1 p2
51 rev offset length base linkrev nodeid p1 p2
56 0 0 3 0 0 b8e02f643373 000000000000 000000000000
52 0 0 3 0 0 b8e02f643373 000000000000 000000000000
57 1 3 4 1 1 2ffeddde1b65 b8e02f643373 000000000000
53 1 3 4 1 1 2ffeddde1b65 b8e02f643373 000000000000
58 quux: we shouldn't have a merge here
54 quux: we shouldn't have a merge here
59 rev offset length base linkrev nodeid p1 p2
55 rev offset length base linkrev nodeid p1 p2
60 0 0 3 0 0 b8e02f643373 000000000000 000000000000
56 0 0 3 0 0 b8e02f643373 000000000000 000000000000
61 1 3 5 1 3 6128c0f33108 b8e02f643373 000000000000
57 1 3 5 1 3 6128c0f33108 b8e02f643373 000000000000
62 manifest entries should match tips of all files
58 manifest entries should match tips of all files
63 33d1fb69067a0139622a3fa3b7ba1cdb1367972e 644 bar
59 33d1fb69067a0139622a3fa3b7ba1cdb1367972e 644 bar
64 2ffeddde1b65b4827f6746174a145474129fa2ce 644 baz
60 2ffeddde1b65b4827f6746174a145474129fa2ce 644 baz
65 aa27919ee4303cfd575e1fb932dd64d75aa08be4 644 foo
61 aa27919ee4303cfd575e1fb932dd64d75aa08be4 644 foo
66 6128c0f33108e8cfbb4e0824d13ae48b466d7280 644 quux
62 6128c0f33108e8cfbb4e0824d13ae48b466d7280 644 quux
67 everything should be clean now
63 everything should be clean now
68 checking changesets
64 checking changesets
69 checking manifests
65 checking manifests
70 crosschecking files in changesets and manifests
66 crosschecking files in changesets and manifests
71 checking files
67 checking files
72 4 files, 4 changesets, 10 total revisions
68 4 files, 4 changesets, 10 total revisions
General Comments 0
You need to be logged in to leave comments. Login now