You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Eric Armstrong <Er...@Sun.COM> on 2008/03/10 08:35:04 UTC

Symlinks on Windows

(Please cc me on any replies)

This FAQ says that SVN handles symlinks, but
"windows doesn't have them":
http://subversion.tigris.org/faq.html#symlinks

But Windows has had shortcuts for quite a while
now. Is the FAQ (hopefully) outdated?

-- 

Eric Armstrong, Document Systems Architect, Sun Microsystems
http://blogs.sun.com/coolstuff
http://www.artima.com/weblogs/index.jsp?blogger=cooltools

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Symlinks on Windows

Posted by Lasse Vågsæther Karlsen <la...@vkarlsen.no>.
Gah, stupid gmail, always replies to sender and not to mailing list.

On Mon, Mar 10, 2008 at 10:10 PM, Lasse Vågsæther Karlsen <la...@vkarlsen.no>
wrote:

> Junctions work exactly like symlinks, except that they're only supported
> on NTFS, and only works for directories. The new symlinks support in Vista
> is closer, but then again, only supported in Vista.
>
> As such there is no direct equivalent on Windows as a whole and the
> current non-support on Windows is the right one IMHO.
>
>
> On Mon, Mar 10, 2008 at 9:38 PM, Eric Armstrong <Er...@sun.com>
> wrote:
>
> > Karl Fogel wrote:
> > > Eric Armstrong <Er...@Sun.COM> writes:
> > >> (Please cc me on any replies)
> > >>
> > >> This FAQ says that SVN handles symlinks, but
> > >> "windows doesn't have them":
> > >> http://subversion.tigris.org/faq.html#symlinks
> > >>
> > >> But Windows has had shortcuts for quite a while
> > >> now. Is the FAQ (hopefully) outdated?
> > >
> > > I think there was some specific reason why we couldn't just implement
> > > symlinks as shortcuts on Windows, but I don't remember what it was.
> >  If
> > > we find out, we should update the FAQ to talk about it.
> > >
> > Thanks, Karl. I suspect you're right that there is a
> > specific reason. While traveling around the web, I
> > came across a page that talked about some special system
> > tool for implementing symlinks on Windows:
> >
> > http://shell-shocked.org/article.php?id=284
> > "Windows has had symbolic links since ... NTFS 5.0.
> > It used to be called "junction point" functionality,
> > and was renamed "reparse point" functionality by the time
> > Windows XP came out...
> >
> > Which references what Nathan Zumwalt called, "a great tool
> > by Sysinternals for creating symbolic links:
> > http://www.sysinternals.com/Utilities/Junction.html
> >
> > There is apparently something new in Vista, as well:
> >
> >
> > http://www.howtogeek.com/howto/windows-vista/using-symlinks-in-windows-vista/
> > "One of the long-awaited features in Windows Vista was the
> > ability to use symbolic links... Sadly, they don't work quite
> > as well as they could, but it's a big upgrade from prior versions...
> >
> > --
> >
> > Eric Armstrong, Document Systems Architect, Sun Microsystems
> > http://blogs.sun.com/coolstuff
> > http://www.artima.com/weblogs/index.jsp?blogger=cooltools
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> > For additional commands, e-mail: users-help@subversion.tigris.org
> >
> >
>
>
> --
> Lasse Vågsæther Karlsen
> mailto:lasse@vkarlsen.no
> http://presentationmode.blogspot.com/
> PGP KeyID: 0xBCDEA2E3




-- 
Lasse Vågsæther Karlsen
mailto:lasse@vkarlsen.no
http://presentationmode.blogspot.com/
PGP KeyID: 0xBCDEA2E3

Re: Symlinks on Windows

Posted by Eric Armstrong <Er...@Sun.COM>.
Karl Fogel wrote:
> Eric Armstrong <Er...@Sun.COM> writes:
>> (Please cc me on any replies)
>>
>> This FAQ says that SVN handles symlinks, but
>> "windows doesn't have them":
>> http://subversion.tigris.org/faq.html#symlinks
>>
>> But Windows has had shortcuts for quite a while
>> now. Is the FAQ (hopefully) outdated?
> 
> I think there was some specific reason why we couldn't just implement
> symlinks as shortcuts on Windows, but I don't remember what it was.  If
> we find out, we should update the FAQ to talk about it.
> 
Thanks, Karl. I suspect you're right that there is a
specific reason. While traveling around the web, I
came across a page that talked about some special system
tool for implementing symlinks on Windows:

