You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Steve Whitson <st...@gmail.com> on 2008/09/17 17:19:17 UTC

question on symbolic links and windows

I have the need to support symbolic links in my repository.  But, when 
checked out on windows I'm not getting the regular file the symlink 
points to, but instead end up with a text file having content "link 
../somefile.txt".

For example, my repsoitroy has the following structure as a test
    ./test.txt
    ./testfolder/test.txt -> ../test.txt

When this is checked out on windows the file .\test.txt is fine, but the 
file testfolder\test.txt contains the text "link ../test.txt".

What am I doing wrong?

(subversion server and client are 1.5.2)

Thanks much,
    -Steve

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

Re: question on symbolic links and windows

Posted by Sam Barnett-Cormack <s....@lancaster.ac.uk>.
Andy Levy wrote:
> On Wed, Sep 17, 2008 at 13:19, Steve Whitson <st...@gmail.com> wrote:
>> I have the need to support symbolic links in my repository.  But, when
>> checked out on windows I'm not getting the regular file the symlink points
>> to, but instead end up with a text file having content "link
>> ../somefile.txt".
>>
>> For example, my repsoitroy has the following structure as a test
>>   ./test.txt
>>   ./testfolder/test.txt -> ../test.txt
>>
>> When this is checked out on windows the file .\test.txt is fine, but the
>> file testfolder\test.txt contains the text "link ../test.txt".
>>
>> What am I doing wrong?
> 
> Nothing. Symlinks don't work on Windows. NTFS lacked the ability to
> create true *NIX-like symlinks until Vista was released, and
> Subversion doesn't attempt to guess at whether that functionality is
> available or not - it assumes that it's not if you're on Windows.

Yeah, but last I checked the docs say that, on non-symlink platforms, a 
regular file that's a copy of the one the symlink points to will be 
created. I think.

-- 
Sam Barnett-Cormack

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

Re: question on symbolic links and windows

Posted by Steve Whitson <st...@gmail.com>.
Steve Whitson wrote:
> Paul Koning wrote:
>>  Steve> I expect and want a regular file in place of the symbolic link
>>  Steve> on windows (as stated in the book).  How can I achieve this?
>>
>> You are getting what the book describes.
>>
>> If what you want is a second copy of the linked-to file, that would be
>> a new feature.
>>
>> It would also be a very messy thing to do, because you'd have two
>> independent copies of the file on Windows but only one on other
>> operating systems.  So on Windows you could create a working directory
>> where the two are different.   They might perhaps *both* be modified
>> in different ways. 
>> When you commit those changes, what would you expect to happen?  I
>> can't think of any sensible answer.
>>
>>       paul
>>
>>   
> Not to make any claims that one is better than the other... but this 
> case is handled fairly well under clearcase.  I'm not sure how it 
> would handle the case were I modify both (the link content and the 
> target) but (from windows) I do revise the link target and all the 
> links are instantly revised upon commit (check-in).
>
> Thanks much,
>    -Steve
Just to finish my prior thought... since I just recalled... with the 
checkout/in model (in clearcase) it never allows a checkout of the links 
themselves, and therefore you can never commit (checkin) a link, only 
the link-target (the actual file).

Thanks again for pointing out my oversight!  I guess I felt embarrassed 
for asking the question for a reason.  I do deal with this stuff all the 
time, but when my eyes deceive me it's tough to find the problem :)

    -Steve

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

Re: question on symbolic links and windows

Posted by Steve Whitson <st...@gmail.com>.
Paul Koning wrote:
>  Steve> I expect and want a regular file in place of the symbolic link
>  Steve> on windows (as stated in the book).  How can I achieve this?
>
> You are getting what the book describes.
>
> If what you want is a second copy of the linked-to file, that would be
> a new feature.
>
> It would also be a very messy thing to do, because you'd have two
> independent copies of the file on Windows but only one on other
> operating systems.  So on Windows you could create a working directory
> where the two are different.   They might perhaps *both* be modified
> in different ways.  
>
> When you commit those changes, what would you expect to happen?  I
> can't think of any sensible answer.
>
>       paul
>
>   
Not to make any claims that one is better than the other... but this 
case is handled fairly well under clearcase.  I'm not sure how it would 
handle the case were I modify both (the link content and the target) but 
(from windows) I do revise the link target and all the links are 
instantly revised upon commit (check-in).

