states.py
changeset 33 dca86448d736
parent 31 1fef89f56588
equal deleted inserted replaced
32:c27491be4431 33:dca86448d736
   121 # New commands
   121 # New commands
   122 #############################
   122 #############################
   123 
   123 
   124 
   124 
   125 def cmdstates(ui, repo, *states, **opt):
   125 def cmdstates(ui, repo, *states, **opt):
   126     """show enabled states"""
   126     """view and modify activated states.
       
   127 
       
   128     With no argument, list activated state.
       
   129 
       
   130     With argument, activate the state in argument.
       
   131 
       
   132     With argument plus the --off switch, deactivate the state in argument.
       
   133 
       
   134     note: published state are alway activated."""
       
   135 
   127     if not states:
   136     if not states:
   128         for st in sorted(repo._enabledstates):
   137         for st in sorted(repo._enabledstates):
   129             ui.write('%s\n' % st)
   138             ui.write('%s\n' % st)
   130     else:
   139     else:
   131         off = opt.get('off', False)
   140         off = opt.get('off', False)