##// 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 6 init
4 7
@@ -210,8 +213,34 b' annotate -nlf b'
210 213 created new head
211 214 $ hg merge
212 215 merging b
213 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
214 (branch merge, don't forget to commit)
216 warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
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 244 $ hg ci -mmergeb -d '3 0'
216 245
217 246 annotate after merge
@@ -244,15 +273,37 b' annotate after merge with -l'
244 273 > EOF
245 274 $ hg ci -mc -d '3 0'
246 275 created new head
276 BROKEN: 'a' was copied to 'b' on both sides. We should not get a merge conflict here
247 277 $ hg merge
248 278 merging b
249 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
250 (branch merge, don't forget to commit)
251 $ cat <<EOF >> b
279 warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
280 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
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 301 > b4
253 302 > c
254 303 > b5
255 304 > EOF
305 $ hg resolve --mark -q
306 $ rm b.orig
256 307 $ echo d >> b
257 308 $ hg ci -mmerge2 -d '4 0'
258 309
@@ -695,8 +746,41 b' merge'
695 746 27: baz:3+->3-
696 747 $ hg merge 25
697 748 merging baz and qux to qux
698 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
699 (branch merge, don't forget to commit)
749 warning: conflicts while merging qux! (edit, then use 'hg resolve --mark')
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 784 $ hg ci -m merge
701 785 $ hg log -T '{rev}: {desc}\n' -r 'followlines(qux, 5:7)'
702 786 16: baz:0
@@ -709,8 +793,40 b' merge'
709 793 $ hg up 25 --quiet
710 794 $ hg merge 27
711 795 merging qux and baz to qux
712 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
713 (branch merge, don't forget to commit)
796 warning: conflicts while merging qux! (edit, then use 'hg resolve --mark')
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 830 $ hg ci -m 'merge from other side'
715 831 created new head
716 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 1177 $ echo 3 >> a
1062 1178 $ hg commit -m 3 -q
1063 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 1193 $ cat > a << EOF
1065 1194 > b
1066 1195 > 1
@@ -1069,6 +1198,7 b' Issue5360: Deleted chunk in p1 of a merg'
1069 1198 > a
1070 1199 > EOF
1071 1200 $ hg resolve --mark -q
1201 $ rm a.orig
1072 1202 $ hg commit -m m
1073 1203 $ hg annotate a
1074 1204 4: b
@@ -1,6 +1,8 b''
1 1 (this file is backported from core hg tests/test-annotate.t)
2 2
3 3 $ cat >> $HGRCPATH << EOF
4 > [ui]
5 > merge = :merge3
4 6 > [diff]
5 7 > git=1
6 8 > [extensions]
@@ -11,8 +13,6 b''
11 13 > mainbranch=.
12 14 > EOF
13 15
14 $ HGMERGE=true; export HGMERGE
15
16 16 init
17 17
18 18 $ hg init repo
@@ -157,8 +157,34 b' annotate -nlf b'
157 157 created new head
158 158 $ hg merge
159 159 merging b
160 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
161 (branch merge, don't forget to commit)
160 warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
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 188 $ hg ci -mmergeb -d '3 0'
163 189
164 190 annotate after merge
@@ -247,15 +273,37 b' annotate after merge with -l'
247 273 > EOF
248 274 $ hg ci -mc -d '3 0'
249 275 created new head
276 BROKEN: 'a' was copied to 'b' on both sides. We should not get a merge conflict here
250 277 $ hg merge
251 278 merging b
252 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
253 (branch merge, don't forget to commit)
254 $ cat <<EOF >> b
279 warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
280 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
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 301 > b4
256 302 > c
257 303 > b5
258 304 > EOF
305 $ hg resolve --mark -q
306 $ rm b.orig
259 307 $ echo d >> b
260 308 $ hg ci -mmerge2 -d '4 0'
261 309
@@ -745,6 +793,19 b' Issue5360: Deleted chunk in p1 of a merg'
745 793 $ echo 3 >> a
746 794 $ hg commit -m 3 -q
747 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 809 $ cat > a << EOF
749 810 > b
750 811 > 1
@@ -753,6 +814,7 b' Issue5360: Deleted chunk in p1 of a merg'
753 814 > a
754 815 > EOF
755 816 $ hg resolve --mark -q
817 $ rm a.orig
756 818 $ hg commit -m m
757 819 $ hg annotate a
758 820 4: b
@@ -5,8 +5,6 b''
5 5 > perfhack=1
6 6 > EOF
7 7
8 $ HGMERGE=true; export HGMERGE
9
10 8 $ hg init repo
11 9 $ cd repo
12 10
@@ -7,8 +7,6 b''
7 7 > mainbranch=@
8 8 > EOF
9 9
10 $ HGMERGE=true; export HGMERGE
11
12 10 setup the server repo
13 11
14 12 $ hg init repo-server
@@ -3,8 +3,6 b''
3 3 > fastannotate=
4 4 > EOF
5 5
6 $ HGMERGE=true; export HGMERGE
7
8 6 $ hg init repo
9 7 $ cd repo
10 8
General Comments 0
You need to be logged in to leave comments. Login now