# HG changeset patch # User Steve Borho # Date 2010-02-24 05:10:01 # Node ID dd9d057465c138a6f8138a133d58dbabf16c5276 # Parent fc5908d01ed734ebbacd7775cb8befb2630656b0 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 --git a/hgext/progress.py b/hgext/progress.py --- a/hgext/progress.py +++ b/hgext/progress.py @@ -170,6 +170,10 @@ class progbar(object): sharedprog = None def uisetup(ui): + # Apps that derive a class from ui.ui() can use + # setconfig('progress', 'disable', 'True') to disable this extension + if ui.configbool('progress', 'disable'): + 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