equal
deleted
inserted
replaced
|
1 #!/bin/sh |
|
2 |
|
3 # initial |
|
4 hg init test-a |
|
5 cd test-a |
|
6 cat >test.txt <<"EOF" |
|
7 1 |
|
8 2 |
|
9 3 |
|
10 EOF |
|
11 hg add test.txt |
|
12 hg commit -m "Initial" -d "0 0" |
|
13 |
|
14 # clone |
|
15 cd .. |
|
16 hg clone test-a test-b |
|
17 |
|
18 # change test-a |
|
19 cd test-a |
|
20 cat >test.txt <<"EOF" |
|
21 one |
|
22 two |
|
23 three |
|
24 EOF |
|
25 hg commit -m "Numbers as words" -d "0 0" |
|
26 |
|
27 # change test-b |
|
28 cd ../test-b |
|
29 cat >test.txt <<"EOF" |
|
30 1 |
|
31 2.5 |
|
32 3 |
|
33 EOF |
|
34 hg commit -m "2 -> 2.5" -d "0 0" |
|
35 |
|
36 # now pull and merge from test-a |
|
37 hg pull |
|
38 HGMERGE=merge hg update -m |
|
39 # resolve conflict |
|
40 cat >test.txt <<"EOF" |
|
41 one |
|
42 two-point-five |
|
43 three |
|
44 EOF |
|
45 rm -f *.orig |
|
46 hg commit -m "Merge 1" -d "0 0" |
|
47 |
|
48 # change test-a again |
|
49 cd ../test-a |
|
50 cat >test.txt <<"EOF" |
|
51 one |
|
52 two-point-one |
|
53 three |
|
54 EOF |
|
55 hg commit -m "two -> two-point-one" |
|
56 |
|
57 # pull and merge from test-a again |
|
58 cd ../test-b |
|
59 hg pull |
|
60 HGMERGE=merge hg update --debug -m |
|
61 |
|
62 cat test.txt |
|
63 |
|
64 hg debugindex .hg/data/test.txt.i |
|
65 |
|
66 hg log |