Show More
@@ -1,67 +1,143 b'' | |||
|
1 | #!/bin/sh | |
|
1 | initial | |
|
2 | $ hg init test-a | |
|
3 | $ cd test-a | |
|
4 | $ cat >test.txt <<"EOF" | |
|
5 | > 1 | |
|
6 | > 2 | |
|
7 | > 3 | |
|
8 | > EOF | |
|
9 | $ hg add test.txt | |
|
10 | $ hg commit -m "Initial" -d "1000000 0" | |
|
2 | 11 | |
|
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 "1000000 0" | |
|
12 | clone | |
|
13 | $ cd .. | |
|
14 | $ hg clone test-a test-b | |
|
15 | updating to branch default | |
|
16 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
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 "1000000 0" | |
|
13 | 26 | |
|
14 | # clone | |
|
15 | cd .. | |
|
16 | hg clone test-a test-b | |
|
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 "1000000 0" | |
|
17 | 35 | |
|
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 "1000000 0" | |
|
36 | now pull and merge from test-a | |
|
37 | $ hg pull ../test-a | |
|
38 | pulling from ../test-a | |
|
39 | searching for changes | |
|
40 | adding changesets | |
|
41 | adding manifests | |
|
42 | adding file changes | |
|
43 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
|
44 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
|
45 | $ hg merge | |
|
46 | merging test.txt | |
|
47 | warning: conflicts during merge. | |
|
48 | merging test.txt failed! | |
|
49 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
|
50 | use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon | |
|
51 | resolve conflict | |
|
52 | $ cat >test.txt <<"EOF" | |
|
53 | > one | |
|
54 | > two-point-five | |
|
55 | > three | |
|
56 | > EOF | |
|
57 | $ rm -f *.orig | |
|
58 | $ hg resolve -m test.txt | |
|
59 | $ hg commit -m "Merge 1" -d "1000000 0" | |
|
60 | ||
|
61 | change test-a again | |
|
62 | $ cd ../test-a | |
|
63 | $ cat >test.txt <<"EOF" | |
|
64 | > one | |
|
65 | > two-point-one | |
|
66 | > three | |
|
67 | > EOF | |
|
68 | $ hg commit -m "two -> two-point-one" -d "1000000 0" | |
|
26 | 69 | |
|
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 "1000000 0" | |
|
70 | pull and merge from test-a again | |
|
71 | $ cd ../test-b | |
|
72 | $ hg pull ../test-a | |
|
73 | pulling from ../test-a | |
|
74 | searching for changes | |
|
75 | adding changesets | |
|
76 | adding manifests | |
|
77 | adding file changes | |
|
78 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
|
79 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
|
80 | $ hg merge --debug | |
|
81 | searching for copies back to rev 1 | |
|
82 | resolving manifests | |
|
83 | overwrite None partial False | |
|
84 | ancestor faaea63e63a9 local 451c744aabcc+ remote a070d41e8360 | |
|
85 | test.txt: versions differ -> m | |
|
86 | preserving test.txt for resolve of test.txt | |
|
87 | updating: test.txt 1/1 files (100.00%) | |
|
88 | picked tool 'internal:merge' for test.txt (binary False symlink False) | |
|
89 | merging test.txt | |
|
90 | my test.txt@451c744aabcc+ other test.txt@a070d41e8360 ancestor test.txt@faaea63e63a9 | |
|
91 | warning: conflicts during merge. | |
|
92 | merging test.txt failed! | |
|
93 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
|
94 | use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon | |
|
35 | 95 | |
|
36 | # now pull and merge from test-a | |
|
37 | hg pull ../test-a | |
|
38 | hg merge | |
|
39 | # resolve conflict | |
|
40 | cat >test.txt <<"EOF" | |
|
96 | $ cat test.txt | |
|
41 | 97 | one |
|
98 | <<<<<<< local | |
|
42 | 99 | two-point-five |
|
100 | ======= | |
|
101 | two-point-one | |
|
102 | >>>>>>> other | |
|
43 | 103 | three |
|
44 | EOF | |
|
45 | rm -f *.orig | |
|
46 | hg resolve -m test.txt | |
|
47 | hg commit -m "Merge 1" -d "1000000 0" | |
|
104 | ||
|
105 | $ hg debugindex .hg/store/data/test.txt.i | |
|
106 | rev offset length base linkrev nodeid p1 p2 | |
|
107 | 0 0 7 0 0 01365c4cca56 000000000000 000000000000 | |
|
108 | 1 7 9 1 1 7b013192566a 01365c4cca56 000000000000 | |
|
109 | 2 16 15 2 2 8fe46a3eb557 01365c4cca56 000000000000 | |
|
110 | 3 31 27 2 3 fc3148072371 7b013192566a 8fe46a3eb557 | |
|
111 | 4 58 25 4 4 d40249267ae3 8fe46a3eb557 000000000000 | |
|
112 | ||
|
113 | $ hg log | |
|
114 | changeset: 4:a070d41e8360 | |
|
115 | tag: tip | |
|
116 | parent: 2:faaea63e63a9 | |
|
117 | user: test | |
|
118 | date: Mon Jan 12 13:46:40 1970 +0000 | |
|
119 | summary: two -> two-point-one | |
|
48 | 120 | |
|
49 | # change test-a again | |
|
50 | cd ../test-a | |
|
51 | cat >test.txt <<"EOF" | |
|
52 | one | |
|
53 | two-point-one | |
|
54 | three | |
|
55 | EOF | |
|
56 | hg commit -m "two -> two-point-one" -d "1000000 0" | |
|
121 | changeset: 3:451c744aabcc | |
|
122 | parent: 1:e409be6afcc0 | |
|
123 | parent: 2:faaea63e63a9 | |
|
124 | user: test | |
|
125 | date: Mon Jan 12 13:46:40 1970 +0000 | |
|
126 | summary: Merge 1 | |
|
57 | 127 | |
|
58 | # pull and merge from test-a again | |
|
59 | cd ../test-b | |
|
60 | hg pull ../test-a | |
|
61 | hg merge --debug | |
|
128 | changeset: 2:faaea63e63a9 | |
|
129 | parent: 0:095c92b91f1a | |
|
130 | user: test | |
|
131 | date: Mon Jan 12 13:46:40 1970 +0000 | |
|
132 | summary: Numbers as words | |
|
62 | 133 | |
|
63 | cat test.txt | |
|
134 | changeset: 1:e409be6afcc0 | |
|
135 | user: test | |
|
136 | date: Mon Jan 12 13:46:40 1970 +0000 | |
|
137 | summary: 2 -> 2.5 | |
|
64 | 138 | |
|
65 | hg debugindex .hg/store/data/test.txt.i | |
|
139 | changeset: 0:095c92b91f1a | |
|
140 | user: test | |
|
141 | date: Mon Jan 12 13:46:40 1970 +0000 | |
|
142 | summary: Initial | |
|
66 | 143 | |
|
67 | hg log |
|
1 | NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now