hgext/progress.py
branchstable
changeset 10464 149ad0a3ec91
parent 10463 5ddde896a19d
child 10471 132eb7128ad5
equal deleted inserted replaced
10463:5ddde896a19d 10464:149ad0a3ec91
   154                 self.resetstate()
   154                 self.resetstate()
   155         else:
   155         else:
   156             if topic not in self.topics:
   156             if topic not in self.topics:
   157                 self.topics.append(topic)
   157                 self.topics.append(topic)
   158             now = time.time()
   158             now = time.time()
   159             if now - self.lastprint > self.refresh and topic == self.topics[-1]:
   159             if (now - self.lastprint >= self.refresh
       
   160                 and topic == self.topics[-1]):
   160                 self.lastprint = now
   161                 self.lastprint = now
   161                 self.show(topic, pos, item, unit, total)
   162                 self.show(topic, pos, item, unit, total)
   162         return orig(topic, pos, item=item, unit=unit, total=total)
   163         return orig(topic, pos, item=item, unit=unit, total=total)
   163 
   164 
   164     def write(self, orig, *args):
   165     def write(self, orig, *args):