[PATCH] progress: provide an explicit disable method for developers
Steve Borho
steve at borho.org
Wed Feb 24 05:11:00 UTC 2010
# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1266988201 21600
# Branch stable
# Node ID bc13f9c36274dcb32dc46ae5998d5f5b65fe4eba
# Parent a957038218cd6ca02b96a381f2d121a83154c395
progress: provide an explicit disable method for developers
The other three checks for disabling the progress bar have serious
side effects for any class that derives from ui.ui()
diff -r a957038218cd -r bc13f9c36274 hgext/progress.py
--- a/hgext/progress.py Tue Feb 23 22:31:54 2010 +0100
+++ b/hgext/progress.py Tue Feb 23 23:10:01 2010 -0600
@@ -170,6 +170,10 @@
sharedprog = None
def uisetup(ui):
+ # Apps that derive a class from ui.ui() can use
+ # setconfig('ui', 'progress', 'False') to disable this extension
+ if not ui.configbool('ui', 'progress', True):
+ return
if ui.interactive() and not ui.debugflag and not ui.quiet:
# we instantiate one globally shared progress bar to avoid
# competing progress bars when multiple UI objects get created
More information about the Mercurial-devel
mailing list