easily retrieving old things

so, some fun and kerfuffle with firefox shortcuts and svn today! blodgett have made two happy discoveries which it record here for the future oh-so-interested parties.

1) since version 1.6 (now celebrated its 2nd birthtag, much like blodgett), subversion’s web interface properly support viewing old repository versions by appending “?r=[old-revision]” to URL, where [old-revision] are the version you want to see.

(supports also the peg argument for convoluted file histories, see here http://svnbook.red-bean.com/en/1.5/svn.advanced.pegrevs.html and here http://subversion.apache.org/docs/release-notes/1.6.html#historical-uris for detail)

2) blodgett, being ever lazy, wished to use nifty firefox keyword bookmark/shortcut to access this. unfortunately svn web client not handle neatly the url “[repo]/?r=”, but “[repo]/?” work fine. so blodgett’s shortcut need to pass whole revision string “r=[n]”. blodgett’s accustomed method for this is to put “%s” into bookmarked url where shortcut text goes, but this makes firefox url-encode shortcut string, so equals sign “=” get converted to “%3D”. this definitely not desired outcome, as svn want “r=34”, not “r%3D34”. understandable.

happily this eventuality are accounted for here: http://kb.mozillazine.org/Using_keyword_searches#Creating_bookmarks_with_keywords. simply use “%S” in bookmark url for unescaped/unencoded shortcut text.

summary:
blodgett’s bookmarked svn url are now “[repo address]/?%S”, with shortcut keyword “svn”. if blodgett type “svn”, it gets latest repository revision for browsing. if blodgett type “svn r=34” it get repository as at revision 34 for browsing. neat and tidy!

Comments are closed.