##// END OF EJS Templates
tests: make merge conflicts explicit in `hg annotate` tests...
Martin von Zweigbergk -
r42327:7116fc61 default
parent child Browse files
Show More
@@ -1,4 +1,7 b''
1 $ HGMERGE=true; export HGMERGE
1 $ cat >> "$HGRCPATH" << EOF
2 > [ui]
3 > merge = :merge3
4 > EOF
2
5
3 init
6 init
4
7
@@ -210,8 +213,34 b' annotate -nlf b'
210 created new head
213 created new head
211 $ hg merge
214 $ hg merge
212 merging b
215 merging b
213 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
216 warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
214 (branch merge, don't forget to commit)
217 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
218 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
219 [1]
220 $ cat b
221 a
222 a
223 a
224 <<<<<<< working copy: 5fbdc1152d97 - test: b2.1
225 b4
226 c
227 b5
228 ||||||| base
229 =======
230 b4
231 b5
232 b6
233 >>>>>>> merge rev: 37ec9f5c3d1f - test: b2
234 $ cat <<EOF > b
235 > a
236 > a
237 > a
238 > b4
239 > c
240 > b5
241 > EOF
242 $ hg resolve --mark -q
243 $ rm b.orig
215 $ hg ci -mmergeb -d '3 0'
244 $ hg ci -mmergeb -d '3 0'
216
245
217 annotate after merge
246 annotate after merge
@@ -244,15 +273,37 b' annotate after merge with -l'
244 > EOF
273 > EOF
245 $ hg ci -mc -d '3 0'
274 $ hg ci -mc -d '3 0'
246 created new head
275 created new head
276 BROKEN: 'a' was copied to 'b' on both sides. We should not get a merge conflict here
247 $ hg merge
277 $ hg merge
248 merging b
278 merging b
249 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
279 warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
250 (branch merge, don't forget to commit)
280 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
251 $ cat <<EOF >> b
281 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
282 [1]
283 $ cat b
284 <<<<<<< working copy: b80e3e32f75a - test: c
285 a
286 z
287 a
288 ||||||| base
289 =======
290 a
291 a
292 a
293 b4
294 c
295 b5
296 >>>>>>> merge rev: 64afcdf8e29e - test: mergeb
297 $ cat <<EOF > b
298 > a
299 > z
300 > a
252 > b4
301 > b4
253 > c
302 > c
254 > b5
303 > b5
255 > EOF
304 > EOF
305 $ hg resolve --mark -q
306 $ rm b.orig
256 $ echo d >> b
307 $ echo d >> b
257 $ hg ci -mmerge2 -d '4 0'
308 $ hg ci -mmerge2 -d '4 0'
258
309
@@ -695,8 +746,41 b' merge'
695 27: baz:3+->3-
746 27: baz:3+->3-
696 $ hg merge 25
747 $ hg merge 25
697 merging baz and qux to qux
748 merging baz and qux to qux
698 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
749 warning: conflicts while merging qux! (edit, then use 'hg resolve --mark')
699 (branch merge, don't forget to commit)
750 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
751 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
752 [1]
753 $ cat qux
754 0
755 0
756 1 baz:1
757 2 baz:2
758 <<<<<<< working copy: 863de62655ef - test: baz:3+->3-
759 3- baz:3
760 4 baz:4
761 ||||||| base
762 3+ baz:3
763 4 baz:4
764 =======
765 3+ baz:3
766 4+ baz:4
767 >>>>>>> merge rev: cb8df70ae185 - test: qux:4->4+
768 5
769 6
770 7
771 $ cat > qux <<EOF
772 > 0
773 > 0
774 > 1 baz:1
775 > 2 baz:2
776 > 3- baz:3
777 > 4 baz:4
778 > 5
779 > 6
780 > 7
781 > EOF
782 $ hg resolve --mark -q
783 $ rm qux.orig
700 $ hg ci -m merge
784 $ hg ci -m merge
701 $ hg log -T '{rev}: {desc}\n' -r 'followlines(qux, 5:7)'
785 $ hg log -T '{rev}: {desc}\n' -r 'followlines(qux, 5:7)'
702 16: baz:0
786 16: baz:0
@@ -709,8 +793,40 b' merge'
709 $ hg up 25 --quiet
793 $ hg up 25 --quiet
710 $ hg merge 27
794 $ hg merge 27
711 merging qux and baz to qux
795 merging qux and baz to qux
712 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
796 warning: conflicts while merging qux! (edit, then use 'hg resolve --mark')
713 (branch merge, don't forget to commit)
797 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
798 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
799 [1]
800 $ cat qux
801 0
802 0
803 1 baz:1
804 2 baz:2
805 <<<<<<< working copy: cb8df70ae185 - test: qux:4->4+
806 3+ baz:3
807 4+ baz:4
808 ||||||| base
809 3+ baz:3
810 4 baz:4
811 =======
812 3- baz:3
813 4 baz:4
814 >>>>>>> merge rev: 863de62655ef - test: baz:3+->3-
815 5
816 6
817 7
818 $ cat > qux <<EOF
819 > 0
820 > 0
821 > 1 baz:1
822 > 2 baz:2
823 > 3+ baz:3
824 > 4+ baz:4
825 > 5
826 > 6
827 > EOF
828 $ hg resolve --mark -q
829 $ rm qux.orig
714 $ hg ci -m 'merge from other side'
830 $ hg ci -m 'merge from other side'
715 created new head
831 created new head
716 $ hg log -T '{rev}: {desc}\n' -r 'followlines(qux, 5:7)'
832 $ hg log -T '{rev}: {desc}\n' -r 'followlines(qux, 5:7)'
@@ -1061,6 +1177,19 b' Issue5360: Deleted chunk in p1 of a merg'
1061 $ echo 3 >> a
1177 $ echo 3 >> a
1062 $ hg commit -m 3 -q
1178 $ hg commit -m 3 -q
1063 $ hg merge 2 -q
1179 $ hg merge 2 -q
1180 warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
1181 [1]
1182 $ cat a
1183 <<<<<<< working copy: 0a068f0261cf - test: 3
1184 1
1185 2
1186 3
1187 ||||||| base
1188 1
1189 2
1190 =======
1191 a
1192 >>>>>>> merge rev: 9409851bc20a - test: a
1064 $ cat > a << EOF
1193 $ cat > a << EOF
1065 > b
1194 > b
1066 > 1
1195 > 1
@@ -1069,6 +1198,7 b' Issue5360: Deleted chunk in p1 of a merg'
1069 > a
1198 > a
1070 > EOF
1199 > EOF
1071 $ hg resolve --mark -q
1200 $ hg resolve --mark -q
1201 $ rm a.orig
1072 $ hg commit -m m
1202 $ hg commit -m m
1073 $ hg annotate a
1203 $ hg annotate a
1074 4: b
1204 4: b
@@ -1,6 +1,8 b''
1 (this file is backported from core hg tests/test-annotate.t)
1 (this file is backported from core hg tests/test-annotate.t)
2
2
3 $ cat >> $HGRCPATH << EOF
3 $ cat >> $HGRCPATH << EOF
4 > [ui]
5 > merge = :merge3
4 > [diff]
6 > [diff]
5 > git=1
7 > git=1
6 > [extensions]
8 > [extensions]
@@ -11,8 +13,6 b''
11 > mainbranch=.
13 > mainbranch=.
12 > EOF
14 > EOF
13
15
14 $ HGMERGE=true; export HGMERGE
15
16 init
16 init
17
17
18 $ hg init repo
18 $ hg init repo
@@ -157,8 +157,34 b' annotate -nlf b'
157 created new head
157 created new head
158 $ hg merge
158 $ hg merge
159 merging b
159 merging b
160 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
160 warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
161 (branch merge, don't forget to commit)
161 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
162 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
163 [1]
164 $ cat b
165 a
166 a
167 a
168 <<<<<<< working copy: 5fbdc1152d97 - test: b2.1
169 b4
170 c
171 b5
172 ||||||| base
173 =======
174 b4
175 b5
176 b6
177 >>>>>>> merge rev: 37ec9f5c3d1f - test: b2
178 $ cat <<EOF > b
179 > a
180 > a
181 > a
182 > b4
183 > c
184 > b5
185 > EOF
186 $ hg resolve --mark -q
187 $ rm b.orig
162 $ hg ci -mmergeb -d '3 0'
188 $ hg ci -mmergeb -d '3 0'
163
189
164 annotate after merge
190 annotate after merge
@@ -247,15 +273,37 b' annotate after merge with -l'
247 > EOF
273 > EOF
248 $ hg ci -mc -d '3 0'
274 $ hg ci -mc -d '3 0'
249 created new head
275 created new head
276 BROKEN: 'a' was copied to 'b' on both sides. We should not get a merge conflict here
250 $ hg merge
277 $ hg merge
251 merging b
278 merging b
252 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
279 warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
253 (branch merge, don't forget to commit)
280 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
254 $ cat <<EOF >> b
281 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
282 [1]
283 $ cat b
284 <<<<<<< working copy: b80e3e32f75a - test: c
285 a
286 z
287 a
288 ||||||| base
289 =======
290 a
291 a
292 a
293 b4
294 c
295 b5
296 >>>>>>> merge rev: 64afcdf8e29e - test: mergeb
297 $ cat <<EOF > b
298 > a
299 > z
300 > a
255 > b4
301 > b4
256 > c
302 > c
257 > b5
303 > b5
258 > EOF
304 > EOF
305 $ hg resolve --mark -q
306 $ rm b.orig
259 $ echo d >> b
307 $ echo d >> b
260 $ hg ci -mmerge2 -d '4 0'
308 $ hg ci -mmerge2 -d '4 0'
261
309
@@ -745,6 +793,19 b' Issue5360: Deleted chunk in p1 of a merg'
745 $ echo 3 >> a
793 $ echo 3 >> a
746 $ hg commit -m 3 -q
794 $ hg commit -m 3 -q
747 $ hg merge 2 -q
795 $ hg merge 2 -q
796 warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
797 [1]
798 $ cat a
799 <<<<<<< working copy: 0a068f0261cf - test: 3
800 1
801 2
802 3
803 ||||||| base
804 1
805 2
806 =======
807 a
808 >>>>>>> merge rev: 9409851bc20a - test: a
748 $ cat > a << EOF
809 $ cat > a << EOF
749 > b
810 > b
750 > 1
811 > 1
@@ -753,6 +814,7 b' Issue5360: Deleted chunk in p1 of a merg'
753 > a
814 > a
754 > EOF
815 > EOF
755 $ hg resolve --mark -q
816 $ hg resolve --mark -q
817 $ rm a.orig
756 $ hg commit -m m
818 $ hg commit -m m
757 $ hg annotate a
819 $ hg annotate a
758 4: b
820 4: b
@@ -5,8 +5,6 b''
5 > perfhack=1
5 > perfhack=1
6 > EOF
6 > EOF
7
7
8 $ HGMERGE=true; export HGMERGE
9
10 $ hg init repo
8 $ hg init repo
11 $ cd repo
9 $ cd repo
12
10
@@ -7,8 +7,6 b''
7 > mainbranch=@
7 > mainbranch=@
8 > EOF
8 > EOF
9
9
10 $ HGMERGE=true; export HGMERGE
11
12 setup the server repo
10 setup the server repo
13
11
14 $ hg init repo-server
12 $ hg init repo-server
@@ -3,8 +3,6 b''
3 > fastannotate=
3 > fastannotate=
4 > EOF
4 > EOF
5
5
6 $ HGMERGE=true; export HGMERGE
7
8 $ hg init repo
6 $ hg init repo
9 $ cd repo
7 $ cd repo
10
8
General Comments 0
You need to be logged in to leave comments. Login now