Mercurial as a database backend

Adam B cruxic at gmail.com
Fri Aug 10 10:50:20 CDT 2012


Hello all,

I have a question about Mercurial's internals.  I'm interested in using
Mercurial as a database backend for a peer-to-peer application.  One of the
main challenges I see with this is maintaining efficiency with hundreds of
thousands of records.  Logically each database "record" should be a
versioned file in the repository.  However, storing 100k+ files is a really
inefficient use of the disk, especially if the records are small.

What I wonder is, how difficult would it be to modify Mercurial to store
the files in, for example, a SQLite database?  Not the revlog mind you,
that would stay as-is.  I'm just talking about the working copy of each
file.  Is the Mercurial code base tightly coupled with the file system or
is it's interface with file system nicely factored into a few key
functions/classes?

I would only need to support the essential mercurial functions like: add,
remove, commit, revert, push, pull, update, merge, and log.

Any thoughts?

Thanks!
- Adam B.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20120810/e09fbb37/attachment.html>


More information about the Mercurial-devel mailing list