Reusable fastimport parser

Ian Clatworthy ian.clatworthy at internode.on.net
Mon Apr 27 12:54:37 BST 2009


Greg Ward wrote:
> On Tue, Apr 21, 2009 at 11:30 AM, I wrote:
>> no doubt you folks are aware that there is well designed, high
>> performance, low overhead, pure Python parser for git's "fastimport"
>> format in bzr-fastimport.  The original author of hg-fastimport
>> clearly liked it enough that now we have two copies of Ian
>> Clatworthy's fastimport parser kicking around the net: hg-fastimport
>> is basically a fork of bzr-fastimport with the backend rewritten to
>> produce a Mercurial repository.

> So... before I go too far down that road, I'd like to hear some
> feedback from the Bazaar folks.  Especially Ian, obviously.  In
> particular, do you think this is a worthy endeavour, and are you
> receptive to me providing a patch to bzr-fastimport that makes it
> depend on "my" new standalone fastimport library?  Or would you rather
> proceed differently... e.g. include a copy of the library with
> bzr-fastimport, and manually resync to get fixes and features as
> required.

Hi Greg,

Sorry for the delayed response - I was on leave last week.

I fully support the idea of pulling out the reusable bits of
bzr-fastimport. The core parser ought to be pretty stable so I don't see
it being a problem to occasionally sync against a new version of a core
(py-fastimport say) library.

I'm yet to look at your code, nor consider the numerous issues, (e.g.
bzr has a really nice testing framework that bzr-fastimport leverages).
But I certainly support the concept in principle.

My preference though is to keep the library small and focussed on
fastimport, rather than bundling it as part of something larger (like
Dulwich). Either way, I'd like Canonical to retain copyright so
fastimport can be bundled with bzr as a standard plugin once it matures
enough.

At the other extreme, does it make sense for bzr-fastimport and
hg-fastimport to be the *one* code base? There's a lot of stuff in
bzr-fastimport - e.g. fast-import-info, fast-import-info - that isn't
tied to bzr. It might make an interesting experiment in how to write a
cross-tool plugin! I'm particularly curious about whether we could write
 many of the tests in a cross-tool way. (At some point, I need to sit
down and write dozens of tests for bzr-fast-export and I'd love to have
some assistance, direct or otherwise, doing that.) Anyhow, something to
consider. I'm certainly open to collaborating at whatever level makes sense.

Ian C.

PS: I don't get a lot of work time to hack on fastimport but I do now
and then if it's related to whatever else I'm doing. I do try and give
it some love every 2nd weekend if I can though.



More information about the bazaar mailing list