--- a/states.py Thu Jul 07 13:44:15 2011 +0200
+++ b/states.py Thu Jul 07 11:24:33 2011 +0200
@@ -228,13 +228,12 @@
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