[PATCH] changegroup.cg2packer: lookup 'group' via inheritance chain

Siddharth Agarwal sid0 at fb.com
Fri Nov 7 20:12:56 CST 2014


# HG changeset patch
# User Siddharth Agarwal <sid0 at fb.com>
# Date 1415411699 28800
#      Fri Nov 07 17:54:59 2014 -0800
# Node ID faf6ae8b567de7eb3ad96ae0961b637abdad731b
# Parent  2d54aa5397cdb1c697673ba10b7618d5ac25c69e
changegroup.cg2packer: lookup 'group' via inheritance chain

This lets extensions insert themselves in the class hierarchy.

diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
--- a/mercurial/changegroup.py
+++ b/mercurial/changegroup.py
@@ -452,8 +452,8 @@
     def group(self, nodelist, revlog, lookup, units=None, reorder=None):
         if (revlog._generaldelta and reorder is not True):
             reorder = False
-        return cg1packer.group(self, nodelist, revlog, lookup,
-                               units=units, reorder=reorder)
+        return super(cg2packer, self).group(nodelist, revlog, lookup,
+                                            units=units, reorder=reorder)
 
     def deltaparent(self, revlog, rev, p1, p2, prev):
         dp = revlog.deltaparent(rev)


More information about the Mercurial-devel mailing list