tags:

views:

567

answers:

6

So i have this local SVN repo that i am using for my dev work on a particular project, and i also have a SVN repo setup on the customers media temple account for a more secure backup.

I do all of my development on my laptop so i don't always have an internet connection (hence the local SVN), so i was wondering if there is an easy way to push the changes i commit to my local repo onto the server repo?

+1  A: 

You should just do an SVN merge.

Bob Dizzle
+3  A: 

You will probably want to svn merge versions between repositories.

There are some good tutorials around how you can do that. Give a look at http://blog.red-bean.com/sussman/?p=92 or http://subversion.tigris.org/faq.html#multi-merge for a good introduction on that topic

Fernando Barrocal
+3  A: 

I know it's a stretch, but what you're attempting to do is not necessarily suited for Subversion, since it is a centralized revision control system (only one master copy of the repository).

Git is a distributed revision control system that would allow you to make offline commits, diffs and merges. You should check it out.

Nick Sergeant
With git-svn you can also commit to the local repo (which is tracking the remote SVN) and later push the diffs to the SVN repository.
Luca Tettamanti
+1  A: 

You could consider using Bazaar as a local repository then committing back to the central SVN server. Bazaar has some nice plugins to integrate distributed source control into an existing client-server source control system.

Jeff Mc
+1  A: 

If you are stuck with an SVN server, but want a local repository and easy sync between the two, you should use SVK. It creates a local mirror you can branch; commits to the mirror get merged back to the trunk.

millenomi
A: 

So the solution i came up with is the use the svnadmin dump/load functions. I am mainly using this with a Ruby on Rails project that i am deploying to a media temple account. The idea is that when a new version of the site is ready to be deployed, the code that is checked into my local repository will be dumped to a file, that file will then be copied to the server via ssh. Once on the server i will use ssh to execute a shell script that does the load into the server SVN. i will then check out that server code, copy it to the rails app directory, run the migrations, and then restart the server.

The thought is that by using this method i can ensure that the code that is currently in production is reflective of the most recent revision in the servers SVN repo.

Thanks for Fernando for providing the link to the dump/load functions.

For the record i did evaluate the Git solution before i posted this question, and due to the fact that i am using NetBeans as my IDE for this project (NetBeans has a really great Ruby/RoR plugin) the Git plugin for NB appears to be kinda buggy and didn't work quite right, whereas the SVN plugin is rock solid.

Jason Miesionczek