Allow setstate with the last non trcked state.
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Mon, 28 Nov 2011 00:59:18 +0100
changeset 106 03bbce26553e
parent 105 6300dd1c2df7
child 107 f45325da7970
Allow setstate with the last non trcked state.
hgext/states.py
--- a/hgext/states.py	Mon Nov 28 00:57:49 2011 +0100
+++ b/hgext/states.py	Mon Nov 28 00:59:18 2011 +0100
@@ -896,6 +896,8 @@
 
             Simplify the list of head."""
             assert not isinstance(nodes, basestring), repr(nodes)
+            if not state.trackheads:
+                return
             heads = self._statesheads[state]
             olds = heads[:]
             heads.extend(nodes)