You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Peng Yu <pe...@gmail.com> on 2010/05/24 19:25:29 UTC

svn support for symbolic link?

For some reason, I need to create symbolic link in my source
directory. When the directory structure is changed, I have some tools
to fix broken links.

I'm wondering if svn support symbolic links.

-- 
Regards,
Peng

Re: svn support for symbolic link?

Posted by Andy Levy <an...@gmail.com>.
On Tue, May 25, 2010 at 14:20, Todd Gleason <To...@elekta.com> wrote:
>> -----Original Message-----
>> From: Andy Levy [mailto:andy.levy@gmail.com]
>> Sent: Monday, May 24, 2010 2:23 PM
>> To: Lars Tiefland
>> Cc: Brown, Michael; Peng Yu; users@subversion.apache.org
>> Subject: Re: svn support for symbolic link?
>>
>> On Mon, May 24, 2010 at 16:10, Lars Tiefland <lt...@gmail.com>
>> wrote:
>> > But: Only a Linux / Unix client will preserve symbolic links. On
>> Windows the
>> > link will become a normal file.
>>
>> Actually, it'll be a file that basically contains "you should be
>> looking at another file, look over there". The link isn't "resolved"
>> to the file it points to.
>
> I believe Windows 2000 and up (NTFS 5.0+ really) supports junctions that are nearly identical to Unix symbolic links.  See http://shell-shocked.org/article.php?id=284 .  At the very least directory symbolic links are supported, and file links may be as well.  So is there a good reason for svn not to support this in Windows?
>