http://shell-shocked.org/article.php?id=284
"Windows has had symbolic links since ... NTFS 5.0.
It used to be called "junction point" functionality,
and was renamed "reparse point" functionality by the time
Windows XP came out...

Which references what Nathan Zumwalt called, "a great tool
by Sysinternals for creating symbolic links:
http://www.sysinternals.com/Utilities/Junction.html

There is apparently something new in Vista, as well:

http://www.howtogeek.com/howto/windows-vista/using-symlinks-in-windows-vista/
"One of the long-awaited features in Windows Vista was the
ability to use symbolic links... Sadly, they don't work quite
as well as they could, but it's a big upgrade from prior versions...

-- 

Eric Armstrong, Document Systems Architect, Sun Microsystems
http://blogs.sun.com/coolstuff
http://www.artima.com/weblogs/index.jsp?blogger=cooltools

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Symlinks on Windows

Posted by Marc Haisenko <ha...@comdasys.com>.
On Monday 10 March 2008, Trent Nelson wrote:
> richard hornsby [richardjhornsby@gmail.com]:
> > If you have found a way to make shortcuts be honored by applications such 
as IIS, I would be seriously
> > interested in hearing how you did it.
> 
> You could always use hardlinks:
> 
> fsutil hardlink create <destination link> <source file>

Yes, but only within the same partition.
	Marc

-- 
Marc Haisenko

Comdasys AG
Rüdesheimer Str. 7
80686 München
Germany

Tel.: +49 (0)89 548 433 321

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

RE: Symlinks on Windows

Posted by Trent Nelson <tn...@onresolve.com>.
richard hornsby [richardjhornsby@gmail.com]:
> If you have found a way to make shortcuts be honored by applications such as IIS, I would be seriously
> interested in hearing how you did it.

You could always use hardlinks:

fsutil hardlink create <destination link> <source file>

For example:

C:\>fsutil hardlink create cygwin-zsh-hl.bat cygwin-zsh.bat
Hardlink created for C:\cygwin-zsh-hl.bat <<===>> C:\cygwin-zsh.bat
C:\>type cygwin-zsh-hl.bat
@echo off
pushd .
c:
chdir c:\\bin
start rxvt -ls -sr -bg black -fg white -fn "SAS Monospace" -fb "SAS Monospace Bold" -tn vt102 -sl 100000 -e zsh -l
popd
C:\>dir cygwin-zsh*
 Volume in drive C has no label.
 Volume Serial Number is 30B2-C51F
 Directory of C:\
18/09/2006  04:02               261 cygwin-zsh-hl.bat
18/09/2006  04:02               261 cygwin-zsh.bat
               2 File(s)            522 bytes
               0 Dir(s)  33,414,381,568 bytes free


    Trent.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Make a svn (sync) repo read-only ..

Posted by Blair Zajac <bl...@orcaware.com>.
Patwardhan, Rajesh wrote:
> Hi,
> 
> Any easy way (looking for simple apache configuration that can make this
> happen) 
> 
> Background looking to make the svnsync repo available read-only so no
> one accidentally checks in but the user who is running the svnsync ...
> 
> We have many repos and new keep on getting added, hence I am a bit
> hesitant with the hooks ... Since that way we add a repo and that adds
> to the management overhead ...
> 
> Any suggestion or pointers welcome... 
> 
> Thank you very much for your help and time in advance. 

Hi Rajesh,

One request, please don't reply to a thread to start a new thread.  Here's why:

http://subversion.tigris.org/mailing-list-guidelines.html#fresh-post

Regards,
Blair

-- 
Blair Zajac, Ph.D.
CTO, OrcaWare Technologies
<bl...@orcaware.com>
Subversion training, consulting and support
http://www.orcaware.com/svn/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Make a svn (sync) repo read-only ..

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Mar 10, 2008, at 21:54, Patwardhan, Rajesh wrote:

> Any easy way (looking for simple apache configuration that can make  
> this
> happen)
>
> Background looking to make the svnsync repo available read-only so no
> one accidentally checks in but the user who is running the svnsync ...
>
> We have many repos and new keep on getting added, hence I am a bit
> hesitant with the hooks ... Since that way we add a repo and that adds
> to the management overhead ...
>
> Any suggestion or pointers welcome...
>
> Thank you very much for your help and time in advance.

