bzr resolve --take-other bzr: ERROR: Tree transform is malformed [('duplicate', None, 'new-1', None)]

Bug #638451 reported by Karoly Negyesi
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
High
Vincent Ladeuil

Bug Description

Tue 2010-09-14 23:02:24 +0200
0.136 bazaar version: 2.2.0
0.137 bzr arguments: [u'resolve', u'--take-other']
0.165 looking for plugins in /home/chx/.bazaar/plugins
0.249 looking for plugins in /usr/lib/python2.6/dist-packages/bzrlib/plugins
0.290 encoding stdout as sys.stdout encoding 'UTF-8'
0.374 opening working tree '/home/chx/examiner/trunk'
0.513 Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 911, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1111, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 689, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 704, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/conflicts.py", line 160, in run
    resolve(tree, file_list, action=action)
  File "/usr/lib/python2.6/dist-packages/bzrlib/conflicts.py", line 189, in resolve
    conflict._do(action, tree)
  File "/usr/lib/python2.6/dist-packages/bzrlib/conflicts.py", line 415, in _do
    meth(tree)
  File "/usr/lib/python2.6/dist-packages/bzrlib/conflicts.py", line 549, in action_take_other
    winner='other')
  File "/usr/lib/python2.6/dist-packages/bzrlib/conflicts.py", line 444, in _resolve_with_cleanups
    op.run_simple(tt, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/conflicts.py", line 508, in _resolve
    tt.apply()
  File "/usr/lib/python2.6/dist-packages/bzrlib/transform.py", line 1544, in apply
    self._check_malformed()
  File "/usr/lib/python2.6/dist-packages/bzrlib/transform.py", line 512, in _check_malformed
    raise MalformedTransform(conflicts=conflicts)
MalformedTransform: Tree transform is malformed [('duplicate', None, 'new-1', None)]

Bazaar (bzr) 2.2.0
  Python interpreter: /usr/bin/python 2.6.5
  Python standard library: /usr/lib/python2.6
  Platform: Linux-2.6.31-21-generic-x86_64-with-Ubuntu-10.04-lucid

Tags: conflicts

Related branches

Revision history for this message
Karoly Negyesi (karoly) wrote :

mgz asked me to describe what happened. So this is a Drupal based site. Which means, I took a few months old lp:drupal took a few patches out of the Drupal issue queue and applied them. Now some of these are in the current lp:drupal but of course a bit evolved, some are not. So I checked out lp:drupal , reapplied our changes and wanted to merge back in lp:~examiner-dev/examiner/trunk and wanted to say, the newer core files are the correct ones and then what you see up has happened.

Vincent Ladeuil (vila)
Changed in bzr:
status: New → Confirmed
importance: Undecided → Medium
tags: added: conflicts
Revision history for this message
Martin von Gagern (gagern) wrote :

Steps to reproduce:

bzr init a
echo a > a/foo
bzr add a/foo
bzr ci -m x a
bzr clone a b
echo b > b/foo
bzr ci -m x b
echo c > a/foo
bzr ci -m x a
bzr merge -d a b
bzr resolve --take-other a/foo

Revision history for this message
Martin von Gagern (gagern) wrote :

Did some (manual) bisecting with the above script. Seems 4597.7.11 [1] introduced the breakage. Therefore this bug is probably related to the fix for bug #531967.

[1] http://bazaar.launchpad.net/~bzr-pqm/bzr/bzr.dev/revision/4597.7.11

Revision history for this message
Vincent Ladeuil (vila) wrote :

So, the traceback is now fixed in trunk (see bug #646961, same root cause, different failure mode).

But --take-other for a text conflict is still not implemented, I'll keep this bug as a target while doing so.

Changed in bzr:
assignee: nobody → Vincent Ladeuil (vila)
status: Confirmed → In Progress
Vincent Ladeuil (vila)
Changed in bzr:
importance: Medium → High
Revision history for this message
Vincent Ladeuil (vila) wrote :

The associated branch fixes the bug but I'm not sure we want to keep the --take-other to mean 'ignore the suceesfully merged changes and take OTHER unconditionally'.

I'll discuss it in the merge proposal but I'll appreciate feedback in the mean time if you can test this fix *and* voice your pov about calling it --restore-other instead (which impacts the the use of 'bzr resolve <glob> --take-other of course).

Revision history for this message
Vincent Ladeuil (vila) wrote :

Oh, and raising the importance to High *because* the workflow is impacted and we need to settle quickly on this.

Vincent Ladeuil (vila)
Changed in bzr:
milestone: none → 2.3b5
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.