brz and symlinks inside branch checkout

Martin Steigerwald martin at lichtvoll.de
Fri Jun 1 06:57:23 UTC 2018


Hi Jelmer.

Thanks for your response.

Jelmer Vernooij - 01.06.18, 02:34:
> 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

This is a minor thing I seem to be able to work-around by using LANG=en 
or so.

> * 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 ?

On Debian Sid brz 3.0.0~bzr6964-1 still depends on python 2.7:

% head -1 /usr/bin/brz
#! /usr/bin/python
% /usr/bin/python --version
Python 2.7.15

Thanks,
-- 
Martin





More information about the bazaar mailing list