tests/test-states-enable.t
author Pierre-Yves David <pierre-yves.david@logilab.fr>
Mon, 19 Dec 2011 12:18:04 +0100
changeset 108 85271a8a7fb9
parent 98 8ad5c760c708
permissions -rw-r--r--
Properly inherit phase of relocated changeset.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
98
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
     1
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
     2
  $ cat >> $HGRCPATH <<EOF
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
     3
  > [web]
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
     4
  > push_ssl = false
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
     5
  > allow_push = *
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
     6
  > [extensions]
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
     7
  > EOF
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
     8
  $ echo "states=$(echo $(dirname $TESTDIR))/hgext/states.py" >> $HGRCPATH
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
     9
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    10
  $ mkcommit() {
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    11
  >    echo "$1" > "$1"
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    12
  >    hg add "$1"
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    13
  >    hg ci -m "$1"
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    14
  > }
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    15
  $ alias hglog='hg log --template "{rev} {state}\n"'
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    16
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    17
  $ hg init alpha
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    18
  $ cd alpha
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    19
  $ mkcommit 0
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    20
  $ mkcommit 1
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    21
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    22
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    23
enable draft: existing changesets stay as published and newer are draft
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    24
  $ hg states draft
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    25
  $ hg states
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    26
  published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    27
  draft
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    28
  $ hglog
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    29
  1 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    30
  0 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    31
  $ mkcommit 2
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    32
  $ hglog
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    33
  2 draft
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    34
  1 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    35
  0 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    36
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    37
enable ready: existing changset states are the same, newer are draft
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    38
  $ hg states ready
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    39
  $ hg states
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    40
  published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    41
  ready
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    42
  draft
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    43
  $ hglog
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    44
  2 draft
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    45
  1 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    46
  0 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    47
  $ mkcommit 3
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    48
  $ hglog
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    49
  3 draft
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    50
  2 draft
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    51
  1 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    52
  0 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    53
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    54
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    55
publish all then enable states in other order
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    56
  $ hg published tip
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    57
  $ hg states --off ready draft
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    58
  $ hglog
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    59
  3 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    60
  2 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    61
  1 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    62
  0 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    63
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    64
enable ready: changesets stay as published and newer are ready
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    65
  $ hg states ready
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    66
  $ hglog
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    67
  3 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    68
  2 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    69
  1 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    70
  0 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    71
  $ mkcommit 4
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    72
  $ hglog
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    73
  4 ready
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    74
  3 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    75
  2 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    76
  1 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    77
  0 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    78
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    79
enable draft: changesets stay unchanged and newer are draft
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    80
  $ hg states draft
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    81
  $ hglog
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    82
  4 ready
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    83
  3 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    84
  2 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    85
  1 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    86
  0 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    87
  $ mkcommit 5
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    88
  $ hglog
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    89
  5 draft
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    90
  4 ready
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    91
  3 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    92
  2 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    93
  1 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    94
  0 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    95
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    96
disable ready
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    97
  $ hg states --off ready
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    98
  abort: could not disable non empty state ready
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
    99
  (You may want to use `hg published 'readyheads()'`)
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   100
  [255]
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   101
  $ hg publish 4
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   102
  $ hg states --off ready
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   103
  $ hg states
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   104
  published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   105
  draft
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   106
  $ hglog
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   107
  5 draft
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   108
  4 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   109
  3 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   110
  2 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   111
  1 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   112
  0 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   113
  $ hg ready 4
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   114
  abort: state ready is not activated
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   115
  (try ``hg states ready`` before)
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   116
  [255]
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   117
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   118
disable draft
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   119
  $ hg states --off draft
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   120
  abort: could not disable non empty state draft
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   121
  (You may want to use `hg published 'draftheads()'`)
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   122
  [255]
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   123
  $ hg publish tip
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   124
  $ hg states --off draft
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   125
  $ hg states
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   126
  published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   127
  $ hglog
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   128
  5 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   129
  4 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   130
  3 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   131
  2 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   132
  1 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   133
  0 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   134
  $ hg draft 5
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   135
  abort: state draft is not activated
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   136
  (try ``hg states draft`` before)
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   137
  [255]
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   138
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   139
disable published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   140
  $ hg states --off published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   141
  abort: could not disable published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   142
  [255]
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   143
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   144
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   145
enable both draft and ready
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   146
  $ hg states draft ready
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   147
  $ hg states
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   148
  published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   149
  ready
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   150
  draft
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   151
  $ hglog
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   152
  5 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   153
  4 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   154
  3 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   155
  2 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   156
  1 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   157
  0 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   158
  $ mkcommit 6
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   159
  $ hglog
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   160
  6 draft
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   161
  5 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   162
  4 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   163
  3 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   164
  2 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   165
  1 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   166
  0 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   167
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   168
disable both draft and ready
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   169
  $ hg published tip
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   170
  $ hg states --off draft ready
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   171
  $ hg states
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   172
  published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   173
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   174
clever enabling
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   175
  $ hg states --clever ready
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   176
  $ hglog
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   177
  6 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   178
  5 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   179
  4 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   180
  3 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   181
  2 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   182
  1 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   183
  0 published
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   184
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   185
  $ cd ..
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   186
  $ hg init beta
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   187
  $ cd beta
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   188
  $ mkcommit 0
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   189
  $ mkcommit 1
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   190
  $ hg states --clever ready
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   191
  $ hglog
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   192
  1 ready
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   193
  0 ready
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   194
  $ hg states --clever draft
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   195
  $ hglog
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   196
  1 draft
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   197
  0 draft
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   198
8ad5c760c708 [states] make enabling state saftier
Alain Leufroy <alain.leufroy@logilab.fr>
parents:
diff changeset
   199