site

(Pierre-Yves David)
2011-09-13: [state] Update doc on the mutable property of state (and the way

[state] Update doc on the mutable property of state (and the way it's implemented)

diff --git a/hgext/states.py b/hgext/states.py
--- a/hgext/states.py
+++ b/hgext/states.py
@@ -235,17 +235,23 @@ A new template keyword ``{state}`` has b
 Revset
 ......
 
-    We add new ``readyheads()`` and ``publishedheads()`` revset directives. This
-    returns the heads of each state **as if all of them were activated**.
+We add new ``readyheads()`` and ``publishedheads()`` revset directives. This
+returns the heads of each state **as if all of them were activated**.
 
-    XXX TODO - I would like to
+XXX TODO - I would like to
 
-    - move the current ``<state>heads()`` directives to
-      _``<state>heads()``
+- move the current ``<state>heads()`` directives to
+  _``<state>heads()``
 
-    - add ``<state>heads()`` directives to that return the currently in used heads
+- add ``<state>heads()`` directives to that return the currently in used heads
 
-    - add ``<state>()`` directives that match all node in a state.
+- add ``<state>()`` directives that match all node in a state.
+
+Context
+.......
+
+The ``context`` class gain a new method  ``states()`` that return a ``state`` object. The
+most notable property of this states object are ```name`` and ``mutable``.
 
 Other extensions
 ................
@@ -398,7 +404,7 @@ class state(object):
         """
         return cmp(self.properties, other.properties)
 
-    @util.propertycache
+    @property
     def mutable(self):
         return bool(self.properties & _MUTABLE)