On Oct 31, 2015, at 2:41 PM, Matt Welland <[email protected]> wrote:
> 
> Windows will ultimately get decent symlink support.

I doubt it.  Microsoft has tried to take a bite of that apple twice, and 
screwed it up both times.

First there was the Windows 95 *.lnk file feature, which is basically only a 
symlink to Windows Explorer.

Then in Vista they finally added true symlinks, but only Admin users can create 
them, and then only from within an Admin shell!  cmd.exe doesn’t know how to 
temporarily auto-elevate itself via UAC, as with most other privileged 
operations.  (There’s no reason that Windows builds of Fossil can’t do the UAC 
dance, though.)

And on top of that, Microsoft made at least two bad design choices in the 
MKLINK interface relative to ln: 

1. The order of MKLINK’s arguments is backwards relative to Windows COPY, POSIX 
cp, and POSIX ln.  Why?  To confuse people?  Just to be different?  Malice?  
Ignorance?  Who can say?

2. MKLINK makes symlinks by default, opposite ln.  This is arguably an 
improvement, since the old arguments for hard links over symlinks is largely 
irrelevant today, but it confuses Unix users.

Microsoft has painted themselves into a corner now.  Fixing MKLINK would break 
backwards compatibility.  Historically, MS almost always leaves design errors 
in place.  Instead of a fix, I’d expect a future version of Windows to offer a 
third interface, different from the first two tries.  CreateSymbolicLinkEx2() 
or some such.  Or maybe some PowerShell horridness: 
Windows.File.System.CreateSymbolicLink, maybe.

> It is impossible for fossil to automatically reproduce an originating working 
> area which was constructed by symlinking different areas on disk to a single 
> directory structure.

I’m not entirely sure what that means, but it is quite possible for Fossil to 
canonicalize a path, then work out whether the resulting path still points into 
the Fossil-managed tree.  If it does, use the canonicalized path as though the 
user had typed that instead.  If not, refuse the operation, since it exits the 
managed tree.

fossil open already restores symlinks on POSIX systems, if you check them in 
with allow-symlinks enabled.
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to