##// END OF EJS Templates
test-filebranch: avoid a shell script
Alexis S. L. Carvalho -
r4293:b0140ead default
parent child Browse files
Show More
@@ -1,79 +1,79
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 cat <<'EOF' > merge
7 #!/bin/sh
8 echo merging for `basename $1`
6 cat <<EOF > merge
7 import sys, os
8 print "merging for", os.path.basename(sys.argv[1])
9 9 EOF
10 chmod +x merge
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 40 hg debugstate | cut -b 1-16,35-
41 41
42 42 echo merging
43 43 hg pull ../a
44 env HGMERGE=../merge hg merge -v
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 | cut -b 1-16,35- | 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
General Comments 0
You need to be logged in to leave comments. Login now