[PATCH] better handling of symlinks in path
David Allouche
david at allouche.net
Sun Oct 9 21:43:50 BST 2005
Here is a patch that modifies branch._relpath and the associated
whitebox tests to more correctly handle symlinks in the paths leading to
the current tree.
The problem I faced is that when the current directory
is /foo/bar/gam/dev and /foo/gam is a symlink to /foo/bar/gam, then "bzr
cat /foo/gam/dev/fail" would faile with an error looking like:
[27610] Sat 18:06:38.343 ERROR: not a branch: path u'/foo/gam/dev/file'
is not within branch '/foo/bar/gam/dev'
So I made branch._relpath a little smarter with handling symlinks.
One trick though, is that symlinks must not be expanded when they are
the last element of the path, because need a way to refer to an
version-controlled symlink.
Another trick is that we need to handle trailing . and .. properly.
With this path, I can at last use bazaar.el to ediff my code.
--
-- ddaa
-------------- next part --------------
A non-text attachment was scrubbed...
Name: relpath-symlink.patch
Type: text/x-patch
Size: 5269 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051009/391b1866/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051009/391b1866/attachment.pgp
More information about the bazaar
mailing list