True symlink support in NTFS (at the level that's required here)
didn't come until Vista. IIRC, junctions aren't as identical to *NIX
symlinks as they seem.

Does Vista/Win7 have a good way of creating/managing symlinks, or is
it one of those command-line programs you only know about if you go
looking for it?

In Subversion, it's actually APR which would have to support symlinks
I believe, and then you'd have to do some FS "sniffing" to check
whether you are working on a disk which really does support it.

RE: svn support for symbolic link?

Posted by Todd Gleason <To...@elekta.com>.
> -----Original Message-----
> From: Andy Levy [mailto:andy.levy@gmail.com]
> Sent: Monday, May 24, 2010 2:23 PM
> To: Lars Tiefland
> Cc: Brown, Michael; Peng Yu; users@subversion.apache.org
> Subject: Re: svn support for symbolic link?
>
> On Mon, May 24, 2010 at 16:10, Lars Tiefland <lt...@gmail.com>
> wrote:
> > But: Only a Linux / Unix client will preserve symbolic links. On
> Windows the
> > link will become a normal file.
>
> Actually, it'll be a file that basically contains "you should be
> looking at another file, look over there". The link isn't "resolved"
> to the file it points to.

I believe Windows 2000 and up (NTFS 5.0+ really) supports junctions that are nearly identical to Unix symbolic links.  See http://shell-shocked.org/article.php?id=284 .  At the very least directory symbolic links are supported, and file links may be as well.  So is there a good reason for svn not to support this in Windows?

--Todd


Please consider the environment before printing this e-mail.

The contents of this e-mail message (including any attachments) are confidential to and are intended to be conveyed for the use of the recipient to whom it is addressed only. If you receive this transmission in error, please notify the sender of this immediately and delete the message from your system.  Any distribution, reproduction or use of this message by someone other than recipient is not authorized and may be unlawful.
*******************Internet Email Confidentiality Footer*******************
The contents of this e-mail message (including any attachments hereto) are confidential to and are intended to be conveyed for the use of the recipient to whom it is addressed only. If you receive this transmission in error, please notify the sender of this immediately and delete the message from your system. Any distribution, reproduction or use of this message by someone other than recipient is not authorized and may be unlawful.


Re: svn support for symbolic link?

Posted by Sarah George <sa...@gmail.com>.
svn handles symlinks by having a special file attribute for “this is a
symlink” and the contents in its repository are just the directory to point
the symlink at.

This works well for simple cases, although I’ve found replacing symlinks
with real files can cause some confusion if you’re not careful.

— Sarah


On 25 May 2010 06:23, Andy Levy <an...@gmail.com> wrote:

> On Mon, May 24, 2010 at 16:10, Lars Tiefland <lt...@gmail.com> wrote:
> > But: Only a Linux / Unix client will preserve symbolic links. On Windows
> the
> > link will become a normal file.
>
> Actually, it'll be a file that basically contains "you should be
> looking at another file, look over there". The link isn't "resolved"
> to the file it points to.
>
> >
> > 2010/5/24 Brown, Michael <mi...@philips.com>
> >>
> >> Yep, we use them.
> >> MB
> >>  --
> >> You design it, I'll build it
> >> e-mail: michael.l.brown@philips.com
> >> desk: 608-288-6969
> >>  cell: 608-206-6843ent
> >>
> >> > -----Original Message-----
> >> > From: Peng Yu [mailto:pengyu.ut@gmail.com]
> >> > Sent: Monday, May 24, 2010 2:25 PM
> >> > To: users@subversion.apache.org
> >> > Subject: svn support for symbolic link?
> >> >
> >> > For some reason, I need to create symbolic link in my source
> >> > directory. When the directory structure is changed, I have some tools
> >> > to fix broken links.
> >> >
> >> > I'm wondering if svn support symbolic links.
> >> >
> >> > --
> >> > Regards,
> >> > Peng
> >>
> >> The information contained in this message may be confidential and
> legally
> >> protected under applicable law. The message is intended solely for the
> >> addressee(s). If you are not the intended recipient, you are hereby
> notified
> >> that any use, forwarding, dissemination, or reproduction of this message
> is
> >> strictly prohibited and may be unlawful. If you are not the intended
> >> recipient, please contact the sender by return e-mail and destroy all
> copies
> >> of the original message.
> >
> >
>

Re: svn support for symbolic link?

Posted by Andy Levy <an...@gmail.com>.
On Mon, May 24, 2010 at 16:10, Lars Tiefland <lt...@gmail.com> wrote:
> But: Only a Linux / Unix client will preserve symbolic links. On Windows the
> link will become a normal file.

Actually, it'll be a file that basically contains "you should be
looking at another file, look over there". The link isn't "resolved"
to the file it points to.

>
> 2010/5/24 Brown, Michael <mi...@philips.com>
>>
>> Yep, we use them.
>> MB
>>  --
>> You design it, I'll build it
>> e-mail: michael.l.brown@philips.com
>> desk: 608-288-6969
>>  cell: 608-206-6843ent
>>
>> > -----Original Message-----
>> > From: Peng Yu [mailto:pengyu.ut@gmail.com]
>> > Sent: Monday, May 24, 2010 2:25 PM
>> > To: users@subversion.apache.org
>> > Subject: svn support for symbolic link?
>> >
>> > For some reason, I need to create symbolic link in my source
>> > directory. When the directory structure is changed, I have some tools
>> > to fix broken links.
>> >
>> > I'm wondering if svn support symbolic links.
>> >
>> > --
>> > Regards,
>> > Peng
>>
>> The information contained in this message may be confidential and legally
>> protected under applicable law. The message is intended solely for the
>> addressee(s). If you are not the intended recipient, you are hereby notified
>> that any use, forwarding, dissemination, or reproduction of this message is
>> strictly prohibited and may be unlawful. If you are not the intended
>> recipient, please contact the sender by return e-mail and destroy all copies
>> of the original message.
>
>

Re: svn support for symbolic link?

Posted by Lars Tiefland <lt...@gmail.com>.
But: Only a Linux / Unix client will preserve symbolic links. On Windows the
link will become a normal file.

Live Long And Prosper,

Lars Tiefland


2010/5/24 Brown, Michael <mi...@philips.com>

> Yep, we use them.
> MB
>  --
> You design it, I'll build it
> e-mail: michael.l.brown@philips.com
> desk: 608-288-6969
>  cell: 608-206-6843ent
>
> > -----Original Message-----
> > From: Peng Yu [mailto:pengyu.ut@gmail.com]
> > Sent: Monday, May 24, 2010 2:25 PM
> > To: users@subversion.apache.org
> > Subject: svn support for symbolic link?
> >
> > For some reason, I need to create symbolic link in my source
> > directory. When the directory structure is changed, I have some tools
> > to fix broken links.
> >
> > I'm wondering if svn support symbolic links.
> >
> > --
> > Regards,
> > Peng
>
> The information contained in this message may be confidential and legally
> protected under applicable law. The message is intended solely for the
> addressee(s). If you are not the intended recipient, you are hereby notified
> that any use, forwarding, dissemination, or reproduction of this message is
> strictly prohibited and may be unlawful. If you are not the intended
> recipient, please contact the sender by return e-mail and destroy all copies
> of the original message.
>

RE: svn support for symbolic link?

Posted by "Brown, Michael" <mi...@philips.com>.
Yep, we use them.
MB
 --
You design it, I'll build it
e-mail: michael.l.brown@philips.com
desk: 608-288-6969
cell: 608-206-6843

> -----Original Message-----
> From: Peng Yu [mailto:pengyu.ut@gmail.com]
> Sent: Monday, May 24, 2010 2:25 PM
> To: users@subversion.apache.org
> Subject: svn support for symbolic link?
>
> For some reason, I need to create symbolic link in my source
> directory. When the directory structure is changed, I have some tools
> to fix broken links.
>
> I'm wondering if svn support symbolic links.
>
> --
> Regards,
> Peng

The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.

RE: svn support for symbolic link?

Posted by Keith Moore <Ke...@securency.com>.

-----Original Message-----
From: David Weintraub [mailto:qazwart@gmail.com] 
Sent: Wednesday, 26 May 2010 5:05
To: Peng Yu
Cc: users@subversion.apache.org
Subject: Re: svn support for symbolic link?

On Mon, May 24, 2010 at 3:25 PM, Peng Yu <pe...@gmail.com> wrote:
> For some reason, I need to create symbolic link in my source
> directory. When the directory structure is changed, I have some tools
> to fix broken links.
>
> I'm wondering if svn support symbolic links.

I know that the Unix version of Subversion supports symbolic links,
but I don't know if the Windows version does on Vista and Windows 7. I
can tell you it doesn't on earlier versions of Windows.

Yes, I know that NTFS supports something like symbolic links and that
since Vista, actual symbolic links are supported in NTFS via the
mklink command. However, since by default non-administrative users
ren't allowed to create symbolic links and junctions, most Windows
programs like Subversion don't support them either. Besides, there's
no guarantee you're using NTFS and not FAT32 on your Windows
partition.

It is normally not a good idea to use symbolic links in a version
control even in cases where it is fully supported. You're usually
better off having a utility create the symbolic links for you at build
or installation time. As you stated, when you have symbolic links,
they tend to break when things like directory structures change.

In fact, the truth is that Subversion doesn't really handle symbolic
links at all. They're just stored in the repository as a regular file
with a "svn:special" property attached to them. It is up to the
Subversion client to figure out that they're really symbolic links and
to create the symbolic link. The Subversion Unix command line client
does this. I don't know about the Windows Subversion client on Windows
Vista and Windows 7, and since I don't have a copy of those operating
systems, I can't even try it.

If you have a Windows 7 machine, you can create a local repository,
checkout to a local working directory. Create a symbolic link, add it
to the repository and commit the change. Check out the project
somewhere else and see what happens.

-- 
David Weintraub
qazwart@gmail.com

----------------------------------------------------------------

Sorry, forgot to mention that I got the error when trying to commit.
#####################################################################################
Attention:
The information contained in this message and or attachments is intended
only for the person or entity to which it is addressed and may contain
confidential and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in reliance upon,
this information by persons or entities other than the intended recipient
is prohibited. If you received this in error, please contact the sender and
delete the material from any system and destroy any copies.
#####################################################################################

Re: svn support for symbolic link?

Posted by David Weintraub <qa...@gmail.com>.
On Tue, May 25, 2010 at 6:44 PM, Keith Moore
 > <Ke...@securency.com> > I tried this on Windows 7 Enterprise with
 > TortoiseSVN 1.6.8, Subversion 1.6.11 and got the error message "svn:
 > Symbolic links are not supported on this platform".  Now, I know these
 > error messages can be a bit cryptic so I googled this one and it actually
 > means that symbolic links are not supported on Window 7 ;o)

