"bzr up" fails in checkout that replaces versioned directory with unversioned symlink to out-of-tree path
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Medium
|
Unassigned |
Bug Description
If you follow these steps, then on the final step you get: “bzr: ERROR: Path "/tmp/lib/lib" is not a child of path "/tmp/checkout"”:
# 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
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
(Note that with bzr 2.2.2 rather than trunk PathNotChild is a traceback; that's a separate bug.)
The reporter says: “reporting a conflict would be something that would seem reasonable to me. (Totally failing to do the update was not what I expected.)”
summary: |
- unversioned files underneath a directory that is now a symlink cause - bzrlib.errors.PathNotChild + "bzr up" fails in checkout that replaces versioned directory with + unversioned symlink to out-of-tree path |
description: | updated |
Changed in bzr: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
tags: | added: checkout conflicts |
tags: | added: symlink |
tags: | added: check-for-breezy |
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?