views:

5627

answers:

2

I created a symbolic link from /www/dir2/ to /home/dir2/ I then added it to the repository ( svn add /www/dir2/ ) Now if I go into that directory, and try to do anything with svn in there I receive a "svn: warning: '.' is not a working copy" error.
If I try to add a subdirectory (svn add /www/dir2/dir5 ) I receive the error:
svn: 'dir2' is not a working copy
svn: Can't open file 'dir2/.svn/entries': No such file or directory I tried committing the directory addition and that worked fine

From the log:
Changed paths:
A /www/dir2
svn pl dir2/
Properties on 'dir2':
svn:special

Any help would be appreciated. Thanks!

+3  A: 

Subversion does not follow symbolic links. When a symlink is committed, it is stored in the database as a regular file with the svn:special property set. See the manual for more information.

If you want to add that directory to the repository, you will have to move (not symlink) it in to your working copy and then add it.

sirlancelot
+1  A: 

An alternative (usually only if you have a directory symlinked that you hoped svn would follow) would be to use something like:

mount --bind /real/path/to/dir /path/inside/working/dir

You could then add that path to the repo without problems.

In most cases, just moving the directory is a better idea (it won't clutter up fstabs, you won't have to remount it all the time, etc) -- but I figured I'd pass a tip along that can save you from doubling a directory just in the name of committing it.

Jim