Mercurial > hg
comparison contrib/shrink-revlog.py @ 10724:cb0a7faa29ea
progress: drop extra args for pos=None calls (issue2087)
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 17 Mar 2010 18:15:16 -0500 |
parents | f63fb5c0cf67 |
children | f73baa069113 |
comparison
equal
deleted
inserted
replaced
10723:8ea152e94484 | 10724:cb0a7faa29ea |
---|---|
62 parents[rev] = (p2, p1) # merge node | 62 parents[rev] = (p2, p1) # merge node |
63 heads.add(rev) | 63 heads.add(rev) |
64 for p in parents[rev]: | 64 for p in parents[rev]: |
65 heads.discard(p) | 65 heads.discard(p) |
66 finally: | 66 finally: |
67 ui.progress(_('reading'), None, total=len(rl)) | 67 ui.progress(_('reading'), None) |
68 | 68 |
69 heads = list(heads) | 69 heads = list(heads) |
70 heads.sort(reverse=True) | 70 heads.sort(reverse=True) |
71 | 71 |
72 ui.status(_('sorting revs\n')) | 72 ui.status(_('sorting revs\n')) |
88 if p1 != node.nullrev: | 88 if p1 != node.nullrev: |
89 children[p1].append(rev) | 89 children[p1].append(rev) |
90 if p2 != node.nullrev: | 90 if p2 != node.nullrev: |
91 children[p2].append(rev) | 91 children[p2].append(rev) |
92 finally: | 92 finally: |
93 ui.progress(_('reading'), None, total=len(rl)) | 93 ui.progress(_('reading'), None) |
94 | 94 |
95 root = list(roots) | 95 root = list(roots) |
96 roots.sort() | 96 roots.sort() |
97 | 97 |
98 ui.status(_('sorting revs\n')) | 98 ui.status(_('sorting revs\n')) |
118 try: | 118 try: |
119 group = util.chunkbuffer(r1.group(order, lookup, progress)) | 119 group = util.chunkbuffer(r1.group(order, lookup, progress)) |
120 chunkiter = changegroup.chunkiter(group) | 120 chunkiter = changegroup.chunkiter(group) |
121 r2.addgroup(chunkiter, unlookup, tr) | 121 r2.addgroup(chunkiter, unlookup, tr) |
122 finally: | 122 finally: |
123 ui.progress(_('writing'), None, len(order)) | 123 ui.progress(_('writing'), None) |
124 | 124 |
125 def report(ui, r1, r2): | 125 def report(ui, r1, r2): |
126 def getsize(r): | 126 def getsize(r): |
127 s = 0 | 127 s = 0 |
128 for fn in (r.indexfile, r.datafile): | 128 for fn in (r.indexfile, r.datafile): |