progress: drop extra args for pos=None calls (issue2087)
authorMatt Mackall <mpm@selenic.com>
Wed, 17 Mar 2010 18:15:16 -0500
changeset 10724 cb0a7faa29ea
parent 10723 8ea152e94484
child 10726 bedef1c228d3
progress: drop extra args for pos=None calls (issue2087)
contrib/shrink-revlog.py
hgext/relink.py
mercurial/cmdutil.py
mercurial/localrepo.py
--- a/contrib/shrink-revlog.py	Wed Mar 17 15:36:48 2010 -0500
+++ b/contrib/shrink-revlog.py	Wed Mar 17 18:15:16 2010 -0500
@@ -64,7 +64,7 @@
             for p in parents[rev]:
                 heads.discard(p)
     finally:
-        ui.progress(_('reading'), None, total=len(rl))
+        ui.progress(_('reading'), None)
 
     heads = list(heads)
     heads.sort(reverse=True)
@@ -90,7 +90,7 @@
             if p2 != node.nullrev:
                 children[p2].append(rev)
     finally:
-        ui.progress(_('reading'), None, total=len(rl))
+        ui.progress(_('reading'), None)
 
     root = list(roots)
     roots.sort()
@@ -120,7 +120,7 @@
         chunkiter = changegroup.chunkiter(group)
         r2.addgroup(chunkiter, unlookup, tr)
     finally:
-        ui.progress(_('writing'), None, len(order))
+        ui.progress(_('writing'), None)
 
 def report(ui, r1, r2):
     def getsize(r):
--- a/hgext/relink.py	Wed Mar 17 15:36:48 2010 -0500
+++ b/hgext/relink.py	Wed Mar 17 18:15:16 2010 -0500
@@ -116,6 +116,7 @@
     CHUNKLEN = 65536
     relinked = 0
     savedbytes = 0
+    f = ''
 
     pos = 0
     total = len(files)
@@ -145,7 +146,7 @@
         except OSError, inst:
             ui.warn('%s: %s\n' % (tgt, str(inst)))
 
-    ui.progress(_('relinking'), None, f, _(' files'), total)
+    ui.progress(_('relinking'), None)
 
     ui.status(_('relinked %d files (%d bytes reclaimed)\n') %
               (relinked, savedbytes))
--- a/mercurial/cmdutil.py	Wed Mar 17 15:36:48 2010 -0500
+++ b/mercurial/cmdutil.py	Wed Mar 17 18:15:16 2010 -0500
@@ -325,7 +325,7 @@
             myscore = score(repo.wread(a))
             if myscore >= bestscore:
                 copies[a] = (r, myscore)
-    repo.ui.progress(_('searching'), None, total=len(removed))
+    repo.ui.progress(_('searching'), None)
 
     for dest, v in copies.iteritems():
         source, score = v
--- a/mercurial/localrepo.py	Wed Mar 17 15:36:48 2010 -0500
+++ b/mercurial/localrepo.py	Wed Mar 17 18:15:16 2010 -0500
@@ -1395,7 +1395,7 @@
         self.ui.debug("found new changesets starting at " +
                      " ".join([short(f) for f in fetch]) + "\n")
 
-        self.ui.progress(_('searching'), None, unit=_('queries'))
+        self.ui.progress(_('searching'), None)
         self.ui.debug("%d total queries\n" % reqcnt)
 
         return base.keys(), list(fetch), heads
@@ -1828,7 +1828,7 @@
                 yield chnk
                 self.ui.progress(_('bundling changes'), cnt, unit=_('chunks'))
                 cnt += 1
-            self.ui.progress(_('bundling changes'), None, unit=_('chunks'))
+            self.ui.progress(_('bundling changes'), None)
 
 
             # Figure out which manifest nodes (of the ones we think might be
@@ -1856,7 +1856,7 @@
                 yield chnk
                 self.ui.progress(_('bundling manifests'), cnt, unit=_('chunks'))
                 cnt += 1
-            self.ui.progress(_('bundling manifests'), None, unit=_('chunks'))
+            self.ui.progress(_('bundling manifests'), None)
 
             # These are no longer needed, dereference and toss the memory for
             # them.
@@ -1905,7 +1905,7 @@
                     del msng_filenode_set[fname]
             # Signal that no more groups are left.
             yield changegroup.closechunk()
-            self.ui.progress(_('bundling files'), None, unit=_('chunks'))
+            self.ui.progress(_('bundling files'), None)
 
             if msng_cl_lst:
                 self.hook('outgoing', node=hex(msng_cl_lst[0]), source=source)
@@ -1957,7 +1957,7 @@
                 self.ui.progress(_('bundling changes'), cnt, unit=_('chunks'))
                 cnt += 1
                 yield chnk
-            self.ui.progress(_('bundling changes'), None, unit=_('chunks'))
+            self.ui.progress(_('bundling changes'), None)
 
             mnfst = self.manifest
             nodeiter = gennodelst(mnfst)
@@ -1966,7 +1966,7 @@
                 self.ui.progress(_('bundling manifests'), cnt, unit=_('chunks'))
                 cnt += 1
                 yield chnk
-            self.ui.progress(_('bundling manifests'), None, unit=_('chunks'))
+            self.ui.progress(_('bundling manifests'), None)
 
             cnt = 0
             for fname in sorted(changedfiles):
@@ -1984,7 +1984,7 @@
                             _('bundling files'), cnt, item=fname, unit=_('chunks'))
                         cnt += 1
                         yield chnk
-            self.ui.progress(_('bundling files'), None, unit=_('chunks'))
+            self.ui.progress(_('bundling files'), None)
 
             yield changegroup.closechunk()