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

subversion can't commit project under symlink?

From: Steve Lefevre <slefevre_at_restcon.net>
Date: Fri, 18 Dec 2009 12:10:18 -0500

I have a subversion project checked out in a directory. I created a
symlink name for the directory, and svn seems to behave differently
depending on whether I reference the project by the real directory name,
or the symlink. The symlink works okay for commands like "status" and
"add", but it fails on "commit"! ( Using the real directory name works
for all commands, at least the ones that I've used. ) I'm using version
1.4.2.

Here is the symlink directory working just like the real directory when
I add files and ask its status:

|$> svn status real_directory/
A real_directory/new_file.txt
$> ln-s real_directory/ symlink
$> svn status symlink
A symlink/new_file.txt
$> svn status real_directory/
A real_directory/new_file.txt
$> touch symlink/another_new_file.txt
$> svn status symlink
? symlink/another_new_file.txt
A symlink/new_file.txt
$> svn add symlink/another_new_file.txt
A symlink/another_new_file.txt
$> svn status symlink/
A symlink/another_new_file.txt
A symlink/new_file.txt
|

However, this symlink directory fails on the commit command:

|$> svn commit symlink/ -m"test commit"
svn: '/home/restcon' is not a working copy
svn: Can't open file'/home/restcon/.svn/entries': No such file or directory
|

Huh? That's weird. Svn certainly thinks that file exists when I do
|status| and |add|! Maybe it got deleted?

|$> ls symlink/.svn/entries
symlink/.svn/entries
|

Nope, still there. Does it still have data in it?

|$> ls-lha!$
ls-lha symlink/.svn/entries
-r--r--r-- 1 usergroup 14K 2009-12-18 06:36 symlink/.svn/entries
|

Yup, seems to be okay! Alright, forget trying to commit the directory by
its symlink. What about just committing the directory by its real name?

|$> svn commit real_directory/ -m"test commit"
Adding real_directory/another_new_file.txt
Adding real_directory/new_file.txt
Transmitting file data..
Committed revision1144.
|

Works fine. Why does svn work with |add| and |status| on a symlinked
directory, but not |commit|?

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2431531

Please start new threads on the <users_at_subversion.apache.org> mailing list.
To subscribe to the new list, send an empty e-mail to <users-subscribe_at_subversion.apache.org>.
Received on 2009-12-18 18:11:40 CET

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

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