[MERGE] mv accepts paths containing symlinks #66964
Aaron Bentley
aaron.bentley at utoronto.ca
Fri Oct 20 13:03:44 BST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi all,
Currentley, bzr commands that accept filenames don't traverse symlinks.
So if you have
foo/bar (directory)
baz (symlink -> foo)
you cannot specify "bzr mv baz/mar", even though you can with normal
UNIX mv. Futhermore, the crash is really ugly. This bundle
1. changes path2id so that it returns None if you specify a path that
contains a non-directory as a parent directory, because path2id returns
None if the path doesn't exist.
2. runs osutils.realpath on all input paths, in such a way that paths
*to* symlinks are not adjusted, but paths *through* symlinks are adjusted.
This only works for the current working tree, not for RevisionTrees,
etc. Attempting to solve all of them at once proved very difficult, so
I think this is the best solution for now, and a considerable
improvement over what we had.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFOLsg0F+nu1YWqI0RArRMAJ9fzeOZYh0W3FwO2cvrAlJHeo3pdACeP2Vi
hrEzyOYe1/f/GV4/9i5BFPs=
=9TQ1
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: symlink-paths.patch
Type: text/x-patch
Size: 6620 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20061020/49f4430e/attachment.bin
More information about the bazaar
mailing list