Failing to bzr resolve multiple conflicts bzr: ERROR: Tree transform is malformed [('duplicate id', 'new-74', 'new-1')]

Bug #688101 reported by Didier Roche-Tolomelli
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
High
Vincent Ladeuil

Bug Description

When trying to merge between lp:nux (rev 151) and lp:~unity-team/nux/packaging (rev 141), I get a lot of conflicts.

To resolve that, I wanted to:
bzr resolve --take-other
bzr: ERROR: Tree transform is malformed [('duplicate id', 'new-74', 'new-1')]

getting that with bzr version in natty (2.3b3) and trunk:
$ ./bzr --version
Bazaar (bzr) 2.3.0dev5
  from bzr checkout /home/didrocks/sandbox/bzr
    revision: 5563
    revid: <email address hidden>
    branch nick: bzr
  Python interpreter: /usr/bin/python 2.6.6
  Python standard library: /usr/lib/python2.6
  Platform: Linux-2.6.37-8-generic-i686-with-Ubuntu-11.04-natty
  bzrlib: /home/didrocks/sandbox/bzr/bzrlib
  Bazaar configuration: /home/didrocks/.bazaar
  Bazaar log file: /home/didrocks/.bzr.log

Tags: conflicts udd

Related branches

Vincent Ladeuil (vila)
description: updated
Changed in bzr:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Vincent Ladeuil (vila)
Revision history for this message
Vincent Ladeuil (vila) wrote :

There are multiple bugs here:
- bzr resolve tries to work on multiple conflicts involving the same file with catastrophic results,
- --take-other wasn't the real intent here [1],
- while investigating I encountered several tracebacks even when trying to resolve a single conflict (I'll file specific bugs for that).

[1] Many conflicts occurred because some files were deleted in the packaging branch for various (valid) reasons but modified in the trunk. All of them, in this case, need to be resolved with --take-this (i.e. keep the file deleted, ignore the modifications).

This means that the blank 'bzr resolve --take-xxx' is too broad and bzr probably needs to provides a way to set the resolve action at the file or directory level so that 'bzr resolve --auto' can respect these settings.

tags: added: conflicts udd
Revision history for this message
Vincent Ladeuil (vila) wrote :

Oh, for the record, 62 conflicts need to be resolved here, so even resolving them one by one manually just doesn't scale, especially considering that the previous, successful, merge occurred one *week* ago.

Vincent Ladeuil (vila)
summary: - bzr: ERROR: Tree transform is malformed [('duplicate id', 'new-74',
- 'new-1')]
+ Failing to bzr resolve multiple conflicts bzr: ERROR: Tree transform is
+ malformed [('duplicate id', 'new-74', 'new-1')]
Vincent Ladeuil (vila)
Changed in bzr:
status: Confirmed → In Progress
Revision history for this message
Vincent Ladeuil (vila) wrote :

I've got a fix in the pipe.

The root issue is that we generate two conflicts involving the same file-id in some circumstances where a single one should be enough. The symptom here is therefore a fallout.

The circumstances are a file is deleted in one branch and renamed *and* modified in the other. In this case we generate a PathConflict for the deleted/renamed part and a ContentsConflict for the deleted/modified part. The later should be enough.

The fix I have filters out the path conflicts when there is a corresponding contents conflict (since it should be enough for the resolution needs in all cases). I have to write tests to verify I'm not missing some edge cases here. I also have to check whether the user get sufficient feedback to realize the file has also been renamed (which may occur before, after or at the same time as the modifications) but that may not be relevant here.

Vincent Ladeuil (vila)
Changed in bzr:
milestone: none → 2.4b5
status: In Progress → Fix Released
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.