"Error: Not a branch" when trying to revert a symlink
Bug #236149 reported by
Daniel Hahler
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Low
|
Unassigned |
Bug Description
I cannot revert a symlink change, which causes trouble as seen in bug 183831.
I've changed "blogs/media" to be a symlink, but cannot revert it:
daniel@base { ~/www/hahler_de.bzr }
$ bzr st | grep "kind changed" -A1
kind changed:
blogs/media (directory => symlink)
daniel@base { ~/www/hahler_de.bzr }
$ bzr revert blogs/media
bzr: ERROR: Not a branch: "/home/
This appears to be caused by some realpath related change, which is probably the reason for a lot of other (symlink) related errors.
It is maybe a dupe of bug 124859 - but after all just another error caused by incorrect symlink handling somewhere.
This is with bzr 1.3.1 on Ubuntu Hardy.
description: | updated |
Changed in bzr: | |
status: | Triaged → Confirmed |
tags: | added: revert symlink |
tags: | added: check-for-breezy |
To post a comment you must log in.
This is because we are dereferencing the symlink, trying to find the branch you are working on.
If you did:
bzr revert blogs
It would recursively revert everything underneath, which will naturally revert that file.
Or you could
rm blogs/media
ln foo blogs/media
bzr revert blogs/media
Certainly this is still a bug, but it is the same bug as bug #128562. Just that we dereference symlinks when trying to open a branch. (Note that we need to dereference some symlinks, since /foo/bar/baz we should presumably dereference foo and bar, but not baz.