Is it possible to check svn against the database?

I am writing a small webapp that allows users to view a Visual SVN server. I would like to add an online editor like github in this webapp so that users can edit files online, leave a message, and the changes appear in the repository.

To do this, I need to check the files locally. My idea was to check them out in mongodb, so I can save the changes per user as a local working copy.

Is there a way (without overriding the svn protocol) to do the check in the database, or even just in memory, and then write it to the database.

If you have any questions, just ask :)

Btw. if anyone is interested here is the code


source to share

1 answer

There is no way to do it svn checkout

directly in the database. But there are some options.

First of all, you can simply create a virtual disk that resides in memory and run checks on that disk. Than you can store the extracted files in the database.

Another option is to use the rich Subversion API directly. Note that Subversion is written in C, so you will need to build a bridge between Node.js and SVN (as far as I remember, there are no official Subversion bindings for Node.js, but for Python and Java, and there is an unofficial nodesvn package for Node. js). Using the API, you can implement your own "in-database" working copy.

You can also use the utility svnmucc

(which comes with VisualSVN Server) to commit transactions directly to the repository (without creating a working copy). If you combine it with svn ls

, svn info

etc., you can implement viewing and editing of files in the repository.



All Articles