Working with SVN and DropBox without a dedicated SVN server

Posted in Productivity | SVN | DropBox at Wednesday, March 24, 2010 4:41 PM GMT Standard Time

What is DropBox?

DropBox is a service that keeps a certain folder in your computer sincronized with other computers (your laptop, desktop, dev server, your team`s dev machines, etc). Whatever file you put or change on your DropBox folder, it will be changed and syncronized across all your computers, whatever they are running Windows, Linux or Macintosh.

From DropBox.com web site:

  • 2GB of online storage for free, with up to 100GB available to paying customers.
  • Sync files of any size or type.
  • Sync Windows, Mac and Linux computers.
  • Automatically syncs when new files or changes are detected.
  • Work on files in your Dropbox even if you're offline. Your changes sync once your computer has an Internet connection again.
  • Dropbox transfers will correctly resume where they left off if the connection drops.
  • Efficient sync - only the pieces of a file that changed (not the whole file) are synced. This saves you time.
  • Doesn't hog your Internet connection. You can manually set bandwidth limits.

[read more about DropBox features on their web site...]

Ok, we are software developers, what about using DropBox as a code repository?

Some folks use DropBox as a code repository. DropBox allows file versioning and maintains the history of every change made on your code (see screenshot):

Using DropBox as source code repository
[Image: Using DropBox as code repository]

Yeah, but I prefer SVN for managing code (merging, tagging, branching...)

This DropBox thing is ok, but you sure prefer all the power behind SVN: merging, branching, tagging, etc... and of course, you may feel better knowing that SVN is open source (what if suddenly DropBox closes business and you lose all the history of your source code??).

In the other hand, you are a freelancer or a small team of developers and DON'T need or want to maintain a dedicated SVN server 24x7 on the internet.

The solution is pretty simple, keep reading:

How to work with SVN and DropBox checking code across computers with a global repository URL?

  1. Install DropBox in every machine you use for development. DropBox is multi-platform (Windows, Linux and Mac so far). If you use this link, we both get an extra 250Mb of free space.
  2. Install the proper SVN Server for your O.S, pointing the SVN repository to the DropBox folder, so it will be sincronized across all computers.
    Visual SVN Server for Windows

    Using DropBox as source code repository
  3. If you want to use a global SVN URL across machines (ex: http://svn.mycoolcompany.com/svn/myproject), you need to modify hosts file so it points to localhost. The hosts file is used by your computer in the first attempt to resolver a name into an IP adress. You need to edit it, and add a line like this (make sure you open the file with the right permissions)
    127.0.0.1   svn.midominio.com  #whatever domain or subdomain you choose will work.
    
    Editing HOSTS file

    Cheching out from SVN using the global URL
    If you add the above line to HOSTS file in every computer, you could checkout a project like https://svn.iloire.com/svn/myproject, no matter in which computer you are at, since every computer will resolve that to localhost, and will connect to the local repository sincronized with DropBox.

And you got it, you have just created a SVN environment that will be online 24x7 without a dedicated SVN server using DropBox!

AddThis Social Bookmark Button