CodeIgniter Forums

Full Version: How to sync svn repository to my public_html folder?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Kryptonian[/eluser]
Hello Guys,

How can I update my live server when I already have a SVN repository? What is the svn syntax for the sync of repository to the live server folder (public_html)

Thanks a lot ;-)

El Forum

[eluser]webthink[/eluser]
Why not just 'svn update' on the server? Assuming you've done svn checkout already

El Forum

[eluser]Kryptonian[/eluser]
Hi webthink, thanks for the reply. Ok i will just checkout my repository to the public_html folder then svn update. Smile

El Forum

[eluser]Seppo[/eluser]
It would be better "svn export" instead of checking out the code in the live version... This way you won't have the .svn folders created on your server, which will look ugly,

El Forum

[eluser]webthink[/eluser]
@seppo
The only issue with that is that if you have any folders in your repo whos purpose is to house files written by the webserver (cache etc) then it becomes more work to preserve their contents when updating. You can't simply rm -r the whole directory and then write over it with the exported files. svn update would preserve those files. I can see the merit in both approaches though.

El Forum

[eluser]Seppo[/eluser]
Well... a better way to upload changes, as I see it, is actually downloading the live site, comparing to your svn version, looking for the difference (using meld, kdiff) and then uploading...
That's the way I'm working right now...

El Forum

[eluser]webthink[/eluser]
rsync has options that would allow you to skip certain folders. You could export locally and then rsync to your server without downloading anything. That could work too.

El Forum

[eluser]sikkle[/eluser]
lot of people will prefer using a tool to do deployement, one of the greatest so far is capistrano.

good luck.