Jason Miesionczek
Jason Miesionczek

Reputation: 14448

Synchronizing SVN repo from local to server?

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?

Upvotes: 4

Views: 3147

Answers (6)

Jason Miesionczek
Jason Miesionczek

Reputation: 14448

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.

Upvotes: 0

millenomi
millenomi

Reputation: 6589

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.

Upvotes: 1

Jeff Mc
Jeff Mc

Reputation: 3793

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.

Upvotes: 1

Nick Sergeant
Nick Sergeant

Reputation: 38183

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.

Upvotes: 3

Fernando Barrocal
Fernando Barrocal

Reputation: 13192

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

Upvotes: 3

Bob Dizzle
Bob Dizzle

Reputation: 1163

You should just do an SVN merge.

Upvotes: 1

Related Questions