Almost Everything in Subversion


Every file I use on a day to day basis — excluding only data shared with other people, email folders, and bulk media — is kept in a big subversion repository. For the five years that I’ve been doing this, I’ve averaged 3.5 commits per day. Overall it works really well. Advantages of this scheme include:

  • Seamless operation across Mac, UNIX, and Windows.
  • I’m always using a local copy of data, so access is fast and there’s no problem if I lose the network.
  • Synchronization is fast and low-bandwidth, so it works fine using airport and coffee shop connections.
  • My machines become stateless; reinstalling an OS is hassle-free and I never backup hard disks anymore.
  • Explicit add of files means that large temporary objects are never dragged across the network.

On the other hand, a few aspects of the plan are less than ideal:

  • Explicit push, pull, and add means I have to always remember to do these, though I seldom forget anymore.
  • Every now and then I have a file that seems a bit too large to checkin to svn, but that doesn’t really fit into my bulk media backup plan.
  • Subversion’s diffing and patching is geared towards text files, and works less than ideally for binary objects such as the .docx and .pptx files I sometimes need to deal with.

But overall I’m totally happy with working this way and probably won’t change for years to come.


14 responses to “Almost Everything in Subversion”

  1. I started using Dropbox recently and I have been really happy with it. It seems pretty similar to your setup except there is no explicit push or pull.

    But my ideal scheme would include backing up all my software (so I don’t have to reinstall everything when I get a new machine) – but that probably would have licensing issues.

    Also I haven’t figured out how to get Dropbox to play nicely with iTunes.

  2. FWIW, Racket has (semi-) recently switched from svn to git and the offline/coffee shop aspect of this definitely gets better and I’ve started using git for my pile files that fit those characteristics (but I still back up my harddrives … just in case …)

  3. Mugizi- Dropbox sounds cool, I’ll have to check it out.

    Robby, I wouldn’t have thought that git would have significant advantages over svn for single-user stuff, am I wrong? Obviously I’ll need to grok git (or one of its equivalents) at some point but I’m hoping to put it off for a while.

  4. The main advantage of git or distributed vcs for single-user is that you make local commits. This means you can have local version control without connectivity.

  5. So where do you store this repository? On a machine you administer (and have to worry about backing up, keeping up, etc.), on department servers, etc?

  6. I have been doing the same thing for about 8 years, except that I switched from CVS to subversion around 3 years ago. I also get my graduate students to use it…

    Dropbox is a commercial service. Who knows whether they will be around in 5 years, or how much they’ll charge. And can you customize it the way you can with subversion…?

  7. Git allows for offline commits, which is certainly a win even for single-user mode. Git also has superior support for branching. This matters for single-user mode only if you choose to model your work this way.

    There is definitely a learning curve associated with Git. The initial part of the curve is unlearning a bunch of the assumptions that a CVS or SVN user would naturally carry forward.

  8. Also: with Git, since one’s repository is local, one might argue that it’s not really a stateless model. Local commits allow you to build up as much local state as you like, which you must remember to push to others. The right mental model would be “easily replicatable,” I guess.

  9. SVN is fantastic, and I use it the same way. The problem I see with dropbox (apart from the other ones mentioned) is that version navigation is web-based. The dropbox folder on my machine is just the folder itself, and I have to go to the web to get older versions.

    But SVN is not great for collaborative work OUTSIDE the department. This is an idiosyncrasy of our department, but since authentication is via userid, I can’t share things with outside collaborators. In fact, I’m using dropbox right now for such collaborations, and it’s nifty for that.

    One killer app for dropbox: lecture notes ! I write the notes on my machine and send it to dropbox, and then when I lecture, it’s on my phone for easy viewing 🙂

  10. I also started using Dropbox recently, and I am thoroughly impressed.

    I have the exact same concerns that Daniel has, but I am not too worried if Dropbox suddenly decides to disappear: all my files are stored on my own computers as well.

  11. If you don’t check the larger files into Subversion only because you may not have the space on each disk with a Subversion checkout then you might consider using scord (http://scord.sf.net/) with Subversion. Scord omits the Subversion pristine copy of a file when the working copy is unmodified. Scord won’t help if you are also limited in space on the disk that contains the Subversion repository.

  12. Thanks all, this is good stuff to know. Chris, scord looks like a great hack for storage-constrained devices.

    Rob, my svn repo is on the CS department servers. These are the most stable machines I have access to (far more stable than Dreamhost where this blog lives, for example).

    Suresh, you can expose a svn repo to people outside the department who lack accounts, though in practice alternatives like Dropbox are perhaps easier and better.

  13. I love Dropbox too; I highly recommend it. And because you always have local copies of your files, it doesn’t really matter if the company goes kaput at some point. 2GB of space for free is plenty for everything at the moment.

    I also second the recommendations of the distributed version control systems. Mercurial and git are similar, mostly equi-functional I’d say. As it happens, I’m using both systems at the moment, with perhaps a slight preference for git despite its god-awful command-line interface. There’s a nice Mercurial tutorial at http://hginit.com

    See particularly the intro to DVCS for Subversion users at

    http://hginit.com/00.html

    Everything it says of Mercurial is true of git too.

  14. Ok I have now tried out Dropbox and it is pretty awesome and I’ll use it.

    But certainly it won’t replace svn as my workhorse file sync tool.