views:

458

answers:

5

I like how SQLite library can be included into an application and the application has a full-fledged database to use.

Similarly, is there an open source versioning library that I can include into my application so that I can save versions of files as well as do diffs and merges?

A: 

In my opinion Firebird is one of the best choices for embedded DB scenarios.
Also Microsoft SQL Server Compact (closed source, but free) might be suitable, however it less capable than Firebird.

EDIT: I misread you question. If you don't need RDBMS, you can try to embed SVN to your application.

aku
A: 

I am not entirely sure what you mean by "included in an application", as you could potentially deliver any library so long as the licensing allows. Are you referring to the fact that sqlite is small or that it is public domain?

Mercurial is a similarly lightweight piece of revision control software. If you are writing your application in python, which is likely since python now includes sqlite3, importing features directly from mercurial's source code should not be too difficult. Otherwise there's no shame in invoking commandline processes, though this may be clunkier. Mercurial is not public domain, but it is GPL'd.

Mercurial is also my personal favorite among modern revision control systems. It's leaps ahead of CVS and Subversion, and very similar to GIT although somewhat simpler to use.

Nick Retallack
A: 

@Nick When I mean by "embedding in the application", I am referring to including the code in our program's source code so that we get an internal database.

I am looking at a scenario where I do not expect anything is installed on the end user's computer, hence I can't work with the assumption that Mercurial is already installed.

Taking code from Mercurial's source code sounds doable though.

@aku I tried going through their Embedding Subversion chapter but I couldn't figure out if that assumes the subversion program/libraries are installed on the computer?

Swaroop C H
+3  A: 

@Swaroop C H,

SVN doesn't require any prerequisites on end user machine. You can embed SVN right into you app. To learn more on subversion integration, visit "Application Integration/Embedding" thread on SVN forum.

aku
+1  A: 

Answering my question myself, I recently discovered hgshelve and gitshelve that is almost exactly what I was looking for.

Swaroop C H