Is anyone aware of a way to access all revisions of a subversion repository within a file system? I would really benefit from being able to reference a file locally as, for example, "/var/svn/repo/rev4235/project/trunk/file.c" or such like.
I can fairly straightforwardly write some scripts to manually stage different versions of files out of subversion in a manually created directory tree or something, but directly reaching into svn would be much more preferable.
[aside: I'm aware of svnfs but this only presents the current revision, and whilst I've been able to create the exact functionality I need on apache, I can't see any way to maybe mount that web server e.g. httpfs (needs file range access which I don't think is possible infront of a mod_dav_svn service) or mod_dav & davfs etc... (can I provide read only mod_dav access infront of mod rewrite infront of mod_dav_svn??!?!)]
Thanks
Chris
I'm not sure I read you right, but if all you need to do is have local repository access form scripts running on the same box, you can use the
file://
URI scheme with the svn command-line tool:Most svn commands will work on this and you can even commit to it, so long as the user has write access to the repository filesystem. This should work regardless of the DB backend you choose for your repository.
Note that this bypasses authentication if that happens to be configured elsewhere (such as in the apache config); which could be an issue, depending on your environment.
Hmm, well this is yet another example of not understanding my own requirements from not knowing SVN nearly as well as I really need to. I just needed to create tags of each version I would want to access, and then there's no need to ever hack around the back to reach a specific revision. No wonder things don't make sense to some people when my requirements are only defying conventions and largely redundant.
Thanks for the responses though, appreciated
You could slurp the repo into git (long one-time import):
And use git fs to access the contents.
Disclaimer: git fs is my work.
No, there's no way to do this with the SVN FS. It stores all deltas in files in the repo/db/ folder, 1 file per changeset that includes all the deltas for each changed file. If you run svnadmin pack occasionally, these files will all be packaged together into a single file eventually (when you get to 1000 files in the directory).
So.. no, there's no filesystem way of getting to a whole file by browsing the repository storage.
However - you can access SVN over webdav, or the file:// URI. I'm not sure if you can have mod_dav read only and mod_dav_svn read-write (you can have RW access to svn HEAD using webdav). I think the best way is to use the file mechanism for scripts, its not difficult to use it via SVN commands.
Why not simply use svnFS. It's all in all what you are looking for.
At least it's easier than migrating the repo over to git, just to use git fs.