hgext/progress.py
changeset 25482 95f490136e75
parent 25186 80c5b2666a96
child 25497 93b8b0049932
--- a/hgext/progress.py	Wed May 27 05:28:40 2015 -0700
+++ b/hgext/progress.py	Sun Jun 07 18:11:23 2015 -0700
@@ -312,13 +312,15 @@
     if ui.configbool('progress', 'disable'):
         return
     if shouldprint(ui) and not ui.debugflag and not ui.quiet:
-        ui.__class__ = progressui
-        # we instantiate one globally shared progress bar to avoid
-        # competing progress bars when multiple UI objects get created
-        if not progressui._progbar:
-            if _singleton is None:
-                _singleton = progbar(ui)
-            progressui._progbar = _singleton
+        dval = object()
+        if getattr(ui, '_progbar', dval) is dval:
+            ui.__class__ = progressui
+            # we instantiate one globally-shared progress bar to avoid
+            # competing progress bars when multiple UI objects get created
+            if not progressui._progbar:
+                if _singleton is None:
+                    _singleton = progbar(ui)
+                progressui._progbar = _singleton
 
 def reposetup(ui, repo):
     uisetup(repo.ui)