Comment 1 for bug 691756

Revision history for this message
Andrew Bennetts (spiv) wrote : Re: unversioned files underneath a directory that is now a symlink cause bzrlib.errors.PathNotChild

A bit more information would be very helpful, your description is a bit hard to interpret.

Is this an accurate reproduction?

# create a master branch with a lib directory
cd /tmp
bzr init master
cd master
mkdir lib
bzr add
bzr ci -m "Add lib/ directory."
cd ..
# Make a checkout, change lib/ to a out-of-tree-symlink
bzr co master checkout
cd checkout
rm -r lib
mkdir ../lib
ln -s ../lib/ lib # backwards to your report, I think you made a typo?
cd ..
# make a change to lib/ in master
cd master
touch lib/new-file.txt
bzr add
bzr ci -m "Add a file to lib/"
cd ..
# update the checkout
cd checkout
bzr up

Does that match your situation?

Under bzr 2.2 this gives me your traceback.

With bzr trunk this gives me:

bzr: ERROR: Path "/tmp/lib/lib" is not a child of path "/tmp/checkout"

(The traceback was bug 98735.)

Which I think is accurate and fairly reasonable, although not as helpful as it could be. Do you disagree? bzr could probably be more explicit about why it is trying to access /tmp/lib, and perhaps also explain why it has to be a child of /tmp/checkout.

I can also imagine that perhaps bzr could re-add the directory under a new name (or rename the symlink instead?) and report some sort of conflict, rather than refusing to update at all. Is that what you expected?