hgext/progress.py
changeset 19619 4694ccd5d994
parent 19404 b4744c3b991e
child 21859 be4270d27a7e
equal deleted inserted replaced
19618:6ac206fb6f27 19619:4694ccd5d994
   237                 self.resetstate()
   237                 self.resetstate()
   238             # truncate the list of topics assuming all topics within
   238             # truncate the list of topics assuming all topics within
   239             # this one are also closed
   239             # this one are also closed
   240             if topic in self.topics:
   240             if topic in self.topics:
   241                 self.topics = self.topics[:self.topics.index(topic)]
   241                 self.topics = self.topics[:self.topics.index(topic)]
       
   242                 # reset the last topic to the one we just unwound to,
       
   243                 # so that higher-level topics will be stickier than
       
   244                 # lower-level topics
       
   245                 if self.topics:
       
   246                     self.lasttopic = self.topics[-1]
       
   247                 else:
       
   248                     self.lasttopic = None
   242         else:
   249         else:
   243             if topic not in self.topics:
   250             if topic not in self.topics:
   244                 self.starttimes[topic] = now
   251                 self.starttimes[topic] = now
   245                 self.startvals[topic] = pos
   252                 self.startvals[topic] = pos
   246                 self.topics.append(topic)
   253                 self.topics.append(topic)