Commits

ditch  committed 3e41ef4

fix for hg 1.4

patch from pmezard, fixes #23

  • Participants
  • Parent commits 73e7848
  • Tags mercurial-1.4

Comments (0)

Files changed (1)

File hgext/tasks.py

     # in lookup()
     repo._tasks = None
     repo._taskcurrent = None
+    repo._taskscache = None
 
     class task_repo(repo.__class__):
         def rollback(self):
 
         def tags(self):
             '''Adds tasks to tags'''
-            if self.tagscache:
-                return self.tagscache
+            if self._taskscache is None:
+                self._taskscache = parse(self)
 
-            tagscache = super(task_repo, self).tags()
+            tags = super(task_repo, self).tags()
             # make an array with fake tags
-            for t, tinfo in parse(self).iteritems():
-                tagscache[t] = tasknode(self, tinfo)
-            return tagscache
+            for t, tinfo in self._taskscache.iteritems():
+                tags[t] = tasknode(self, tinfo)
+            return tags
 
     repo.__class__ = task_repo