Reputation: 18855
Sample scenario:
I have a web project and an associated SVN repository. I have 1 file index.html and 3 committed revisions of that file:
revision 3:
<p>This is revision 3</p>
revision 2:
<p>This is revision 2</p>
revision 1:
<p>This is revision 1</p>
This is located in the repo root at http:127.0.0.1/svnhistoryviewer/index.html
When I view this in the browser I get
This is revision 3
(as expected because that's the latest).Is there a way I can view the previous revisions in the front end? Also, can I do this with tags of the project?
Been searching a while without luck. I did read something about appending /!svn/bc/REVISION_NUMBER
to the URL, but it's just 404ing when I try that.
EDIT:
Further answers to this question have suggested that ?p=REVISIONNUMBER should pull up that version of the file, however I've had no luck.
I am clearly missing something fundamental about svn in general here. Does the working copy have to be running on some sort of 'svn server' or should a basic Apache HTTP server work? My set up is basically an Apache server running on an Ubunutu VM with a web root that happens to contain an svn repository containing a site that was checked out from SourceForge.
Upvotes: 1
Views: 2283
Reputation: 107080
There are tools that allow you to browse your Subversion repository via a web browser. For example, Sventon is a favorite of mine. However, these tools let you view your files as .... files. They purposefully remove all special entities from the files in order to show you your file as it appears. This allows you to integrate your Subversion repository with tools like Jenkins and Jira. These tools will link to a particular revision of your Subversion repository via Sventon, and then you can click on the link, see the file information, do diffs, etc. This does not sound like what you want to do.
However, you've mentioned appending /!svn/bc/REVISION_NUMBER
to the URL. That's not how it works. You put this between the URL root and your repository directory structure:
http://svn.vegicorp/svn/repo_name/trunk/foo/bar #This shows you the latest revision
http://svn.vegicorp/svn/repo_name/!svn/bc/1000/trunk/foo/bar #Revision 1000
See if that works for you.
Upvotes: 2
Reputation: 97295
you can see any historical revisions of any repository objects using special suffix in URL
http://URL-in-REPO?p=REV
, where REV is number of revision
Upvotes: 0