changeset 23906:e0ae0a4e4c7b

progress: move current topic to member variable
author Solomon Matthews <smat@fb.com>
date Sat, 17 Jan 2015 13:09:33 -0800
parents 8b5b963ba95a
children 63c7783a5928
files hgext/progress.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/progress.py	Thu Jan 15 20:03:28 2015 -0800
+++ b/hgext/progress.py	Sat Jan 17 13:09:33 2015 -0800
@@ -100,6 +100,7 @@
         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 @@
                     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