[rfc] Proposal: fake symlinks support on windows

Aaron Bentley aaron.bentley at utoronto.ca
Wed May 17 22:26:43 BST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alexander Belchenko wrote:
> OK. I've update this specification and write first version of code to
> deal with symlinks on windows in cygwin format.
> 
>> That sounds doable.  It's nice that it will work with cygwin's symlink
>> implementation, though of course cygwin doesn't need special support
>> from bzr.
> 
> 
> Now I have some questions about how to implement symlinks support. Your
> note about WorkingTree and access to faked symlinks from another OS will
> guide me to the thought that we need to have some different sorts of
> WorkingTree (WT):
> 
> - universal WT for all platforms, when there is no symlinks in tree
> - Unix WT with unix symlinks
> - Windows WT with cygwin symlinks
> - Cygwin WT with cygwin symlinks of 2 kinds (symlink to file as plain
> file, and symlink to directory is windows shortcut)

I was proposing two types of tree: fake-symlink tree and unix symlink tree.

Under cygwin, we could use the Windows handling, and this would be
better than the normal Cygwin handling, because it wouldn't create
shortcuts.  I am quite confident that treating 'foo.lnk' as 'foo' will
lead to problems sooner or later.

> - MacOS WT ??? (I know *nothing* about Mac OS)

I think we can treat Macs as unix for this.

> And access from one system to WT checked out on another system should be
> granted only with read-only restrictions. 

Why?

> Actually it's should depends
> on the filesystem in which WT live. But detecting filesystem type might
> be non-trivial problem. So, simple solution could be is keeping in
> .bzr/checkout some special info about subtype of WT
> (universal/unix/windows/cygwin/macos) and create methods to extract
> symlink target in different combination WT + OS.

Yes, I think so.

> So, do you can suggest me something about implementation? I think we
> could provide some sort of tests for windows WT with symlinks.

I'll have to reply to this part later.

Aaron

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFEa5UT0F+nu1YWqI0RAuSTAJ0RXeY3DEDiYQCSPGMfdYJR5kbS9QCeOh2V
ofH8IhUmWuJR4UTYm4qftrk=
=vGIk
-----END PGP SIGNATURE-----




More information about the bazaar mailing list