Convertion tools (GSoC 2009)

Abderrahim Kitouni a.kitouni at gmail.com
Tue Mar 24 15:40:40 CDT 2009


Hi,

I did more research on the subject, I downloaded dulwich and played
with it in IPython,
I think it is useable but needs some polishing (I found some technical
documents about git
[1] so that shouldn't be a problem), the wire protocol is therefore
not a problem.

So to be able to clone, we'll just need to convert git objects
(commit, tree, blob, tag)
and git refs correctly. The problem is that I don't know how to define
"correctly"
(for tags and refs), I think it should be a trade-off between "the
user doesn't need to
know he is using a git repo" and "the user should be able to know
exactly how to get a
given behaviour", looking at hgsubversion, it seems that it's doing the second.

We'll also need to be able to keep git sha1 hashes (which I believe
will be different
from mercurial's in the case of commit, and the other objects don't have exact
counterparts), or to recompute them. Here again, I think dulwich will
be able to get
this done (or needs to be fixed :-)).

To be able to push back to git (and this is, I believe, the trickier
part), we'll need to generate git objects from whatever the user has
committed to the repository. git isn't as limited as subversion, so
this would require less work (e.g. rebasing isn't needed).

I didn't elaborate on refs as I don't have a clear idea about what to
do. Maybe the bookmarks extension can help here.

Anyway, I think the project (well, the part outlined above) is doable
in a summer, but I'd prefer to have more opinions on this :-).

Regards,
Abderrahim


More information about the Mercurial-devel mailing list