published is always enabled.
--- 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