Windows 7 DOES support symbolic links. However, you can't simply
create a symbolic link. You first have to be an administrator. Then,
bump up your console window to an Administrator console window. Oh,
and you can only create symbolic links on NTFS file systems. I know
many people whose boot partition is still FAT32.

I'm not sure if you can use Tortoise for this, or you must use the
command line tool since you have to be able to bump your tool up to
administrator level. You have to do this although you already may be
an administrator on the current machine.

It wouldn't surprise me (considering all the limits: You need to be an
administrator, your current shell must have admin privileges set, you
need to be Vista or Windows 7, and you need NTFS) that the various
Subversion for Windows clients don't support
symlinks.

My personal preference is not to use symlinks in my source repository.
Instead, depend upon the build system or the installation system to
create any needed symlinks.
-- 
David Weintraub
qazwart@gmail.com

RE: svn support for symbolic link?

Posted by Keith Moore <Ke...@securency.com>.
-----Original Message-----
From: David Weintraub [mailto:qazwart@gmail.com] 
Sent: Wednesday, 26 May 2010 5:05
To: Peng Yu
Cc: users@subversion.apache.org
Subject: Re: svn support for symbolic link?

On Mon, May 24, 2010 at 3:25 PM, Peng Yu <pe...@gmail.com> wrote:
> For some reason, I need to create symbolic link in my source
> directory. When the directory structure is changed, I have some tools
> to fix broken links.
>
> I'm wondering if svn support symbolic links.

