[Bug 151731] bzr merge puts entire ChangeLog from other branch into conflict, rather than just the diff cherry-picked

James Westby jw+debian at jameswestby.net
Fri Oct 12 17:59:38 BST 2007


Hi all,

I've looked a little in to the cause of the following, and while it
seems that what bzr is doing is correct in some way it could perhaps be
a little more helpful.

The case is a cherry pick of a revision that contains the current tip in
it's history. The base revision is then taken as the revision before the
one that is being cherry-picked. The 'this' and 'other' revisions are
the tip and the revision that is being picked respectively.

The merge ends up with a large conflicting region in ChangeLog,
consisting of all the lines that were added in further development.
Consider if we start with 'this' as

   a

and we want to cherry pick

   a
   b
   c

taking

   a
   b

as the base. bzr would currently mark 'b\nc' as conflicted, where Scott
would just like 'c' to be inserted.

This happens as the 'base' text doesn't include lines in the 'this'
text, so the diff algorithm just considers them changes in 'other'. It
seems like this situation could perhaps be improved if there was a
special case put in for where 'base' is a descendant of 'this', with the
merge algorithm considering lines that are changed in 'base' compared to
'this' differently than it does currently.

Is this feasible? Is it going to open up a whole can of worms?

Thanks,

James

On (11/10/07 22:00), Scott James Remnant wrote:
> Public bug reported:
> 
> Cherry picking changes from trunk into a stable branch, since the
> changes are bug fixes useful for a new stable release.
> 
> Each and every time, I get a conflict in ChangeLog - which isn't
> necessarily surprising given the different text - what is surprising is
> that conflict includes the entire difference between the two branches of
> the ChangeLog.
> 
> This makes me extremely nervous as merge is doing more than what it's
> told to do!
> 
> Example:
> 
>  $ bzr branch -r 665 http://bazaar.launchpad.net/~keybuk/upstart/main upstart
>  $ cd upstart
>  $ bzr merge -r 725..726 http://bazaar.launchpad.net/~keybuk/upstart/main
> 
> ChangeLog will have conflicted, but look at the conflict!  The ChangeLog
> added for that merge should have only been 2 lines, not 200!
> 
> ** Affects: bzr
>      Importance: Undecided
>          Status: New
> 
> -- 
> bzr merge puts entire ChangeLog from other branch into conflict, rather than just the diff cherry-picked
> https://bugs.launchpad.net/bugs/151731
> You received this bug notification because you are a member of Bazaar
> Developers, which is the registrant for Bazaar.
> 

-- 
  James Westby   --    GPG Key ID: B577FE13    --     http://jameswestby.net/
  seccure key - (3+)k7|M*edCX/.A:n*N!>|&7U.L#9E)Tu)T0>AM - secp256r1/nistp256



More information about the bazaar mailing list