merge preview doesn't handle kind change from directory to symlink: "exceptions.AttributeError: children"

Bug #240762 reported by Daniel Hahler
2
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned

Bug Description

"bzr merge --preview --force" fails with the following traceback.
I have to use "--force" because of local changes (workaround advised in bug 207512).

Additionally, this crash seems to leave the lock behind.

I've archived the branch(es), in case you need more information.

$ bzr merge --preview --force
Merging from remembered location /home/daniel/src/b2evo/blueyed/
bzr: ERROR: exceptions.AttributeError: children

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 846, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 797, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 499, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 2919, in run
    return self._do_preview(merger)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 2930, in _do_preview
    tt = tree_merger.make_preview_transform()
  File "/usr/lib/python2.5/site-packages/bzrlib/merge.py", line 540, in make_preview_transform
    self._compute_transform()
  File "/usr/lib/python2.5/site-packages/bzrlib/merge.py", line 569, in _compute_transform
    lambda t, c: conflict_pass(t, c, self.other_tree))
  File "/usr/lib/python2.5/site-packages/bzrlib/transform.py", line 2016, in resolve_conflicts
    conflicts = tt.find_conflicts()
  File "/usr/lib/python2.5/site-packages/bzrlib/transform.py", line 580, in find_conflicts
    self._add_tree_children()
  File "/usr/lib/python2.5/site-packages/bzrlib/transform.py", line 611, in _add_tree_children
    list(self.iter_tree_children(parent_id))
  File "/usr/lib/python2.5/site-packages/bzrlib/transform.py", line 1354, in iter_tree_children
    for child in self._tree.inventory[file_id].children.iterkeys():
AttributeError: children

bzr 1.5 on python 2.5.2 (linux2)
arguments: ['/usr/bin/bzr', 'merge', '--preview', '--force']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'de_DE.UTF-8'
plugins:
  builddeb /usr/lib/python2.5/site-packages/bzrlib/plugins/builddeb [0.92.0dev0]
  bzrtools /usr/lib/python2.5/site-packages/bzrlib/plugins/bzrtools [1.5.0]
  gtk /usr/lib/python2.5/site-packages/bzrlib/plugins/gtk [0.94.0]
  launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
  qbzr /usr/lib/python2.5/site-packages/bzrlib/plugins/qbzr [0.9.0]
  rebase /usr/lib/python2.5/site-packages/bzrlib/plugins/rebase [0.3.0]

Tags: merge
Revision history for this message
James Westby (james-w) wrote :

Hi,

Thanks for the bug report. Have any kind changes
occured between the two branches? That is, has a directory
changed to a file in one branch?

Thanks,

James

Revision history for this message
John A Meinel (jameinel) wrote :

If I was guessing, I would actually say a directory became a symlink.

Revision history for this message
Daniel Hahler (blueyed) wrote : Re: [Bug 240762] Re: "bzr merge --preview --force" fails with "exceptions.AttributeError: children"

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> If I was guessing, I would actually say a directory became a symlink.

Yes.

In the target branch (where I wanted to merge into), a directory has
been changed into a symlink.

- --
http://daniel.hahler.de/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIWXeifAK/hT/mPgARAuFvAJ9ygzhVJhVwV8YAQpxarYoqceUrVwCfSMnv
N766uHk7U2jTnl7wv2P2sk0=
=Rip9
-----END PGP SIGNATURE-----

Revision history for this message
James Westby (james-w) wrote : Re: "bzr merge --preview --force" fails with "exceptions.AttributeError: children"

Hi,

Thanks for the information. I'm confirming, as while I haven't
taken the time to reproduce it, it does sound reasonable.

Thanks,

James

Changed in bzr:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Rick McBride (rmcbride) wrote :

I ran into this as well after changing several directories to symlinks in a branch I was working on for ubunet. I got this while attempting to bzr commit but the behavior is otherwise identical

Revision history for this message
Martin Pool (mbp) wrote :

similar to bug 192859 but not a dupe

Jelmer Vernooij (jelmer)
tags: added: merge
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
tags: removed: check-for-breezy
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.