Automatically export contents of svn repository to another directory?
First, I would like to clarify a quick question I have, am I right in thinking that files in svn repo don't actually exist in the heirarchical structure you see when you check them out?
I have tried to use svn export ~/svn/project1 ~/public_html/project1
but it didn't work.
What I actually want is to have the export command automatically executed when I do a commit so that I can see my changes immediately in a we开发者_Go百科b browser.
am I right in thinking that files in svn repo don't actually exist in the heirarchical structure you see when you check them out
Correct... they actually exist in a DB of sorts in the repository directory. However you can invoke svn export on a working copy or a respoitory url. So lets say your repo is on the system at /svn/myproject
and you have a working copy of trunk
at ~/myproject
then either of the folloring commabds will export properly:
svn export --force ~/myproject ~/public_html
svn export --force file:///svn/myproject/trunk ~/public_html
ofcourse you can subsitute the svn
, http
, or svn+ssh
for the file
protocol depending on how your access is set up.
Yes; see Where are my svn files?
Automatically exporting can be done with a post-commit hook.
精彩评论