tests/test-mq-qrename.t
author Wagner Bruna <wbruna@softwareexpress.com.br>
Thu, 21 Oct 2010 11:45:02 -0200
branchstable
changeset 12806 57b9fd75b6f8
parent 12361 2754c8273132
child 12875 b59b5193d4d0
permissions -rw-r--r--
i18n: extract comments marked for translator hints Comments marked with "i18n:", like: # i18n: do not translate the field names msg = _("Valid entries for the format field are topic, bar, number.") will become available for translators in the .po files: #. i18n: do not translate the field names msgid "Valid entries for the format field are topic, bar, number." msgstr ""


  $ echo "[extensions]" >> $HGRCPATH
  $ echo "mq=" >> $HGRCPATH

  $ hg init a
  $ cd a

  $ echo 'base' > base
  $ hg ci -Ambase
  adding base

  $ hg qnew -mmqbase mqbase

  $ hg qrename mqbase renamed
  $ mkdir .hg/patches/foo
  $ hg qrename renamed foo

  $ hg qseries
  foo/renamed

  $ ls .hg/patches/foo
  renamed

  $ mkdir .hg/patches/bar
  $ hg qrename foo/renamed bar

  $ hg qseries
  bar/renamed

  $ ls .hg/patches/bar
  renamed

  $ hg qrename bar/renamed baz

  $ hg qseries
  baz

  $ ls .hg/patches/baz
  .hg/patches/baz

  $ hg qrename baz new/dir

  $ hg qseries
  new/dir

  $ ls .hg/patches/new/dir
  .hg/patches/new/dir

  $ cd ..

Test patch being renamed before committed:

  $ hg init b
  $ cd b
  $ hg qinit -c
  $ hg qnew x
  $ hg qrename y
  $ hg qcommit -m rename

  $ cd ..

Test overlapping renames (issue2388)

  $ hg init c
  $ cd c
  $ hg qinit -c
  $ echo a > a
  $ hg add
  adding a
  $ hg qnew patcha
  $ echo b > b
  $ hg add
  adding b
  $ hg qnew patchb
  $ hg ci --mq -m c1
  $ hg qrename patchb patchc
  $ hg qrename patcha patchb
  $ hg st --mq
  M patchb
  M series
  A patchc
  R patcha
  $ cd ..