View Ticket
Not logged in
Ticket UUID: 98b63bd31671500627c21c1d28326057e0fc93d2
Title: 3-way merge drops line
Status: Fixed Type: Code_Defect
Severity: Severe Priority:
Subsystem: Resolution: Fixed
Last Modified: 2009-03-21 16:25:37
Version Found In: bc857ecd92
Description & Comments:
I noticed that during a merge a line from the branch I was merging from was missing between the conflict markers. A bit of analysis gave me the test case generated by a shell script at the end of this ticket.

Note than the line containing 'f' in v1 is completely missing in the merge result. Also, the line containing 'a' should either appear once outside or twice inside the conflict markers.

#!/bin/sh
for l in 1 2 3 4 5 6 7 8 9; do echo $l; done > base
for l in 1 2 3 4 5 a b c d e f 6 7 8 9; do echo $l; done > v1
for l in 1 2 3 4 5 a b c x y z 6 7 8 9; do echo $l; done > v2
fossil test-3-way-merge base v1 v2 result

anonymous claiming to be ge@weijers.org added on 2009-03-20 23:01:13:
It seems like commit e45d478f0c took care of this bug too, the test case I posted is now handled correctly.

I'll do some more testing but it looks good.


drh added on 2009-03-20 23:26:11:
There are yet more bugs in the 3-way merge. I'm still working on it.


drh added on 2009-03-21 16:25:37:
Fixed in check-in 83566f24241a01bedbf89d8ca068c7c1b926b4f0