hgext/progress.py
changeset 10891 83af68e38be3
parent 10815 32b213b9b22c
child 11458 ec21d91c79b3
equal deleted inserted replaced
10890:301633755dec 10891:83af68e38be3
   112             if head:
   112             if head:
   113                 used += len(head) + 1
   113                 used += len(head) + 1
   114             if tail:
   114             if tail:
   115                 used += len(tail) + 1
   115                 used += len(tail) + 1
   116             progwidth = termwidth - used - 3
   116             progwidth = termwidth - used - 3
   117             if total:
   117             if total and pos <= total:
   118                 amt = pos * progwidth // total
   118                 amt = pos * progwidth // total
   119                 bar = '=' * (amt - 1)
   119                 bar = '=' * (amt - 1)
   120                 if amt > 0:
   120                 if amt > 0:
   121                     bar += '>'
   121                     bar += '>'
   122                 bar += ' ' * (progwidth - amt)
   122                 bar += ' ' * (progwidth - amt)