Commits

Friedrich Kastner-Masilko committed ed53728

rebranch: fix for wrong nodecache usage in cache build-up

Comments (0)

Files changed (1)

             c = self.changelog
 
             for rule, name in self._rebranchescache.rebranches:
+                nodecache={}
                 if name not in branchcache:
                     branchcache.append(name)
                 bindex=branchcache.index(name)
                             visit.append(p)
                         else:
                             reachable[p].append(n)
-                nodebranchcache[start]=bindex
+                nodecache[start]=bindex
                 if start in reachable:                    
                     visit = reachable[start]
                     while visit:
                         n = visit.pop(0)                        
-                        if n in reachable and n not in nodebranchcache:
-                            nodebranchcache[n]=bindex
+                        if n in reachable and n not in nodecache:
+                            nodecache[n]=bindex
                             visit.extend(reachable[n])
+                nodebranchcache.update(nodecache)
                     
             self._rebranchescache.nodebranchcache = nodebranchcache
             self._rebranchescache.branchcache = branchcache