Thanks much,
    -Steve

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

Re: question on symbolic links and windows

Posted by Paul Koning <Pa...@dell.com>.
>>>>> "Steve" == Steve Whitson <st...@gmail.com> writes:

 >>> For example, my repsoitroy has the following structure as a test
 >>> ./test.txt ./testfolder/test.txt -> ../test.txt
 >>> 
 >>> When this is checked out on windows the file .\test.txt is fine,
 >>> but the file testfolder\test.txt contains the text "link
 >>> ../test.txt".
 >>> 
 >>> What am I doing wrong?
 >>> 
 >>  Nothing. Symlinks don't work on Windows. NTFS lacked the ability
 >> to create true *NIX-like symlinks until Vista was released, and
 >> Subversion doesn't attempt to guess at whether that functionality
 >> is available or not - it assumes that it's not if you're on
 >> Windows.
 >> 
 Steve> From the svn book: /When a symlink is committed into a
 Steve> Subversion repository, Subversion remembers that the file was
 Steve> in fact a symlink, as well as the object to which the symlink
 Steve> "points."  When that symlink is checked out to another working
 Steve> copy on a non-Windows system, Subversion reconstructs a real
 Steve> filesystem-level symbolic link from the versioned symlink. But
 Steve> that doesn't in any way limit the usability of working copies
 Steve> on systems such as Windows that do not support symlinks. On
 Steve> such systems, Subversion simply creates a regular text file
 Steve> whose contents are the path to which to the original symlink
 Steve> pointed. While that file can't be used as a symlink on a
 Steve> Windows system, it also won't prevent Windows users from
 Steve> performing their other Subversion-related activities./

 Steve> I expect and want a regular file in place of the symbolic link
 Steve> on windows (as stated in the book).  How can I achieve this?

You are getting what the book describes.

If what you want is a second copy of the linked-to file, that would be
a new feature.

It would also be a very messy thing to do, because you'd have two
independent copies of the file on Windows but only one on other
operating systems.  So on Windows you could create a working directory
where the two are different.   They might perhaps *both* be modified
in different ways.  

When you commit those changes, what would you expect to happen?  I
can't think of any sensible answer.

      paul


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

Re: question on symbolic links and windows

Posted by Brad Stiles <br...@gmail.com>.
Steve Whitson <st...@gmail.com> wrote:

> Yep... you are correct, I'm getting exactly what the documentation
> states.  I kept reading it the way I wanted to hear it skipping over
> the "whose contents are the path to which" part.  Not allowing files
> as externals and not supporting (on windows) symlink replacement with
> real content is going to make things tough as a replacement for
> clearcase.

What does CC do with them on Windows versions where they aren't handled?

> Does anyone have any suggestions or good alternatives?

Ignore them on Windows; you can't do anything with them anyway.



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

Re: question on symbolic links and windows

Posted by Er...@datacard.com.




> > Yep... you are correct, I'm getting exactly what the documentation
> > states.  I kept reading it the way I wanted to hear it skipping
> > over the "whose contents are the path to which" part.  Not allowing
> > files as externals
>
> Just to clarify, it's not that Subversion is intentionally
> disallowing externals to work with files; it's just that nobody's
> programmed it yet.
>
> http://subversion.tigris.org/issues/show_bug.cgi?id=937


Last I heard, support for svn externals for individual files is scheduled
to be a part of the 1.6 release - is that still the case?

