Category Archives: subversion

Browsing old versions of a subversion repository

I was trying to look at the contents of an old file in subversion today that had long ago been deleted, with no luck. In the Eclipse plugin for CVS, they had a feature that would allow you to define a date, then browse the repository based on that date, but it seems to be missing from subversion.

I found a workaround, but it isn’t quite as nice. You can browse a specific revision of the entire subversion repository, then look at the file. All you have to do is go to this URL:

http://<host>/<repo>/!svn/bc/<revision>/

Where the base URL is the root of your repository, and the extra stuff after the ! specifies the revision. And don’t ask me what bc stands for, I have no idea.

As for finding out which revision to look at, that is a little tricky. It can be helpful to look at logs of other files and see which dates correspond to which revisions.

Subversion

Today I came across two interesting things about Subversion. First of all, I think I installed the binary version from the Subversion web site on my Mac, since it is in /usr/local/bin, so I dunno if these are true about the one that comes with Leopard. Anyway, I just typed “svn commit” and emacs opened up. I didn’t even know I had emacs. So, apparently emacs is the default editor on this build of svn. Once I stumbled my way through the editing of the commit message, and remembered the key sequence to quit (CTRL-X, CTRL-C), a dialog popped up on my mac prompting me to allow the command line version of svn access to my keychain. I accepted and didn’t have to type in my password. Pretty fancy.