I believe hook scripts are the correct way to solve this problem.

You can make the hooks directory a symlink to a common hooks  
directory if you want. It's just one extra step to do when you set up  
the repository.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Make a svn (sync) repo read-only ..

Posted by "Patwardhan, Rajesh" <ra...@etrade.com>.
Hi,

Any easy way (looking for simple apache configuration that can make this
happen) 

Background looking to make the svnsync repo available read-only so no
one accidentally checks in but the user who is running the svnsync ...

We have many repos and new keep on getting added, hence I am a bit
hesitant with the hooks ... Since that way we add a repo and that adds
to the management overhead ...

Any suggestion or pointers welcome... 

Thank you very much for your help and time in advance. 
Regards,
Rajesh 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Symlinks on Windows

Posted by Eric Armstrong <Er...@Sun.COM>.
Great stuff, Richard. Thanks.
Sound like the FAQ is definitely up to date!

Whether that 3rd party tool is an interesting question
--but it's very difficult to keep that sort of thing
in sync with OS changes.

richard hornsby wrote:
> 
> To answer your assertion - to the best of my knowledge, feel free to 
> correct me - symlinks (*nix) are not the same thing as shortcuts in 
> windows.  A shortcut is an actual file, usually ending in '.lnk'  (ie. 
> eclipse.lnk is a binary _file_ containing some kind of information about 
> how to find eclipse.exe) The distinction between a symlink and a 
> shortcut being a file is important because it takes special effort to 
> follow a shortcut -- I can't think of any applications that actually 
> honor them outside of the shell (explorer.exe) and the file chooser type 
> dialogs - including any microsoft-supplied applications.  There may be a 
> few out there, not saying there aren't.
> 
> On the other hand, symlinks are actually filesystem level pointers.  
> Most stuff I've written (or used) on *nix platforms doesn't care and 
> treats the symlink as if it were the file/directory - with no special 
> effort - because the filesystem handles it for me.  I can examine the 
> "file" if I want to see if it is a symlink (apache does this) but it is 
> completely optional.
> 
> If you think I'm wrong about shortcuts, try for example going into your 
> "Program Files\Internet Explorer" directory.  Rename one of the dlls 
> (such as ieproxy.dll to ieproxy2.dll).  Then create a shortcut to 
> ieproxy2.dll, but call it ieproxy.dll (the original name)  Internet 
> Explorer won't launch until you make the dll the actual library and not 
> a shortcut to it.  Windows itself does not treat shortcuts in anything 
> resembling transparency.  There is something called "junctions" which is 
> supposed to be more transparent to the application level, but AFAIK it 
> isn't well documented or supported.
> 
> http://www.microsoft.com/technet/sysinternals/FileAndDisk/Junction.mspx 
> (also has a link to a KB article.)
> 
> IMHO, the svn FAQ really isn't outdated, as it says "Win32 has no 
> symlinks, so a win32 client won't do any such translation: the object 
> appears as a normal file."  I don't know the internals of subversion, 
> but this is a correct statement because the shortcut /is/ a normal file 
> to pretty much everything except the windows Explorer shell.
> 
> If you have found a way to make shortcuts be honored by applications 
> such as IIS, I would be seriously interested in hearing how you did it.
> 
> -rj
> 
> On Mon, Mar 10, 2008 at 2:05 PM, Karl Fogel <kfogel@red-bean.com 
> <ma...@red-bean.com>> wrote:
> 
>     Eric Armstrong <Eric.Armstrong@Sun.COM
>     <ma...@Sun.COM>> writes:
>      > (Please cc me on any replies)
>      >
>      > This FAQ says that SVN handles symlinks, but
>      > "windows doesn't have them":
>      > http://subversion.tigris.org/faq.html#symlinks
>      >
>      > But Windows has had shortcuts for quite a while
>      > now. Is the FAQ (hopefully) outdated?
> 
>     I think there was some specific reason why we couldn't just implement
>     symlinks as shortcuts on Windows, but I don't remember what it was.  If
>     we find out, we should update the FAQ to talk about it.
> 
>     -Karl
> 
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
>     <ma...@subversion.tigris.org>
>     For additional commands, e-mail: users-help@subversion.tigris.org
>     <ma...@subversion.tigris.org>
> 
> 


-- 

Eric Armstrong, Document Systems Architect, Sun Microsystems
http://blogs.sun.com/coolstuff
http://www.artima.com/weblogs/index.jsp?blogger=cooltools

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Symlinks on Windows

