Mercurial > public > mercurial-scm > hg-stable
diff mercurial/ui.py @ 34368:f61f5af5ed31
merge with stable
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Sat, 30 Sep 2017 07:52:48 -0700 |
parents | a254c669b475 0e4bed5c5c38 |
children | ae2fcf7af409 |
line wrap: on
line diff
--- a/mercurial/ui.py Fri Sep 22 22:45:02 2017 +0900 +++ b/mercurial/ui.py Sat Sep 30 07:52:48 2017 -0700 @@ -1488,7 +1488,7 @@ def _progclear(self): """clear progress bar output if any. use it before any output""" - if '_progbar' not in vars(self): # nothing loaded yet + if not haveprogbar(): # nothing loaded yet return if self._progbar is not None and self._progbar.printed: self._progbar.clear() @@ -1792,3 +1792,6 @@ # this is how the extension used to work but feel free to rework it. _progresssingleton = progress.progbar(ui) return _progresssingleton + +def haveprogbar(): + return _progresssingleton is not None