[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: problems with soft links on Windows

From: Erik Huelsmann <ehuels_at_gmail.com>
Date: Thu, 12 Jun 2008 21:08:29 +0200

On Thu, May 1, 2008 at 7:21 PM, Stefan K√ľng <tortoisesvn_at_gmail.com> wrote:
> Hi,
> Windows supports soft links as you may know. Those are different than the
> shortcut files. But they only work on NTFS.
> When using svn on such a softlink, it doesn't work.
> * create a softlink like this:
> mklink /D c:\dirsoftlink c:\workingcopy
> * svn info c:\dirsoftlink
> svn: 'c:\' is not a working copy
> svn: Can't open file 'c:\.svn\entries': (error message in OS language)
> This only happens with commands that expect a folder. Commands that can work
> on files (usually) work like 'svn st'.

This behaviour is to be expected: because the softlink is itself a
versionable item, it must be contained within a working copy, if you
want to run versioning commands on it. Ever since softlinks were
added as versionable, it's become impossible to create links to
versioned directories and expect commands issued on the link to be
following the link and act on the directory pointed to.

> The problem is in libsvn_subr/io.c, the function
> map_apr_finfo_to_node_kind() assumes for a filetype of APR_LNK that it's in
> fact a file, but such softlinks are not files but point to a folder.
> Is there a reason that links are assumed to be files?

The links are not assumed to be files, they are assumed to be
versionable elements. For versioned elements to report a status, they
must be inside a working copy.

I hope I'm explaining this clearly.


Received on 2008-06-12 21:08:50 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.