Mark A
Mark A

Reputation: 6171

Traveling Subversion repository offline on laptop, then sync with SVN server upon return

I am going to be traveling without network access (i.e. cannot access the subversion server in our data center). I have the latest version of the subversion repository checked out to my laptop and I'll be working on the project while I am out of the office. I would like to:

  1. Have a subversion server to check things into, do reverts, have history, etc. while I'm traveling. This would need to be installed on the laptop, obviously. I can get a backup of the svn repos if necessary.

  2. Check in all the changes (and hopefully the history, too) once I have access again.

I'm happy to use any technology (svn, git, hg) on the laptop but the end-all-be-all server is subversion.

I've read some other (older) posts including those below, but it is not clear if the history/all of the individual commits/versions can be added back to the server in the datacenter:

source control when away from office

Subversion Proxy for working offline?

http://www.aidanf.net/archive/blog/2007/12/10/using-git-offline-commits-subversion-repository

Upvotes: 3

Views: 1363

Answers (3)

TonySalimi
TonySalimi

Reputation: 8437

Install a local svn server on your laptop and keep your sources there. It does not generate a heavy workload. When you are out of office, commit your changes to your local server. When you become online, get a dump of your local repository and load it to your server. Then you can merge your changes into your main line.

p.s. it is not too much handy, but keeps your changes when the server is out of access.

Upvotes: 1

I don't think that what you want to achieve is possible, because if many people have local copies of the repository, each copy will evolve according to their own modifications. The patches/commits history will be different. The histories would not necessarily be reconcilable, just like patches sometime bear conflicts.

I have never heard of a tool allowing such reconciliation between subversion repository instances. Of course, you could keep a copy of each changes via patches and apply them when you are online again. But this is tedious, boring and painful.

My workaround for these offline situations is to create 10 check-out from the server and work on each one for each issue (or set of issue) I am solving. Then, I check them in one-by-one when I am back online and use the update function to 'synchronize' them. It is not perfect, but I find it a good workaround.

Hope this helps.

Upvotes: 1

Albin Sunnanbo
Albin Sunnanbo

Reputation: 47068

I would go for GIT-SVN. You can sync down code from the remote SVN repository, work with them locally in one or more branches, merge locally between branches and when you have connection you can push selected commits (in chunks of your desire) to the SVN repository.

The downside is that you have to learn git too, and that you have to choose what to sync back, the sync is not automatic. On the other hand you have a local flexibility and power that you can not get by svn alone.

Upvotes: 3

Related Questions