Re: [Monotone-devel] Re: [RFC] mtn to git conversion script
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- Sep 4, 2008, 13:29 UTC
- Message-ID
- <94a0d4530809040629y2f2d9c74v311b83afebba0051@mail.gmail.com>
- In-Reply-To
- <200809041250.17715.thomas.moschny@gmx.de>
On Thu, Sep 4, 2008 at 1:50 PM, Thomas Moschny <thomas.moschny@gmx.de> wrote:
Show 15 quoted lines
> On Thu, Sep 4, 2008, Felipe Contreras wrote: >> Ok, now the basics seem to be working. So I'm uploading some code if >> anyone wants to take a look. >> >> The C code is generating a topologically sorted list of revisions, and >> storing the relevant information (certs and parents) separately. This >> code is very fast. It's using GLib and sqlite3, so probably the GLib >> stuff should be converted to use libgit. >> http://gist.github.com/8742 > > You shouldn't access Monotone's sqlite database directly, for various reasons. > Use the Automation Interface instead, see > http://www.monotone.ca/docs/Automation.html#Automation. Using 'mtn automate > stdio', you can feed an arbitrary amount of commands to one single running mtn > process.
I use mtn stdio when needed, that is, when doing it manually would be too complicated (get_file). Doing it directly with sqlite3 is *very* fast, I don't see any reason to not to do it.
Feel free to modify the code for stdio.
-- Felipe Contreras