tests/test-published.t
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Tue, 13 Sep 2011 00:45:42 +0200
changeset 64 6a7dc5ca05b8
parent 63 f47a5f990eb2
child 65 7c8f992d567e
permissions -rw-r--r--
[states] add mq support


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


init stuff

  $ hg init local
  $ cd local
  $ echo "celestine" > babar
  $ hg add babar
  $ hg ci -m "add babar"
  $ echo "la veille dame" > babar
  $ hg ci -m "add dame"
  $ hg log --template='{rev}:{node|short}: {state}\n'
  1:710fe444b3b0: published
  0:5caa672bac26: published
  $ hg up 0 -q
  $ echo "Rataxes" > rhino
  $ hg add rhino
  $ hg ci -m "add rhino"
  created new head
  $ hg published 1 2
  $ hg up 1 -q
  $ hg states draft
  $ echo "flore" > babar
  $ hg ci -m "add daughter"

test you can't qimport published changeset

  $ hg qimport -r 1
  abort: can not qimport published changeset 710fe444b3b0
  (see `hg help --extension states` for details)
  [255]

but other are ok

  $ hg qimport -r 3
  $ hg qfinish -a

test you can't rebase published changeset

  $ hg rebase --dest 2 -b 1
  abort: can not rebase published changeset 710fe444b3b0
  (see `hg help --extension states` for details)
  [255]

test you still can rebase other one

  $ hg rebase --dest 2 -s 3
  saved backup bundle to $TESTTMP/local/.hg/strip-backup/b7f6698b7ad7-backup.hg