changeset 28:0918e3b54f0b

published is always enabled.
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Thu, 07 Jul 2011 13:44:15 +0200
parents 31906bc290ff
children 52c227772dad
files states.py tests/test-states.t
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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