AttributeError on this_ie.children in MutableTree inside bzr add if there are hard links

Bug #303728 reported by kwhitefoot
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Incomplete
Undecided
Unassigned

Bug Description

kj@susan:~/development/LiveMaths/source/current/LiveMathsLiveLib$ bzr add
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 373, in run
    no_recurse, action=action, save=not dry_run)
  File "/usr/lib/python2.5/site-packages/bzrlib/mutabletree.py", line 52, in tree_write_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/mutabletree.py", line 432, in smart_add
    elif subf in this_ie.children:
AttributeError: children

bzr 1.5 on python 2.5.2 (linux2)
arguments: ['/usr/bin/bzr', 'add']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_GB.UTF-8'
plugins:
  bzrtools /usr/lib/python2.5/site-packages/bzrlib/plugins/bzrtools [1.5.0]
  gtk /usr/lib/python2.5/site-packages/bzrlib/plugins/gtk [0.93.0]
  launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
*** Bazaar has encountered an internal error.

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 303728] [NEW] bzr add crashes if there are hard links

On Sun, 2008-11-30 at 16:48 +0000, kwhitefoot wrote:
> Public bug reported:
>
> kj@susan:~/development/LiveMaths/source/current/LiveMathsLiveLib$ bzr add
> bzr: ERROR: exceptions.AttributeError: children

I'm not sure this is because of a hardlink situation, or because of a
bug we have fixed already. Can you try a more recent bzr please?

-Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.

Revision history for this message
kwhitefoot (kwhitefoot) wrote : Re: bzr add crashes if there are hard links

Does the same with bzr 1.9 (installed via Synaptic from deb http://ppa.launchpad.net/bzr/ubuntu hardy main).

I am dabbling in OpenOffice extensions which means that the source code that I want to put under version control has to be in the user's, my, openoffice directory.
I'm quite willing to believe that there is a better, or at least, other way to do this.
The current directory contains four hard links to files in
~/.openoffice.org3/user/basic/LiveMathsLiveLib/

kj@susan:~/development/LiveMaths/source/current/LiveMathsLiveLib$ bzr add
bzr: ERROR: exceptions.AttributeError: children

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 893, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 839, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 539, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 499, in run
    no_recurse, action=action, save=not dry_run)
  File "/usr/lib/python2.5/site-packages/bzrlib/mutabletree.py", line 52, in tree_write_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/mutabletree.py", line 467, in smart_add
    elif subf in this_ie.children:
AttributeError: children

bzr 1.9 on python 2.5.2 (linux2)
arguments: ['/usr/bin/bzr', 'add']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_GB.UTF-8'
plugins:
  bzrtools /usr/lib/python2.5/site-packages/bzrlib/plugins/bzrtools [1.9.1]
  gtk /usr/lib/python2.5/site-packages/bzrlib/plugins/gtk [0.95.0]
  launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
*** Bazaar has encountered an internal error.

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

Could you give us a tarball of the tree that causes this problem, or a smaller example that reproduces the problem?

I tried this and could not reproduce a crash:

mbp@lithe% bzr init foo
cd foo
/home/mbp/.bazaar/plugins/search/index.py:22: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5
dateCreated a standalone tree (format: pack-0.92)
bzr init foo 1.88s user 0.12s system 65% cpu 3.066 total
mbp@lithe% cd foo
mbp@lithe% date>a
mbp@lithe% ln a b
mbp@lithe% ln b c
mbp@lithe% bzr add
/home/mbp/.bazaar/plugins/search/index.py:22: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5
adding a
badding b
adding c
mbp@lithe% bzr ci -m "add stuff"
/home/mbp/.bazaar/plugins/search/index.py:22: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5
Committing to: /tmp/foo/
added a
added b
added c
Committed revision 1.

summary: - bzr add crashes if there are hard links
+ AttributeError on this_ie.children in MutableTree inside bzr add if
+ there are hard links
Changed in bzr:
status: New → Incomplete
Revision history for this message
Martin Pool (mbp) wrote :

Maybe ~kwhitefoot actually meant symlinks, not hard links, and this is a dupe of bug 192859?

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

I'll mark it as a dupe; if in fact this is caused by hardlinks and you can reproduce it, please let us know.

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.