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