published is always enabled.
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Thu, 07 Jul 2011 13:44:15 +0200
changeset 28 0918e3b54f0b
parent 27 31906bc290ff
child 29 52c227772dad
published is always enabled.
states.py
tests/test-states.t
--- a/states.py	Thu Jul 07 11:10:05 2011 +0200
+++ b/states.py	Thu Jul 07 13:44:15 2011 +0200
@@ -331,6 +331,7 @@
 
         def _readenabledstates(self):
             states = set()
+            states.add(ST0)
             mapping = dict([(st.name, st) for st in STATES])
             try:
                 f = self.opener('states/Enabled')
--- a/tests/test-states.t	Thu Jul 07 11:10:05 2011 +0200
+++ b/tests/test-states.t	Thu Jul 07 13:44:15 2011 +0200
@@ -11,21 +11,27 @@
   $ hg init other
   $ cd local
   $ hg states --traceback -v
+  published
   $ hg states draft
   $ hg states
+  published
   draft
   $ hg states ready
   $ hg states
+  published
   ready
   draft
   $ hg states --off draft
   $ hg states
+  published
   ready
   $ hg states babar
   no state named babar
   [1]
   $ echo 'babar' >> .hg/states/Enabled
   $ hg states
+  published
   ready
   $ hg -R ../other states
+  published