[PATCH 0 of 9] Move and refactor bundling logic

Sune Foldager cryo at cyanite.org
Thu Feb 14 13:40:10 CST 2013

Benoit and I worked on this at the sprint, following the bundle format 2
discussion. It takes some first steps towards implementing the new format.
It basically moves all bundle creation logic out of localrepo.py and into
changegroup.py, into the bundler10 class.

The patch queue is posted as-is for easier review, although it may need some
work before push. Moving forwards from this, I think the plan is something
like the following:

I'd like to do a dev spike on creating a new bundle format, ignoring some
details such as we haven't decided on some specifics about how to encode hunk
types, lengths etc. I think (but Benoit and I don't entirely agree) it would
be best to put that into a new bundler20 (or whatever) class, which derives
from bundler10. A factory would then be needed to return the correct bundler.

I think that keeping it in the same class, will cause a lot of clutter, a lot
of if newbundleformat: in many places, and make the code harder to follow.
I'm sure we can discuss this for hours to come :)

Then there is the unbundling part, on which work hasn't begun (unless Benoit
did something not yet pushed).


More information about the Mercurial-devel mailing list