##// END OF EJS Templates
shrink-revlog: use a bundler object (see d69c9510d648)
Augie Fackler -
r14030:e5dd974a default
parent child Browse files
Show More
@@ -106,15 +106,16 b' def writerevs(ui, r1, r2, order, tr):'
106
106
107 # this is a bit ugly, but it works
107 # this is a bit ugly, but it works
108 count = [0]
108 count = [0]
109 def lookup(x):
109 def lookup(revl, x):
110 count[0] += 1
110 count[0] += 1
111 ui.progress(_('writing'), count[0], total=len(order))
111 ui.progress(_('writing'), count[0], total=len(order))
112 return "%020d" % r1.linkrev(r1.rev(x))
112 return "%020d" % revl.linkrev(revl.rev(x))
113
113
114 unlookup = lambda x: int(x, 10)
114 unlookup = lambda x: int(x, 10)
115
115
116 try:
116 try:
117 group = util.chunkbuffer(r1.group(order, lookup, progress))
117 bundler = changegroup.bundle10(lookup)
118 group = util.chunkbuffer(r1.group(order, bundler))
118 group = changegroup.unbundle10(group, "UN")
119 group = changegroup.unbundle10(group, "UN")
119 r2.addgroup(group, unlookup, tr)
120 r2.addgroup(group, unlookup, tr)
120 finally:
121 finally:
General Comments 0
You need to be logged in to leave comments. Login now