mercurial/ui.py
changeset 41063 6603de284b0a
parent 40994 ab92e2111408
child 41076 8ecb17b7f432
equal deleted inserted replaced
41062:0a7f582f6f1f 41063:6603de284b0a
  1700             self._fmsgerr.write(None, type=b'progress', topic=topic, pos=pos,
  1700             self._fmsgerr.write(None, type=b'progress', topic=topic, pos=pos,
  1701                                 item=item, unit=unit, total=total)
  1701                                 item=item, unit=unit, total=total)
  1702         elif self._progbar is not None:
  1702         elif self._progbar is not None:
  1703             self._progbar.progress(topic, pos, item=item, unit=unit,
  1703             self._progbar.progress(topic, pos, item=item, unit=unit,
  1704                                    total=total)
  1704                                    total=total)
       
  1705 
       
  1706             # Looking up progress.debug in tight loops is expensive. The value
       
  1707             # is cached on the progbar object and we can avoid the lookup in
       
  1708             # the common case where a progbar is active.
       
  1709             if pos is None or not self._progbar.debug:
       
  1710                 return
       
  1711 
       
  1712         # Keep this logic in sync with above.
  1705         if pos is None or not self.configbool('progress', 'debug'):
  1713         if pos is None or not self.configbool('progress', 'debug'):
  1706             return
  1714             return
  1707 
  1715 
  1708         if unit:
  1716         if unit:
  1709             unit = ' ' + unit
  1717             unit = ' ' + unit