svn checkout and update without the .svn directory
Asked Answered
D

5

17

I have a website under svn and I want to patch the live website with what's currently in the repository (i.e. effectively calling svn update on the live website), but I don't want .svn directories in every folder on the production website.

Is there a way to set up svn so that the .svn folder with version information is not in the same directory as the files under version control?

In git you can create and detatch a work tree and push updates to a project this way(according to http://toroid.org/ams/git-website-howto), I basically want to be able to do something similar in svn.

Dreadfully answered 27/6, 2009 at 12:59 Comment(1)
In reality I was thinking of rsync for a git tracked website, so thanks for the tip. P.S. svn was just an evolutionary step, by now of historical interest only. thanks again!Umpire
F
37

svn export works similarly to a checkout but without the .svn directories. However, you cannot update such a structure since it's not a svn working copy.

You can also configure the web server to disallow access to the .svn directories and just go with the checkout+update method.

Fiorenza answered 27/6, 2009 at 13:6 Comment(1)
See this question for information on how to do the second option: #215386Assured
U
7

How about rsync configured to not copy ".svn" directories?

rsync --exclude=.svn local_svn_copy webserver:site/

This can be re-run to refresh the webserver's copy.

Umpire answered 27/6, 2009 at 13:5 Comment(0)
B
2

httpd.conf:

<Directory ~ "\.svn">
    Order allow,deny
    Deny from all
</Directory>
Burnette answered 26/8, 2011 at 8:13 Comment(0)
A
1

As laalto has mentioned svn export makes for an easy but not very efficient method for updating a "working copy" when used repeatedly:

milen@dev:~$ svn export --non-interactive --force "<URL>" <directory>
Accommodative answered 27/6, 2009 at 13:23 Comment(0)
P
1

You could also use git-svn to create a git mirror of the website and then publish the way described in the article you linked. Obviously this isn't a straight forward solution though.

Phosphene answered 27/6, 2009 at 19:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.