merge produces huge unnecessary conflicts
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/
# 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 ;
)
tags: | added: conflicts merge |
Changed in bzr: | |
importance: | Undecided → Medium |
tags: | added: check-for-breezy |
tags: | removed: check-for-breezy |
tags: | added: reproduce-recipe |
Changed in brz: | |
status: | New → Triaged |
importance: | Undecided → Medium |
Still exists.