Patchwork changegroup.cg2packer: lookup 'group' via inheritance chain

login
register
mail settings
Submitter Siddharth Agarwal
Date Nov. 8, 2014, 2:12 a.m.
Message ID <faf6ae8b567de7eb3ad9.1415412776@devbig136.prn2.facebook.com>
Download mbox | patch
Permalink /patch/6650/
State Accepted
Headers show

Comments

Siddharth Agarwal - Nov. 8, 2014, 2:12 a.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@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.
Pierre-Yves David - Nov. 8, 2014, 10:23 a.m.
On 11/08/2014 02:12 AM, Siddharth Agarwal wrote:
> # HG changeset patch
> # User Siddharth Agarwal <sid0@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

Looks good, pushed to the clowncopter.

Patch

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)