tests/test-inotify-issue1208.t
author Matt Mackall <mpm@selenic.com>
Tue, 01 Nov 2011 15:19:37 -0500
branchstable
changeset 15399 41453d55b481
parent 12650 fed4bb2c8def
child 16913 f2719b387380
permissions -rw-r--r--
dirstate: don't fail when dropping a not-tracked file (issue3080) Complex merges with divergent renames can cause a file to be 'moved' twice, causing dirstate.drop() to be called twice. Rather than try to ensure there are no unexpected corner cases where this can happen, we simply ignore drops of files that aren't tracked.


  $ "$TESTDIR/hghave" inotify || exit 80
  $ echo "[extensions]" >> $HGRCPATH
  $ echo "inotify=" >> $HGRCPATH
  $ p="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  $ hg init $p
  $ cd $p

fail

  $ ln -sf doesnotexist .hg/inotify.sock
  $ hg st
  abort: inotify-server: cannot start: .hg/inotify.sock is a broken symlink
  inotify-client: could not start inotify server: child process failed to start
  $ hg inserve
  abort: inotify-server: cannot start: .hg/inotify.sock is a broken symlink
  [255]
  $ rm .hg/inotify.sock

inserve

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

status

  $ hg status
  ? hg.pid

if we try to start twice the server, make sure we get a correct error

  $ hg inserve -d --pid-file=hg2.pid
  abort: inotify-server: cannot start: socket is already bound
  abort: child process failed to start
  [255]
  $ kill `cat hg.pid`