brz and symlinks inside branch checkout
Jelmer Vernooij
jelmer at jelmer.uk
Fri Jun 1 00:34:19 UTC 2018
On Thu, May 31, 2018 at 09:40:53AM +0200, Martin Steigerwald wrote:
> I have a file in a directory inside my home directory that is linked to
> ecryptfs encrypted Private directory and thus is in a different
> filesystem than ~.
>
> brz 3.0.0~bzr6964-1 does not work with this:
>
> %> brz revert .symlink-to-directory-in-Private/somefile
> M Private/.symlink-to-directory-in-Private/somefile
> brz: ERROR: Unprintable exception TransformRenameFailed: dict={'errno':
> 18, 'from_path': u'/home/someuser/Private/.symlink-to-directory-in-
> Private/somefile', 'to_path': u'/home/someuser/.bzr/checkout/limbo/
> new-1', 'why': '[Errno 18] Ung\xc3\xbcltiger Link \xc3\xbcber Ger
> \xc3\xa4tegrenzen hinweg'}, fmt='Failed to rename %(from_path)s to %
> (to_path)s: %(why)s', error=UnicodeDecodeError('ascii', '[Errno 18] Ung
> \xc3\xbcltiger Link \xc3\xbcber Ger\xc3\xa4tegrenzen hinweg', 14, 15,
> 'ordinal not in range(128)')
>
> (german text means "invalid cross-device link")
>
> %> LANG=C brz revert .symlink-to-directory-in-Private/somefile
> M Private/.symlink-to-directory-in-Private/somefile
> brz: ERROR: Failed to rename /home/someuser/Private/.symlink-to-
> directory-in-Private/somefile to /home/someuser/.bzr/checkout/limbo/
> new-1: [Errno 18] Invalid cross-device link
>
> Is there any way around this limitation that a repository needs to
> reside on one and the same filesystem, any way to handle sym links
> transparently?
There appear to be two issues here:
* String type inconsistency; this should be fixed as part of the
Python3 porting effort
* http://pad.lv/411068; It looks like on Python3, we could
switch over to using os.replace rather than os.rename to address
pad.lv/411068.
On Python2.7, we could just add a osutils.replace that provides the
same functionality as os.replace does in python3 ?
Jelmer
--
Jelmer Vernooij <jelmer at jelmer.uk>
PGP Key: https://www.jelmer.uk/D729A457.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/bazaar/attachments/20180601/f41e8090/attachment.sig>
More information about the bazaar
mailing list