tags:

views:

2004

answers:

3

I know how to browse my project's subversion repository through its web front-end, but it seems that I can only browse the latest revision of the trunk. Is there a way to browse an older revision of the trunk through the web-ui?

I know how to do this from the command-line, but I need to know how to do this using URL's, because I'm embedding these URL's into a document. I also know I could create an svn-style tag of the trunk, but I would prefer not to do that.

A: 

The built-in web interface does not allow retrieving of old revisions (or any other info than what you've already seen). You can install third-party web-based repository browsing software to get around this limitation. I haven't used any myself, so I'm not going to offer recommendations, but I'm sure others will (a quick google search will help you find some too).

rmeador
as SebaGR notes, it is possible to access older revisions if you manipulate the URL directly. There is no UI for doing this however. It's quite a surprise to me that this is possible at all, since I've been repeatedly told it isn't...
rmeador
In Subversion 1.6.0 the ?p= and ?r= arguments where added as public (and documented) feature.
Bert Huijben
+11  A: 

Append something like this to your repository URL:

!svn/bc/<revision_number>/

E.g.

http://www.example.com/svnrepository/!svn/bc/3/
Seb
I am absolutely stunned this works... (I just checked and it does). I've been told many times it's not possible. Note that the string mentioned must be right after the repo root in the URL, then you can put subdirs of the repo after it.
rmeador
Be careful with that: this is not officially supported and can change anytime with a new release. Even though it has been the same since the very beginnings of svn...
Stefan
If your repository is hosted using Subversion 1.6.0 or lateryou can use http://www.example.com/svnrepository/?p=3 for the same result... This method /is/ documented. (?r= revision of the file, ?p= operational revision of the url). See the subversion 1.6 release notes
Bert Huijben
A: 

It depends on the svn webclient you're using. In the case of trac (and maybe some others), just add the the parameter rev= to the querystring.

i.e. http://trac.example.com/log/trunk/client/filename?rev=123

Kentaree