equal
deleted
inserted
replaced
1479 return None |
1479 return None |
1480 return getprogbar(self) |
1480 return getprogbar(self) |
1481 |
1481 |
1482 def _progclear(self): |
1482 def _progclear(self): |
1483 """clear progress bar output if any. use it before any output""" |
1483 """clear progress bar output if any. use it before any output""" |
1484 if '_progbar' not in vars(self): # nothing loaded yet |
1484 if not haveprogbar(): # nothing loaded yet |
1485 return |
1485 return |
1486 if self._progbar is not None and self._progbar.printed: |
1486 if self._progbar is not None and self._progbar.printed: |
1487 self._progbar.clear() |
1487 self._progbar.clear() |
1488 |
1488 |
1489 def progress(self, topic, pos, item="", unit="", total=None): |
1489 def progress(self, topic, pos, item="", unit="", total=None): |
1783 if _progresssingleton is None: |
1783 if _progresssingleton is None: |
1784 # passing 'ui' object to the singleton is fishy, |
1784 # passing 'ui' object to the singleton is fishy, |
1785 # this is how the extension used to work but feel free to rework it. |
1785 # this is how the extension used to work but feel free to rework it. |
1786 _progresssingleton = progress.progbar(ui) |
1786 _progresssingleton = progress.progbar(ui) |
1787 return _progresssingleton |
1787 return _progresssingleton |
|
1788 |
|
1789 def haveprogbar(): |
|
1790 return _progresssingleton is not None |