# HG changeset patch # User Matt Mackall # Date 1301329136 18000 # Node ID 470ec600b525c97137d46a5402c1de20a8e80cc3 # Parent f1e639c71a2bacc192a8427565b103c06dba04a0 changegroup: add revlog to the group callback diff -r f1e639c71a2b -r 470ec600b525 mercurial/localrepo.py --- a/mercurial/localrepo.py Mon Mar 28 11:18:56 2011 -0500 +++ b/mercurial/localrepo.py Mon Mar 28 11:18:56 2011 -0500 @@ -1532,7 +1532,7 @@ collect = changegroup.collector(cl, mfs, changedfiles) count = [0] - def clookup(x): + def clookup(revlog, x): collect(x) count[0] += 1 self.ui.progress(_('bundling'), count[0], unit=_('changesets')) @@ -1551,7 +1551,7 @@ # and data collection functions back. fcollect = filenode_collector(changedfiles) count = [0] - def mlookup(x): + def mlookup(revlog, x): fcollect(x) count[0] += 1 self.ui.progress(_('bundling'), count[0], @@ -1581,7 +1581,7 @@ # Create a group generator and only pass in a changenode # lookup function as we need to collect no information # from filenodes. - def flookup(x): + def flookup(revlog, x): # even though we print the same progress on # most loop iterations, put the progress call # here so that time estimates (if any) can be updated @@ -1639,7 +1639,7 @@ collect = changegroup.collector(cl, mmfs, changedfiles) count = [0] - def clookup(x): + def clookup(revlog, x): count[0] += 1 self.ui.progress(_('bundling'), count[0], unit=_('changesets')) collect(x) @@ -1655,7 +1655,7 @@ nodeiter = gennodelst(mnfst) mfunc = lookuplinkrev_func(mnfst) count = [0] - def mlookup(x): + def mlookup(revlog, x): count[0] += 1 self.ui.progress(_('bundling'), count[0], unit=_('manifests'), total=changecount) @@ -1675,7 +1675,7 @@ yield changegroup.chunkheader(len(fname)) yield fname ffunc = lookuplinkrev_func(filerevlog) - def flookup(x): + def flookup(revlog, x): self.ui.progress( _('bundling'), idx, item=fname, total=efiles, unit=_('files')) diff -r f1e639c71a2b -r 470ec600b525 mercurial/revlog.py --- a/mercurial/revlog.py Mon Mar 28 11:18:56 2011 -0500 +++ b/mercurial/revlog.py Mon Mar 28 11:18:56 2011 -0500 @@ -1087,7 +1087,7 @@ nb = self.node(b) p = self.parents(nb) - meta = nb + p[0] + p[1] + lookup(nb) + meta = nb + p[0] + p[1] + lookup(self, nb) if a == nullrev: d = self.revision(nb) meta += mdiff.trivialdiffheader(len(d))