NOTICE � This message and any attachment(s) are for authorized use by the intended recipient(s) only and may contain privileged or confidential information.  Unless you are an intended recipient, you may not use, copy, retain, or disclose to anyone any information contained in this message and any attachment(s).  If you are not an intended recipient of this message, please immediately contact the sender and delete this message and any attachment(s).


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

Re: question on symbolic links and windows

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Sep 17, 2008, at 13:03, Steve Whitson wrote:

> Yep... you are correct, I'm getting exactly what the documentation  
> states.  I kept reading it the way I wanted to hear it skipping  
> over the "whose contents are the path to which" part.  Not allowing  
> files as externals

Just to clarify, it's not that Subversion is intentionally  
disallowing externals to work with files; it's just that nobody's  
programmed it yet.

http://subversion.tigris.org/issues/show_bug.cgi?id=937


> and not supporting (on windows) symlink replacement with real  
> content is going to make things tough as a replacement for clearcase.


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

Re: question on symbolic links and windows

Posted by Steve Whitson <st...@gmail.com>.
Yep... you are correct, I'm getting exactly what the documentation 
states.  I kept reading it the way I wanted to hear it skipping over the 
"whose contents are the path to which" part.  Not allowing files as 
externals and not supporting (on windows) symlink replacement with real 
content is going to make things tough as a replacement for clearcase.

Does anyone have any suggestions or good alternatives?

Thanks much for the help with my oversight!

    -Steve

Brad Stiles wrote:
> Steve Whitson <st...@gmail.com> wrote:
>
>>>> When this is checked out on windows the file .\test.txt is fine,
>>>> but the file testfolder\test.txt contains the text "link
>>>> ../test.txt".
>
>> From the svn book:
>> <some snipped>
>> On such systems, Subversion simply creates a regular text file whose
>> contents are the path to which to the original symlink pointed. While
>> that file can't be used as a symlink on a Windows system, it also won't
>> prevent Windows users from performing their other Subversion-related
>> activities.
>>
>> I expect and want a regular file in place of the symbolic link on
>> windows (as stated in the book).  How can I achieve this?
>
> Based on the detail you provided, it looks to me like you *are* 
> getting a "regular file", one that contains the path to which the 
> original link points, just as the book says.  What is it you are 
> expecting beyond what's been indicated in the documentation?
>
> Brad
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>


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

Re: question on symbolic links and windows

Posted by Brad Stiles <br...@gmail.com>.
Steve Whitson <st...@gmail.com> wrote:

>>> When this is checked out on windows the file .\test.txt is fine,
>>> but the file testfolder\test.txt contains the text "link
>>> ../test.txt".

> From the svn book:
> <some snipped>
> On such systems, Subversion simply creates a regular text file whose
> contents are the path to which to the original symlink pointed. While
> that file can't be used as a symlink on a Windows system, it also 
> won't
> prevent Windows users from performing their other Subversion-related
> activities.
>
> I expect and want a regular file in place of the symbolic link on
> windows (as stated in the book).  How can I achieve this?

Based on the detail you provided, it looks to me like you *are* getting 
a "regular file", one that contains the path to which the original link 
points, just as the book says.  What is it you are expecting beyond 
what's been indicated in the documentation?

Brad 


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

Re: question on symbolic links and windows