Posted by Greg Thomas <th...@omc.bt.co.uk>.
On Mon, 10 Mar 2008 16:27:41 -0400, "richard hornsby"
<ri...@gmail.com> wrote:

>To answer your assertion - to the best of my knowledge, feel free to correct
>me - symlinks (*nix) are not the same thing as shortcuts in windows.

There are now three things to contend with on Win32;

Shortcuts - .lnk files that are nothing like symlinks as you suggest.

NTFS junction points - These are similar to symlinks, however are not
well supported by Windows -
http://en.wikipedia.org/wiki/NTFS_junction_point

NTFS symbolic links - There replace Junction Points in Vista and
Server 2003, and work cross-file system -
http://en.wikipedia.org/wiki/NTFS_symbolic_link

If it were possible to get svn to support symlinks on Windows, it
would be for Vista/2003 only, I suspect.

Greg
-- 
This post represents the views of the author and does
not necessarily accurately represent the views of BT.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Symlinks on Windows

Posted by richard hornsby <ri...@gmail.com>.
To answer your assertion - to the best of my knowledge, feel free to correct
me - symlinks (*nix) are not the same thing as shortcuts in windows.  A
shortcut is an actual file, usually ending in '.lnk'  (ie. eclipse.lnk is a
binary _file_ containing some kind of information about how to find
eclipse.exe) The distinction between a symlink and a shortcut being a file
is important because it takes special effort to follow a shortcut -- I can't
think of any applications that actually honor them outside of the shell (
explorer.exe) and the file chooser type dialogs - including any
microsoft-supplied applications.  There may be a few out there, not saying
there aren't.

On the other hand, symlinks are actually filesystem level pointers.  Most
stuff I've written (or used) on *nix platforms doesn't care and treats the
symlink as if it were the file/directory - with no special effort - because
the filesystem handles it for me.  I can examine the "file" if I want to see
if it is a symlink (apache does this) but it is completely optional.

If you think I'm wrong about shortcuts, try for example going into your
"Program Files\Internet Explorer" directory.  Rename one of the dlls (such
as ieproxy.dll to ieproxy2.dll).  Then create a shortcut to ieproxy2.dll,
but call it ieproxy.dll (the original name)  Internet Explorer won't launch
until you make the dll the actual library and not a shortcut to it.  Windows
itself does not treat shortcuts in anything resembling transparency.  There
is something called "junctions" which is supposed to be more transparent to
the application level, but AFAIK it isn't well documented or supported.

http://www.microsoft.com/technet/sysinternals/FileAndDisk/Junction.mspx(also
has a link to a KB article.)

IMHO, the svn FAQ really isn't outdated, as it says "Win32 has no symlinks,
so a win32 client won't do any such translation: the object appears as a
normal file."  I don't know the internals of subversion, but this is a
correct statement because the shortcut /is/ a normal file to pretty much
everything except the windows Explorer shell.

If you have found a way to make shortcuts be honored by applications such as
IIS, I would be seriously interested in hearing how you did it.

-rj

On Mon, Mar 10, 2008 at 2:05 PM, Karl Fogel <kf...@red-bean.com> wrote:

> Eric Armstrong <Er...@Sun.COM> writes:
> > (Please cc me on any replies)
> >
> > This FAQ says that SVN handles symlinks, but
> > "windows doesn't have them":
> > http://subversion.tigris.org/faq.html#symlinks
> >
> > But Windows has had shortcuts for quite a while
> > now. Is the FAQ (hopefully) outdated?
>
> I think there was some specific reason why we couldn't just implement
> symlinks as shortcuts on Windows, but I don't remember what it was.  If
> we find out, we should update the FAQ to talk about it.
>
> -Karl
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>

Re: Symlinks on Windows

Posted by Karl Fogel <kf...@red-bean.com>.
Eric Armstrong <Er...@Sun.COM> writes:
> (Please cc me on any replies)
>
> This FAQ says that SVN handles symlinks, but
> "windows doesn't have them":
> http://subversion.tigris.org/faq.html#symlinks
>
> But Windows has had shortcuts for quite a while
> now. Is the FAQ (hopefully) outdated?

I think there was some specific reason why we couldn't just implement
symlinks as shortcuts on Windows, but I don't remember what it was.  If
we find out, we should update the FAQ to talk about it.

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org