tests/test-inotify-issue1556.t
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Wed, 19 Mar 2014 01:07:41 +0900
branchstable
changeset 20767 bcfc4f625e57
parent 18593 895d65364570
permissions -rw-r--r--
tag: save manually edited commit message into ".hg/last-message.txt" Before this patch, manually edited commit message for "hg tag -e" isn't saved into ".hg/last-message.txt" until it is saved by "localrepository.savecommitmessage()" in "localrepository.commit()". This may lose such commit message, if unexpected exception is raised. This patch saves manually edited commit message for "hg tag -e" into ".hg/last-message.txt" just after user editing. This patch doesn't save the message specified by -m option (-l is not supported for "hg tag") as same as other commands. This is the simplest implementation to fix on stable. Editing and saving commit message should be centralized into the framework of "localrepository.commit()" with "editor" argument in the future.


  $ "$TESTDIR/hghave" inotify || exit 80
  $ hg init
  $ touch a b
  $ hg add a b
  $ rm b

status without inotify

  $ hg st
  A a
  ! b
  $ echo "[extensions]" >> $HGRCPATH
  $ echo "inotify=" >> $HGRCPATH

inserve

  $ hg inserve -d --pid-file=hg.pid 2>&1
  $ cat hg.pid >> "$DAEMON_PIDS"

status

  $ hg st
  A a
  ! b
  ? hg.pid
  $ sleep 1

Are we able to kill the service? if not, the service died on some error

  $ "$TESTDIR/killdaemons.py" hg.pid