hgext/states.py
changeset 68 6f7824dbce24
parent 67 e62ffb77bf8c
child 76 e68f6821ae84
equal deleted inserted replaced
67:e62ffb77bf8c 68:6f7824dbce24
   233 A new template keyword ``{state}`` has been added.
   233 A new template keyword ``{state}`` has been added.
   234 
   234 
   235 Revset
   235 Revset
   236 ......
   236 ......
   237 
   237 
   238     We add new ``readyheads()`` and ``publishedheads()`` revset directives. This
   238 We add new ``readyheads()`` and ``publishedheads()`` revset directives. This
   239     returns the heads of each state **as if all of them were activated**.
   239 returns the heads of each state **as if all of them were activated**.
   240 
   240 
   241     XXX TODO - I would like to
   241 XXX TODO - I would like to
   242 
   242 
   243     - move the current ``<state>heads()`` directives to
   243 - move the current ``<state>heads()`` directives to
   244       _``<state>heads()``
   244   _``<state>heads()``
   245 
   245 
   246     - add ``<state>heads()`` directives to that return the currently in used heads
   246 - add ``<state>heads()`` directives to that return the currently in used heads
   247 
   247 
   248     - add ``<state>()`` directives that match all node in a state.
   248 - add ``<state>()`` directives that match all node in a state.
       
   249 
       
   250 Context
       
   251 .......
       
   252 
       
   253 The ``context`` class gain a new method  ``states()`` that return a ``state`` object. The
       
   254 most notable property of this states object are ```name`` and ``mutable``.
   249 
   255 
   250 Other extensions
   256 Other extensions
   251 ................
   257 ................
   252 
   258 
   253 :rebase:     can't rebase immutable changeset.
   259 :rebase:     can't rebase immutable changeset.
   396         more property than the one before
   402         more property than the one before
   397         # assert min(self, other).properties = self.properties & other.properties
   403         # assert min(self, other).properties = self.properties & other.properties
   398         """
   404         """
   399         return cmp(self.properties, other.properties)
   405         return cmp(self.properties, other.properties)
   400 
   406 
   401     @util.propertycache
   407     @property
   402     def mutable(self):
   408     def mutable(self):
   403         return bool(self.properties & _MUTABLE)
   409         return bool(self.properties & _MUTABLE)
   404 
   410 
   405     # display code
   411     # display code
   406     def __repr__(self):
   412     def __repr__(self):