Posted by Andy Levy <an...@gmail.com>.
On Wed, Sep 17, 2008 at 13:45, Steve Whitson <st...@gmail.com> wrote:
> Andy Levy wrote:
>
> On Wed, Sep 17, 2008 at 13:19, Steve Whitson <st...@gmail.com>
> wrote:
>
>
> I have the need to support symbolic links in my repository.  But, when
> checked out on windows I'm not getting the regular file the symlink points
> to, but instead end up with a text file having content "link
> ../somefile.txt".
>
> For example, my repsoitroy has the following structure as a test
>   ./test.txt
>   ./testfolder/test.txt -> ../test.txt
>
> When this is checked out on windows the file .\test.txt is fine, but the
> file testfolder\test.txt contains the text "link ../test.txt".
>
> What am I doing wrong?
>
>
> Nothing. Symlinks don't work on Windows. NTFS lacked the ability to
> create true *NIX-like symlinks until Vista was released, and
> Subversion doesn't attempt to guess at whether that functionality is
> available or not - it assumes that it's not if you're on Windows.
>
>
> From the svn book:
> When a symlink is committed into a Subversion repository, Subversion
> remembers
> that the file was in fact a symlink, as well as the object to which the
> symlink "points."
> When that symlink is checked out to another working copy on a non-Windows
> system,
> Subversion reconstructs a real filesystem-level symbolic link from the
> versioned
> symlink. But that doesn't in any way limit the usability of working copies
> on systems
> such as Windows that do not support symlinks. On such systems, Subversion
> simply
> creates a regular text file whose contents are the path to which to the
> original symlink
> pointed. While that file can't be used as a symlink on a Windows system, it
> also won't
> prevent Windows users from performing their other Subversion-related
> activities.
>
> I expect and want a regular file in place of the symbolic link on windows
> (as stated in the book).  How can I achieve this?

Re: question on symbolic links and windows

Posted by Steve Whitson <st...@gmail.com>.
Andy Levy wrote:
> On Wed, Sep 17, 2008 at 13:19, Steve Whitson <st...@gmail.com> wrote:
>   
>> I have the need to support symbolic links in my repository.  But, when
>> checked out on windows I'm not getting the regular file the symlink points
>> to, but instead end up with a text file having content "link
>> ../somefile.txt".
>>
>> For example, my repsoitroy has the following structure as a test
>>   ./test.txt
>>   ./testfolder/test.txt -> ../test.txt
>>
>> When this is checked out on windows the file .\test.txt is fine, but the
>> file testfolder\test.txt contains the text "link ../test.txt".
>>
>> What am I doing wrong?
>>     
>
> Nothing. Symlinks don't work on Windows. NTFS lacked the ability to
> create true *NIX-like symlinks until Vista was released, and
> Subversion doesn't attempt to guess at whether that functionality is
> available or not - it assumes that it's not if you're on Windows.
>   
 From the svn book:
/When a symlink is committed into a Subversion repository, Subversion 
remembers
that the file was in fact a symlink, as well as the object to which the 
symlink "points."
When that symlink is checked out to another working copy on a 
non-Windows system,
Subversion reconstructs a real filesystem-level symbolic link from the 
versioned
symlink. But that doesn't in any way limit the usability of working 
copies on systems
such as Windows that do not support symlinks. On such systems, 
Subversion simply
creates a regular text file whose contents are the path to which to the 
original symlink
pointed. While that file can't be used as a symlink on a Windows system, 
it also won't
prevent Windows users from performing their other Subversion-related 
activities./

I expect and want a regular file in place of the symbolic link on 
windows (as stated in the book).  How can I achieve this?

Thanks much,
    -Steve




Re: question on symbolic links and windows

Posted by Andy Levy <an...@gmail.com>.
On Wed, Sep 17, 2008 at 13:19, Steve Whitson <st...@gmail.com> wrote:
> I have the need to support symbolic links in my repository.  But, when
> checked out on windows I'm not getting the regular file the symlink points
> to, but instead end up with a text file having content "link
> ../somefile.txt".
>
> For example, my repsoitroy has the following structure as a test
>   ./test.txt
>   ./testfolder/test.txt -> ../test.txt
>
> When this is checked out on windows the file .\test.txt is fine, but the
> file testfolder\test.txt contains the text "link ../test.txt".
>
> What am I doing wrong?

Nothing. Symlinks don't work on Windows. NTFS lacked the ability to
create true *NIX-like symlinks until Vista was released, and
Subversion doesn't attempt to guess at whether that functionality is
available or not - it assumes that it's not if you're on Windows.

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