Comment 2 for bug 242522

Revision history for this message
Parth Malwankar (parthm) wrote :

I looked into this a bit. The reason for the failure, as is apparent from the above report, is that the target filesystem does not support symbolic links.
In transform.create_symlink bazaar tries to create a symbolic link as shown below:
        if has_symlinks():
            os.symlink(target, self._limbo_name(trans_id))
            unique_add(self._new_contents, trans_id, 'symlink')
where has_symlink is merely a check to see if the os module has a symlink attribute. Hence, a target not supporting symlinks is not handled.

It may be good to simply ignore symlinks in a case like this. This approach would be similar to the patch under review for bug #81689.
https://code.launchpad.net/~parthm/bzr/81689-win-symlink-warning
It should be fairly straightforward to catch the OSError errno 1 that come up in the above case and use this approch. Would appreciate any suggestions/comments on this approach.