I know that the Unix version of Subversion supports symbolic links,
but I don't know if the Windows version does on Vista and Windows 7. I
can tell you it doesn't on earlier versions of Windows.

Yes, I know that NTFS supports something like symbolic links and that
since Vista, actual symbolic links are supported in NTFS via the
mklink command. However, since by default non-administrative users
ren't allowed to create symbolic links and junctions, most Windows
programs like Subversion don't support them either. Besides, there's
no guarantee you're using NTFS and not FAT32 on your Windows
partition.

It is normally not a good idea to use symbolic links in a version
control even in cases where it is fully supported. You're usually
better off having a utility create the symbolic links for you at build
or installation time. As you stated, when you have symbolic links,
they tend to break when things like directory structures change.

In fact, the truth is that Subversion doesn't really handle symbolic
links at all. They're just stored in the repository as a regular file
with a "svn:special" property attached to them. It is up to the
Subversion client to figure out that they're really symbolic links and
to create the symbolic link. The Subversion Unix command line client
does this. I don't know about the Windows Subversion client on Windows
Vista and Windows 7, and since I don't have a copy of those operating
systems, I can't even try it.

If you have a Windows 7 machine, you can create a local repository,
checkout to a local working directory. Create a symbolic link, add it
to the repository and commit the change. Check out the project
somewhere else and see what happens.

-- 
David Weintraub
qazwart@gmail.com

I tried this on Windows 7 Enterprise with TortoiseSVN 1.6.8, Subversion 1.6.11 and got the error message "svn: Symbolic links are not supported on this platform".  Now, I know these error messages can be a bit cryptic so I googled this one and it actually means that symbolic links are not supported on Window 7 ;o)

#####################################################################################
Attention:
The information contained in this message and or attachments is intended
only for the person or entity to which it is addressed and may contain
confidential and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in reliance upon,
this information by persons or entities other than the intended recipient
is prohibited. If you received this in error, please contact the sender and
delete the material from any system and destroy any copies.
#####################################################################################

Re: svn support for symbolic link?

Posted by David Weintraub <qa...@gmail.com>.
On Mon, May 24, 2010 at 3:25 PM, Peng Yu <pe...@gmail.com> wrote:
> For some reason, I need to create symbolic link in my source
> directory. When the directory structure is changed, I have some tools
> to fix broken links.
>
> I'm wondering if svn support symbolic links.

I know that the Unix version of Subversion supports symbolic links,
but I don't know if the Windows version does on Vista and Windows 7. I
can tell you it doesn't on earlier versions of Windows.

Yes, I know that NTFS supports something like symbolic links and that
since Vista, actual symbolic links are supported in NTFS via the
mklink command. However, since by default non-administrative users
ren't allowed to create symbolic links and junctions, most Windows
programs like Subversion don't support them either. Besides, there's
no guarantee you're using NTFS and not FAT32 on your Windows
partition.

It is normally not a good idea to use symbolic links in a version
control even in cases where it is fully supported. You're usually
better off having a utility create the symbolic links for you at build
or installation time. As you stated, when you have symbolic links,
they tend to break when things like directory structures change.

In fact, the truth is that Subversion doesn't really handle symbolic
links at all. They're just stored in the repository as a regular file
with a "svn:special" property attached to them. It is up to the
Subversion client to figure out that they're really symbolic links and
to create the symbolic link. The Subversion Unix command line client
does this. I don't know about the Windows Subversion client on Windows
Vista and Windows 7, and since I don't have a copy of those operating
systems, I can't even try it.

If you have a Windows 7 machine, you can create a local repository,
checkout to a local working directory. Create a symbolic link, add it
to the repository and commit the change. Check out the project
somewhere else and see what happens.

-- 
David Weintraub
qazwart@gmail.com