mercurial/progress.py
branchstable
changeset 29089 222b8170d69e
parent 28171 2d20d1d2ea76
child 30334 cb1ea3cc44b5
equal deleted inserted replaced
29082:77de985d7c91 29089:222b8170d69e
   161         sys.stderr.write('\r' + encoding.trim(out, termwidth))
   161         sys.stderr.write('\r' + encoding.trim(out, termwidth))
   162         self.lasttopic = topic
   162         self.lasttopic = topic
   163         sys.stderr.flush()
   163         sys.stderr.flush()
   164 
   164 
   165     def clear(self):
   165     def clear(self):
   166         if not shouldprint(self.ui):
   166         if not self.printed or not self.lastprint or not shouldprint(self.ui):
   167             return
   167             return
   168         sys.stderr.write('\r%s\r' % (' ' * self.width()))
   168         sys.stderr.write('\r%s\r' % (' ' * self.width()))
   169         if self.printed:
   169         if self.printed:
   170             # force immediate re-paint of progress bar
   170             # force immediate re-paint of progress bar
   171             self.lastprint = 0
   171             self.lastprint = 0