diff hgext/states.py @ 106:03bbce26553e

Allow setstate with the last non trcked state.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Mon, 28 Nov 2011 00:59:18 +0100
parents 6300dd1c2df7
children f45325da7970
line wrap: on
line diff
--- 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)