merge produces huge unnecessary conflicts

Bug #278346 reported by Matthew Fuller
2
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned
Breezy
Triaged
Medium
Unassigned

Bug Description

When a set of lines are changed on one side of a merge, and a "close enough" line is changed on the other, the entire block conflicts, which is extremely unhelpful. I've encountered this a large number of times, with slight variations (sometimes it's added lines on the 'far' side, sometimes deleted lines, sometimes a changed line, etc), but I suspect it comes down to the same root cause. This is insensitive to the merge type chosen. You essentially end up having to do the whole merge manually, which kinda defeats the purpose.

#!/bin/sh -x
bzr="/usr/local/bin/bzr --no-aliases --no-plugins"

# Initial branch
${bzr} init A
(
 cd A ;

 # Numbers
 touch nums
 for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do
  echo ${i} >> nums
 done

 # Put it in place
 ${bzr} add ;
 ${bzr} ci -m 'nums' ;

 # Add another line
 echo 21 >> nums ;
 ${bzr} ci -m '21' ;
)

# New branch from rev 1
${bzr} branch -r1 A B
(
 cd B ;

 # Indent each line
 sed "s/^/\ /" nums > tmp ;
 mv tmp nums ;
 ${bzr} ci -m 'indent' ;

 # Now merge in the second rev, which SHOULD just add a line to the
 # end
 ${bzr} merge --weave ;

 # Entire file conflicts. How 'helpful'.
 cat nums ;
)

Revision history for this message
Matthew Fuller (fullermd) wrote :

Still exists.

Changed in bzr:
status: New → Confirmed
Martin Pool (mbp)
tags: added: conflicts merge
Changed in bzr:
importance: Undecided → Medium
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
tags: removed: check-for-breezy
tags: added: reproduce-recipe
Changed in brz:
status: New → Triaged
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.