mercurial/crew
changeset 10724:cb0a7faa29ea
progress: drop extra args for pos=None calls (issue2087)
| author | Matt Mackall <mpm@selenic.com> |
|---|---|
| date | Wed Mar 17 18:15:16 2010 -0500 (5 months ago) |
| parents | 8ea152e94484 |
| children | bedef1c228d3 |
| files | contrib/shrink-revlog.py hgext/relink.py mercurial/cmdutil.py mercurial/localrepo.py |
line diff
1.1 --- a/contrib/shrink-revlog.py 1.2 +++ b/contrib/shrink-revlog.py 1.3 @@ -64,7 +64,7 @@ 1.4 for p in parents[rev]: 1.5 heads.discard(p) 1.6 finally: 1.7 - ui.progress(_('reading'), None, total=len(rl)) 1.8 + ui.progress(_('reading'), None) 1.9 1.10 heads = list(heads) 1.11 heads.sort(reverse=True) 1.12 @@ -90,7 +90,7 @@ 1.13 if p2 != node.nullrev: 1.14 children[p2].append(rev) 1.15 finally: 1.16 - ui.progress(_('reading'), None, total=len(rl)) 1.17 + ui.progress(_('reading'), None) 1.18 1.19 root = list(roots) 1.20 roots.sort() 1.21 @@ -120,7 +120,7 @@ 1.22 chunkiter = changegroup.chunkiter(group) 1.23 r2.addgroup(chunkiter, unlookup, tr) 1.24 finally: 1.25 - ui.progress(_('writing'), None, len(order)) 1.26 + ui.progress(_('writing'), None) 1.27 1.28 def report(ui, r1, r2): 1.29 def getsize(r):
2.1 --- a/hgext/relink.py 2.2 +++ b/hgext/relink.py 2.3 @@ -116,6 +116,7 @@ 2.4 CHUNKLEN = 65536 2.5 relinked = 0 2.6 savedbytes = 0 2.7 + f = '' 2.8 2.9 pos = 0 2.10 total = len(files) 2.11 @@ -145,7 +146,7 @@ 2.12 except OSError, inst: 2.13 ui.warn('%s: %s\n' % (tgt, str(inst))) 2.14 2.15 - ui.progress(_('relinking'), None, f, _(' files'), total) 2.16 + ui.progress(_('relinking'), None) 2.17 2.18 ui.status(_('relinked %d files (%d bytes reclaimed)\n') % 2.19 (relinked, savedbytes))
3.1 --- a/mercurial/cmdutil.py 3.2 +++ b/mercurial/cmdutil.py 3.3 @@ -325,7 +325,7 @@ 3.4 myscore = score(repo.wread(a)) 3.5 if myscore >= bestscore: 3.6 copies[a] = (r, myscore) 3.7 - repo.ui.progress(_('searching'), None, total=len(removed)) 3.8 + repo.ui.progress(_('searching'), None) 3.9 3.10 for dest, v in copies.iteritems(): 3.11 source, score = v
4.1 --- a/mercurial/localrepo.py 4.2 +++ b/mercurial/localrepo.py 4.3 @@ -1395,7 +1395,7 @@ 4.4 self.ui.debug("found new changesets starting at " + 4.5 " ".join([short(f) for f in fetch]) + "\n") 4.6 4.7 - self.ui.progress(_('searching'), None, unit=_('queries')) 4.8 + self.ui.progress(_('searching'), None) 4.9 self.ui.debug("%d total queries\n" % reqcnt) 4.10 4.11 return base.keys(), list(fetch), heads 4.12 @@ -1828,7 +1828,7 @@ 4.13 yield chnk 4.14 self.ui.progress(_('bundling changes'), cnt, unit=_('chunks')) 4.15 cnt += 1 4.16 - self.ui.progress(_('bundling changes'), None, unit=_('chunks')) 4.17 + self.ui.progress(_('bundling changes'), None) 4.18 4.19 4.20 # Figure out which manifest nodes (of the ones we think might be 4.21 @@ -1856,7 +1856,7 @@ 4.22 yield chnk 4.23 self.ui.progress(_('bundling manifests'), cnt, unit=_('chunks')) 4.24 cnt += 1 4.25 - self.ui.progress(_('bundling manifests'), None, unit=_('chunks')) 4.26 + self.ui.progress(_('bundling manifests'), None) 4.27 4.28 # These are no longer needed, dereference and toss the memory for 4.29 # them. 4.30 @@ -1905,7 +1905,7 @@ 4.31 del msng_filenode_set[fname] 4.32 # Signal that no more groups are left. 4.33 yield changegroup.closechunk() 4.34 - self.ui.progress(_('bundling files'), None, unit=_('chunks')) 4.35 + self.ui.progress(_('bundling files'), None) 4.36 4.37 if msng_cl_lst: 4.38 self.hook('outgoing', node=hex(msng_cl_lst[0]), source=source) 4.39 @@ -1957,7 +1957,7 @@ 4.40 self.ui.progress(_('bundling changes'), cnt, unit=_('chunks')) 4.41 cnt += 1 4.42 yield chnk 4.43 - self.ui.progress(_('bundling changes'), None, unit=_('chunks')) 4.44 + self.ui.progress(_('bundling changes'), None) 4.45 4.46 mnfst = self.manifest 4.47 nodeiter = gennodelst(mnfst) 4.48 @@ -1966,7 +1966,7 @@ 4.49 self.ui.progress(_('bundling manifests'), cnt, unit=_('chunks')) 4.50 cnt += 1 4.51 yield chnk 4.52 - self.ui.progress(_('bundling manifests'), None, unit=_('chunks')) 4.53 + self.ui.progress(_('bundling manifests'), None) 4.54 4.55 cnt = 0 4.56 for fname in sorted(changedfiles): 4.57 @@ -1984,7 +1984,7 @@ 4.58 _('bundling files'), cnt, item=fname, unit=_('chunks')) 4.59 cnt += 1 4.60 yield chnk 4.61 - self.ui.progress(_('bundling files'), None, unit=_('chunks')) 4.62 + self.ui.progress(_('bundling files'), None) 4.63 4.64 yield changegroup.closechunk() 4.65
