changeset 14030:e5dd974a99fa

shrink-revlog: use a bundler object (see d69c9510d648)
author Augie Fackler <durin42@gmail.com>
date Fri, 29 Apr 2011 08:04:54 -0500
parents 83d3f87c059e
children bc61a4b46734
files contrib/shrink-revlog.py
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/shrink-revlog.py	Fri Apr 29 08:01:10 2011 -0500
+++ b/contrib/shrink-revlog.py	Fri Apr 29 08:04:54 2011 -0500
@@ -106,15 +106,16 @@
 
     # this is a bit ugly, but it works
     count = [0]
-    def lookup(x):
+    def lookup(revl, x):
         count[0] += 1
         ui.progress(_('writing'), count[0], total=len(order))
-        return "%020d" % r1.linkrev(r1.rev(x))
+        return "%020d" % revl.linkrev(revl.rev(x))
 
     unlookup = lambda x: int(x, 10)
 
     try:
-        group = util.chunkbuffer(r1.group(order, lookup, progress))
+        bundler = changegroup.bundle10(lookup)
+        group = util.chunkbuffer(r1.group(order, bundler))
         group = changegroup.unbundle10(group, "UN")
         r2.addgroup(group, unlookup, tr)
     finally: