# HG changeset patch # User Solomon Matthews # Date 2015-01-17 21:09:33 # Node ID e0ae0a4e4c7b3d502159f0f44cdd5b2065876b1e # Parent 8b5b963ba95a7920329e6ebe733e6d25613ef512 progress: move current topic to member variable diff --git a/hgext/progress.py b/hgext/progress.py --- a/hgext/progress.py +++ b/hgext/progress.py @@ -100,6 +100,7 @@ class progbar(object): self.printed = False self.lastprint = time.time() + float(self.ui.config( 'progress', 'delay', default=3)) + self.curtopic = None self.lasttopic = None self.indetcount = 0 self.refresh = float(self.ui.config( @@ -255,6 +256,7 @@ class progbar(object): self.startvals[topic] = pos self.topics.append(topic) self.topicstates[topic] = pos, item, unit, total + self.curtopic = topic if now - self.lastprint >= self.refresh and self.topics: if (self.lasttopic is None # first time we printed # not a topic change