Crashes on "bzr add /path/<symlink>/*"

Bug #389295 reported by yurx cherio
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned

Bug Description

In the command below "./perlovka/nautilus-scripts/bin" is a symlink to a folder.

================================================
yuri@linur:~/dev/workspaces$ bzr add ./perlovka/nautilus-scripts/bin/*
adding perlovka/nautilus-scripts/bin/_
bzr: ERROR: exceptions.AttributeError: children

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 729, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 924, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 560, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 598, in run
    no_recurse, action=action, save=not dry_run)
  File "/usr/lib/python2.6/dist-packages/bzrlib/mutabletree.py", line 52, in tree_write_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/mutabletree.py", line 406, in smart_add
    added.extend(_add_one_and_parent(self, inv, None, rf, kind, action))
  File "/usr/lib/python2.6/dist-packages/bzrlib/mutabletree.py", line 635, in _add_one_and_parent
    _add_one(tree, inv, parent_ie, path, kind, action)
  File "/usr/lib/python2.6/dist-packages/bzrlib/mutabletree.py", line 652, in _add_one
    inv.add(entry)
  File "/usr/lib/python2.6/dist-packages/bzrlib/inventory.py", line 1261, in add
    if entry.name in parent.children:
AttributeError: children

bzr 1.15 on python 2.6.2 (linux2)
arguments: ['/usr/bin/bzr', 'add', './perlovka/nautilus-scripts/bin/_', './perlovka/nautilus-scripts/bin/archive', './perlovka/nautilus-scripts/bin/clipboard.pl', './perlovka/nautilus-scripts/bin/create-duplicate.pl', './perlovka/nautilus-scripts/bin/create-file.pl', './perlovka/nautilus-scripts/bin/create-folder.pl', './perlovka/nautilus-scripts/bin/create-link.pl', './perlovka/nautilus-scripts/bin/diff.pl', './perlovka/nautilus-scripts/bin/download-pictures.pl', './perlovka/nautilus-scripts/bin/misc', './perlovka/nautilus-scripts/bin/rename-datestamp.pl', './perlovka/nautilus-scripts/bin/rename-timestmp.pl', './perlovka/nautilus-scripts/bin/search-here.pl', './perlovka/nautilus-scripts/bin/sudo-gedit-open.pl', './perlovka/nautilus-scripts/bin/terminal']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  bzrtools /usr/lib/python2.6/dist-packages/bzrlib/plugins/bzrtools [1.15]
  launchpad /usr/lib/python2.6/dist-packages/bzrlib/plugins/launchpad [1.15]
  netrc_credential_store /usr/lib/python2.6/dist-packages/bzrlib/plugins/netrc_credential_store [1.15]
  xmloutput /usr/lib/python2.6/dist-packages/bzrlib/plugins/xmloutput [0.8.3]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 389295] [NEW] Crashes on "bzr add /path/<symlink>/*"

We may have this in the bug database already. However..

 status confirmed
 importance medium

The cause is that symlinks are pointers, not containers. There are two
possibilities:
 a) - you want to version files not inside your tree.
 b) - you want to version files inside your tree already.

For b), just add them at the paths they are actually at.
For a), you can't version files outside your tree. You need to either
make your tree start higher up the filesystem, or copy the files into
the tree.

We should change bzr to not crash and instead explain better, when this
is attempted.

-Rob

Changed in bzr:
importance: Undecided → Medium
status: New → Confirmed
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.