hgext/progress.py
changeset 21862 ba7f75e7f4e5
parent 21860 e382cf9ec30b
child 21863 f9c91c638378
equal deleted inserted replaced
21861:b515c3a63e96 21862:ba7f75e7f4e5
   137                     slice = 'beginning'
   137                     slice = 'beginning'
   138                     wid = int(indicator.split('+')[1])
   138                     wid = int(indicator.split('+')[1])
   139                 else:
   139                 else:
   140                     wid = 20
   140                     wid = 20
   141                 if slice == 'end':
   141                 if slice == 'end':
   142                     add = item[-wid:]
   142                     add = encoding.trim(item, wid, leftside=True)
   143                 else:
   143                 else:
   144                     add = item[:wid]
   144                     add = encoding.trim(item, wid)
   145                 add += (wid - len(add)) * ' '
   145                 add += (wid - len(add)) * ' '
   146             elif indicator == 'bar':
   146             elif indicator == 'bar':
   147                 add = ''
   147                 add = ''
   148                 needprogress = True
   148                 needprogress = True
   149             elif indicator == 'unit' and unit:
   149             elif indicator == 'unit' and unit: