Commits

Pierre-Yves David  committed 52c2277

fix nodestate computation

  • Participants
  • Parent commits 0918e3b
  • Branches default

Comments (0)

Files changed (1)

 
         def nodestate(self, node):
             rev = self.changelog.rev(node)
-            for state in STATES[::-1]:
+            for state in STATES:
                 # XXX avoid for untracked heads
                 if state.next is not None:
-                    for head in self.stateheads(state):
-                        revhead = self.changelog.rev(head)
-                        if self.changelog.descendant(revhead, rev):
-                            return state.next
+                    revs = scmutil.revrange(self, ["::%s()" % state.headssymbol])
+                    if rev in revs:
+                        break
             return state