diff mercurial/localrepo.py @ 13786:4ed718f909e5

changegroup: roll changegroup.collector into lookup functions
author Matt Mackall <mpm@selenic.com>
date Mon, 28 Mar 2011 11:18:56 -0500
parents 470ec600b525
children 5333c87f6048
line wrap: on
line diff
--- a/mercurial/localrepo.py	Mon Mar 28 11:18:56 2011 -0500
+++ b/mercurial/localrepo.py	Mon Mar 28 11:18:56 2011 -0500
@@ -1530,10 +1530,11 @@
             # The set of changed files starts empty.
             changedfiles = set()
 
-            collect = changegroup.collector(cl, mfs, changedfiles)
             count = [0]
             def clookup(revlog, x):
-                collect(x)
+                c = cl.read(x)
+                changedfiles.update(c[3])
+                mfs.setdefault(c[0], x)
                 count[0] += 1
                 self.ui.progress(_('bundling'), count[0], unit=_('changesets'))
                 return x
@@ -1637,12 +1638,13 @@
             changedfiles = set()
             mmfs = {}
 
-            collect = changegroup.collector(cl, mmfs, changedfiles)
             count = [0]
             def clookup(revlog, x):
+                c = cl.read(x)
+                changedfiles.update(c[3])
+                mmfs.setdefault(c[0], x)
                 count[0] += 1
                 self.ui.progress(_('bundling'), count[0], unit=_('changesets'))
-                collect(x)
                 return x
 
             for chunk in cl.group(nodes, clookup):