tests/test-states.t
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Mon, 28 Nov 2011 00:59:18 +0100
changeset 106 03bbce26553e
parent 90 a5f6194eb05c
permissions -rw-r--r--
Allow setstate with the last non trcked state.


  $ cat >> $HGRCPATH <<EOF
  > [web]
  > push_ssl = false
  > allow_push = *
  > [extensions]
  > EOF
  $ echo "states=$(echo $(dirname $TESTDIR))/hgext/states.py" >> $HGRCPATH

  $ hg init local
  $ 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

do nothing if state already deactivated
  $ hg states --off draft
  state draft already deactivated
  $ hg states
  published
  ready