Show More
@@ -1,126 +1,185 b'' | |||
|
1 | 1 | $ hg init |
|
2 | $ echo "nothing" > a | |
|
2 | $ cat << EOF > a | |
|
3 | > Small Mathematical Series. | |
|
4 | > One | |
|
5 | > Two | |
|
6 | > Three | |
|
7 | > Four | |
|
8 | > Five | |
|
9 | > Hop we are done. | |
|
10 | > EOF | |
|
3 | 11 | $ hg add a |
|
4 | 12 | $ hg commit -m ancestor |
|
5 | $ echo "something" > a | |
|
13 | $ cat << EOF > a | |
|
14 | > Small Mathematical Series. | |
|
15 | > 1 | |
|
16 | > 2 | |
|
17 | > 3 | |
|
18 | > 4 | |
|
19 | > 5 | |
|
20 | > Hop we are done. | |
|
21 | > EOF | |
|
6 | 22 | $ hg commit -m branch1 |
|
7 | 23 | $ hg co 0 |
|
8 | 24 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
9 | $ echo "something else" > a | |
|
25 | $ cat << EOF > a | |
|
26 | > Small Mathematical Series. | |
|
27 | > 1 | |
|
28 | > 2 | |
|
29 | > 3 | |
|
30 | > 6 | |
|
31 | > 8 | |
|
32 | > Hop we are done. | |
|
33 | > EOF | |
|
10 | 34 | $ hg commit -m branch2 |
|
11 | 35 | created new head |
|
12 | 36 | |
|
13 | 37 | $ hg merge 1 |
|
14 | 38 | merging a |
|
15 | 39 | warning: conflicts during merge. |
|
16 | 40 | merging a incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
17 | 41 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
18 | 42 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
19 | 43 | [1] |
|
20 | 44 | |
|
21 | 45 | $ hg id |
|
22 | 32e80765d7fe+75234512624c+ tip | |
|
46 | 618808747361+c0c68e4fe667+ tip | |
|
23 | 47 | |
|
24 | 48 | $ cat a |
|
25 | <<<<<<< local: 32e80765d7fe - test: branch2 | |
|
26 | something else | |
|
49 | Small Mathematical Series. | |
|
50 | 1 | |
|
51 | 2 | |
|
52 | 3 | |
|
53 | <<<<<<< local: 618808747361 - test: branch2 | |
|
54 | 6 | |
|
55 | 8 | |
|
27 | 56 | ======= |
|
28 | something | |
|
29 | >>>>>>> other: 75234512624c - test: branch1 | |
|
57 | 4 | |
|
58 | 5 | |
|
59 | >>>>>>> other: c0c68e4fe667 - test: branch1 | |
|
60 | Hop we are done. | |
|
30 | 61 | |
|
31 | 62 | $ hg status |
|
32 | 63 | M a |
|
33 | 64 | ? a.orig |
|
34 | 65 | |
|
35 | 66 | Verify custom conflict markers |
|
36 | 67 | |
|
37 | 68 | $ hg up -q --clean . |
|
38 | 69 | $ printf "\n[ui]\nmergemarkertemplate={author} {rev}\n" >> .hg/hgrc |
|
39 | 70 | |
|
40 | 71 | $ hg merge 1 |
|
41 | 72 | merging a |
|
42 | 73 | warning: conflicts during merge. |
|
43 | 74 | merging a incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
44 | 75 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
45 | 76 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
46 | 77 | [1] |
|
47 | 78 | |
|
48 | 79 | $ cat a |
|
80 | Small Mathematical Series. | |
|
81 | 1 | |
|
82 | 2 | |
|
83 | 3 | |
|
49 | 84 | <<<<<<< local: test 2 |
|
50 | something else | |
|
85 | 6 | |
|
86 | 8 | |
|
51 | 87 | ======= |
|
52 | something | |
|
88 | 4 | |
|
89 | 5 | |
|
53 | 90 | >>>>>>> other: test 1 |
|
91 | Hop we are done. | |
|
54 | 92 | |
|
55 | 93 | Verify line splitting of custom conflict marker which causes multiple lines |
|
56 | 94 | |
|
57 | 95 | $ hg up -q --clean . |
|
58 | 96 | $ cat >> .hg/hgrc <<EOF |
|
59 | 97 | > [ui] |
|
60 | 98 | > mergemarkertemplate={author} {rev}\nfoo\nbar\nbaz |
|
61 | 99 | > EOF |
|
62 | 100 | |
|
63 | 101 | $ hg -q merge 1 |
|
64 | 102 | warning: conflicts during merge. |
|
65 | 103 | merging a incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
66 | 104 | [1] |
|
67 | 105 | |
|
68 | 106 | $ cat a |
|
107 | Small Mathematical Series. | |
|
108 | 1 | |
|
109 | 2 | |
|
110 | 3 | |
|
69 | 111 | <<<<<<< local: test 2 |
|
70 | something else | |
|
112 | 6 | |
|
113 | 8 | |
|
71 | 114 | ======= |
|
72 | something | |
|
115 | 4 | |
|
116 | 5 | |
|
73 | 117 | >>>>>>> other: test 1 |
|
118 | Hop we are done. | |
|
74 | 119 | |
|
75 | 120 | Verify line trimming of custom conflict marker using multi-byte characters |
|
76 | 121 | |
|
77 | 122 | $ hg up -q --clean . |
|
78 | 123 | $ python <<EOF |
|
79 | 124 | > fp = open('logfile', 'w') |
|
80 | 125 | > fp.write('12345678901234567890123456789012345678901234567890' + |
|
81 | 126 | > '1234567890') # there are 5 more columns for 80 columns |
|
82 | 127 | > |
|
83 | 128 | > # 2 x 4 = 8 columns, but 3 x 4 = 12 bytes |
|
84 | 129 | > fp.write(u'\u3042\u3044\u3046\u3048'.encode('utf-8')) |
|
85 | 130 | > |
|
86 | 131 | > fp.close() |
|
87 | 132 | > EOF |
|
88 | 133 | $ hg add logfile |
|
89 | 134 | $ hg --encoding utf-8 commit --logfile logfile |
|
90 | 135 | |
|
91 | 136 | $ cat >> .hg/hgrc <<EOF |
|
92 | 137 | > [ui] |
|
93 | 138 | > mergemarkertemplate={desc|firstline} |
|
94 | 139 | > EOF |
|
95 | 140 | |
|
96 | 141 | $ hg -q --encoding utf-8 merge 1 |
|
97 | 142 | warning: conflicts during merge. |
|
98 | 143 | merging a incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
99 | 144 | [1] |
|
100 | 145 | |
|
101 | 146 | $ cat a |
|
147 | Small Mathematical Series. | |
|
148 | 1 | |
|
149 | 2 | |
|
150 | 3 | |
|
102 | 151 | <<<<<<< local: 123456789012345678901234567890123456789012345678901234567890\xe3\x81\x82... (esc) |
|
103 | something else | |
|
152 | 6 | |
|
153 | 8 | |
|
104 | 154 | ======= |
|
105 | something | |
|
155 | 4 | |
|
156 | 5 | |
|
106 | 157 | >>>>>>> other: branch1 |
|
158 | Hop we are done. | |
|
107 | 159 | |
|
108 | 160 | Verify basic conflict markers |
|
109 | 161 | |
|
110 | 162 | $ hg up -q --clean 2 |
|
111 | 163 | $ printf "\n[ui]\nmergemarkers=basic\n" >> .hg/hgrc |
|
112 | 164 | |
|
113 | 165 | $ hg merge 1 |
|
114 | 166 | merging a |
|
115 | 167 | warning: conflicts during merge. |
|
116 | 168 | merging a incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
117 | 169 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
118 | 170 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
119 | 171 | [1] |
|
120 | 172 | |
|
121 | 173 | $ cat a |
|
174 | Small Mathematical Series. | |
|
175 | 1 | |
|
176 | 2 | |
|
177 | 3 | |
|
122 | 178 | <<<<<<< local |
|
123 | something else | |
|
179 | 6 | |
|
180 | 8 | |
|
124 | 181 | ======= |
|
125 | something | |
|
182 | 4 | |
|
183 | 5 | |
|
126 | 184 | >>>>>>> other |
|
185 | Hop we are done. |
General Comments 0
You need to be logged in to leave comments.
Login now