Incorrect merge - Lines missing inside conflict markers
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Medium
|
Unassigned |
Bug Description
I have been experiencing an incorrect merge in some circumstances - lines are missing inside the conflict markers, such that chosing entirely one branch of the conflict markers produces code with missing parts.
Here is a reproducer:
First, a sample branch (lp:~maxb/bzr/odd-merge-reproducer):
maxb@z61p:
3: Max Bowsher 2010-08-06 Eliminate tab character.
2: Max Bowsher 2010-08-06 Drop RejectedException.
1: Max Bowsher 2010-08-06 Base.
r1 adds a file
r2 looks like this:
maxb@z61p:
=== modified file 'MergeIssue.java'
--- MergeIssue.java 2010-08-06 00:53:13 +0000
+++ MergeIssue.java 2010-08-06 00:54:24 +0000
@@ -3,7 +3,7 @@
public class MergeIssue extends BaseClass {
@Override
- public void filterDown(Message msg, Resources res) throws RejectedException, BreakoutException {
+ public void filterDown(Message msg, Resources res) throws BreakoutException {
}
r3 looks like this (it changes a single tab character into four spaces):
=== modified file 'MergeIssue.java'
--- MergeIssue.java 2010-08-06 00:54:24 +0000
+++ MergeIssue.java 2010-08-06 00:55:28 +0000
@@ -4,7 +4,7 @@
@Override
public void filterDown(Message msg, Resources res) throws BreakoutException {
- if(msg.
+ if(msg.
}
Now, the merge I'm doing is to branch r1 and then to try to cherrypick
r3 on top of that:
maxb@z61p:
Branched 1 revision(s).
maxb@z61p:
maxb@z61p:
M MergeIssue.java
Text conflict in MergeIssue.java
1 conflicts encountered.
Now, the conflict is expected. What's wrong, is that the conflict
markers look like this:
public class MergeIssue extends BaseClass {
@Override
<<<<<<< TREE
public void filterDown(Message msg, Resources res) throws RejectedException, BreakoutException {
||||||| BASE-REVISION
=======
>>>>>>> MERGE-SOURCE
}
*Observe that if I delete the 'TREE' section in its entirety and keep the 'MERGE-SOURCE' or 'BASE-REVISION' section in its entirety, there is a line missing from
the result!*
Changed in bzr: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
tags: | added: check-for-breezy |
Similar glitch: http:// paste.ubuntu. com/501267/