Hosting Subversion In the Cloud with Live Mesh
This afternoon I was going back through some of the code I’d written for various blog posts that I’d kept in a Subversion repository. During the move things have been in limbo and I haven’t had time to set up the SVN server again. I thought “Hmm, I wonder if I could host my Subversion repository in the cloud”.
Enter Live Mesh. It lets you add multiple devices to your mesh network and automatically synchronize your files between devices. Pretty cool stuff.
At first I thought it would be a great place to put all of my source code — then I could have the code on every computer. However, what if you have working code on your desktop, then open up the code on your laptop and introduce a few bugs. When you go to open up the project on the desktop again, those bugs are there automatically. The synchronization is great, but there’s no way to keep version information in case you want to revert to a previous snapshot of the files.
Anyone familiar with Subversion will remember that there are two main parts to an installation — the Subversion repository (could be local or remote) and another folder with the checked-out files. A not-uncommon setup for personal development work is to have a local Subversion repository as a directory on the local file system. I wonder what would happen if I used slapped a local repository installation into a Live Mesh folder? Well, it would get automatically synchronized between machines. All devices in the network would have an SVN client installed (e.g. TortoiseSVN) and pointed to the Mesh-synchronized folder. I think this just might work
For anyone interested, here are the steps that I followed to set this up.
Open up your Live Mesh Folders from My Computer:
Set up a new folder named “Subversion”. Make sure that all of the devices in your Live Mesh network are set to “When files are added or modified” in the synchronization options.
Browse over to the location (Subversion folder on my desktop), open it up, and create another folder inside called “Repository”.
Then, right-click on the Repository folder -> TortoiseSVN -> Create repository here. It’s important to note here that the extra “Repository” directory is important since you can’t directly create the repository in the “Subversion” folder one level up. There is some interaction between TortoiseSVN and Live Mesh that keeps it from working.
Then, go back to the desktop (or any other place) and make a folder called “Checkout”. Right-click on the Checkout folder and select “SVN Checkout…”
Make sure that the “URL of repository” field is pointed towards the “Subversion/Repository” directory and the “Checkout directory” field is pointed towards the “Checkout\Repository” directory and click OK.
There you go — use the checked-out subversion repository as you wish and just point your SVN client on each device to the Mesh-synchronized folder.
Hope someone finds this useful!
UPDATE: Looks like I’m not the first to think of doing this
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
April 2nd, 2009 at 5:05 pm
Would it be reasonable to include your working copy in the mesh as well? That way, you don’t have to commit changes if you just want to switch computers. I know it’s good practice to commit changes as they’re made, but you could hold off if you’re not quite ready but you need to change locations (like desktop to laptop, etc).
April 2nd, 2009 at 10:42 pm
Whoa, that’s a really good idea. Then you could have the best of both worlds. Plus, it makes more sense because then a commit can represent a logical addition of functionality, not just an “I’m going home now, probably should commit these changes, regardless of if they build or not.”
I like that, I’ll have to give it a shot.
April 17th, 2009 at 9:40 pm
[...] It turns out someboedy else had the same idea. [...]