I want to set up a symbolic link from my svn to the /var/www folder in Debian, because I run a web server there, is that possible or do I need to use another technique?
-
What exactly do you mean by "from my svn"? Do you mean a working copy? – Pekka Feb 02 '12 at 20:23
-
I am running my own SVN repository on the same machine as my apache server and I want to make a symlink from SVN to apache folder – Marc Went Feb 02 '12 at 22:00
1 Answers
I am running my own SVN repository on the same machine as my apache server and I want to make a symlink from SVN to apache folder
You mean a real physical repository? That won't work - have you looked into the path you want to link to? You won't see any of your files or folders, SVN has its own specific storage format. The best thing to do is probably to export into a clean folder:
svn export repo-url /var/www/mysite
or to check out a working copy (which is not really a good idea because SVN's invisible control files will be available on the web - see this question on how to hide them):
svn co repo-url /var/www/mysite
and to update, inside the working copy:
svn up .
of course, this will not automatically update if the repository changes. As far as I know, it's not possible to directly link to a SVN repo in the way you want to.
-
I know I can add a symlink in Windows using TortoiseSVN, where the link is updated with the updates from SVN, I was hoping this would work on linux as well – Marc Went Feb 03 '12 at 08:27
-
@Dunky huh? That would be news to me. Can you tell me which function you are using for that? – Pekka Feb 03 '12 at 09:43
-
in cmd i type: mklink /D C:\Users\Dunky13\Documents\somefolder\to_link_to C:\Users\Dunky13\Documents\svnfolder\ – Marc Went Feb 03 '12 at 09:53
-
@Dunky But what *exactly* is `svnfolder`? The repo, or a working copy? I guarantee you it's not the actual repo. If anything, it's a working copy, and that won't auto-update if the repo gets updated. – Pekka Feb 03 '12 at 09:55
-
No my point is, on windows I have used tortoiseSVN to connect to my repository that is being hosted on my VM - running debian -, I used SVN checkout and SVN update to download the folders and files from the SVN repo and linked these downloaded folders to my folder I wanted it to be linked to, I want to know if I could do such link also in my debian from SVN to apache folder, what I found out are the hooks post-commit, I need a script to export the committed files – Marc Went Feb 03 '12 at 09:59
-
@Dunky what you describe is called a "working copy". That's easy, I added the info above. (It needs manual updating using "update", as you say.) – Pekka Feb 03 '12 at 10:05
-
but if I use this inside post-commit, wont it update itself?, what I found out as well, my repo is located in: /home/root/svn/[repo], but when I try to connect I need to type: svn://[whole ip]/home/root/svn/[repo] – Marc Went Feb 03 '12 at 10:11