[PATCH 4 of 4 V2] changegroup: refactor changegroup generation into a separate class

Kevin Bullock kbullock+mercurial at ringworld.org
Tue May 7 13:35:28 CDT 2013


On 6 May 2013, at 10:14 PM, Durham Goode wrote:

> # HG changeset patch
> # User Durham Goode <durham at fb.com>
> # Date 1367430936 25200
> #      Wed May 01 10:55:36 2013 -0700
> # Node ID c86e8d104d87bf958827d9713d4e2f22f7535117
> # Parent  dbdfdfcc9b14728cee940dd9f96398561bed0802
> changegroup: refactor changegroup generation into a separate class
> 
> Previously changegroup generation was confined to _changegroup() and
> _changegroupsubset(). Both were massive functions and they had lots of
> duplicate code.
> 
> I've moved all their logic into the changegroup module as new classes:
> ChangeGroupGen and SubsetChangeGroupGen. This breaks up all the different
> logic into separate functions so extensions can modify them individually
> and allows us to share most of the logic with the subset version. This
> also helps make localrepo less of a god class (-156 lines from localrepo,
> +157 lines to changegroup).

Woohoo! 156 is a dozen baker's dozens, so you get *lots* of cookies for this one. :)

pacem in terris / мир / शान्ति / ‎‫سَلاَم‬ / 平和
Kevin R. Bullock



More information about the Mercurial-devel mailing list