hgext/progress.py
branchstable
changeset 15662 06671371e634
parent 14838 5d261fd00446
child 15772 83a140752239
--- a/hgext/progress.py	Fri Dec 16 18:23:15 2011 -0600
+++ b/hgext/progress.py	Wed Dec 14 15:41:08 2011 +0100
@@ -271,17 +271,21 @@
     class progressui(ui.__class__):
         _progbar = None
 
+        def _quiet(self):
+            return self.debugflag or self.quiet
+
         def progress(self, *args, **opts):
-            self._progbar.progress(*args, **opts)
+            if not self._quiet():
+                self._progbar.progress(*args, **opts)
             return super(progressui, self).progress(*args, **opts)
 
         def write(self, *args, **opts):
-            if self._progbar.printed:
+            if not self._quiet() and self._progbar.printed:
                 self._progbar.clear()
             return super(progressui, self).write(*args, **opts)
 
         def write_err(self, *args, **opts):
-            if self._progbar.printed:
+            if not self._quiet() and self._progbar.printed:
                 self._progbar.clear()
             return super(progressui, self).write_err(*args, **opts)