tests/test-mq-qrefresh-replace-log-message.t
author Matt Mackall <mpm@selenic.com>
Wed, 04 Jan 2012 17:55:30 -0600
changeset 15775 91eb4512edd0
parent 12468 d8bf747d2e29
child 17478 113d0a3d050b
permissions -rw-r--r--
copies: rewrite copy detection for non-merge users The existing copy detection API was designed with merge in mind and was ill-suited for doing status/diff. The new pathcopies implementation gives more accurate, easier to use results for comparing two revisions, and is much simpler to understand. Test notes: - test-mv-cp-st.t results finds more renames in the reverse direction now - test-mq-merge.t was always wrong and duplicated a copy in diff that was already present in one of the parent revisions

Environement setup for MQ

  $ echo "[extensions]" >> $HGRCPATH
  $ echo "mq=" >> $HGRCPATH
  $ hg init
  $ hg qinit

Should fail if no patches applied

  $ hg qrefresh
  no patches applied
  [1]
  $ hg qrefresh -e
  no patches applied
  [1]
  $ hg qnew -m "First commit message" first-patch
  $ echo aaaa > file
  $ hg add file
  $ hg qrefresh

Should display 'First commit message'

  $ hg log -l1 --template "{desc}\n"
  First commit message

Testing changing message with -m

  $ echo bbbb > file
  $ hg qrefresh -m "Second commit message"

Should display 'Second commit message'

  $ hg log -l1 --template "{desc}\n"
  Second commit message

Testing changing message with -l

  $ echo "Third commit message" > logfile
  $ echo " This is the 3rd log message" >> logfile
  $ echo bbbb > file
  $ hg qrefresh -l logfile

Should display 'Third commit message\\\n This is the 3rd log message'

  $ hg log -l1 --template "{desc}\n"
  Third commit message
   This is the 3rd log message

Testing changing message with -l-

  $ hg qnew -m "First commit message" second-patch
  $ echo aaaa > file2
  $ hg add file2
  $ echo bbbb > file2
  $ (echo "Fifth commit message"; echo " This is the 5th log message") | hg qrefresh -l-

Should display 'Fifth commit message\\\n This is the 5th log message'

  $ hg log -l1 --template "{desc}\n"
  Fifth commit message
   This is the 5th log message