tests/test-inotify-issue1208.t
author Bryan O'Sullivan <bryano@fb.com>
Fri, 14 Sep 2012 12:05:12 -0700
changeset 17556 39c6e349dfff
parent 16913 f2719b387380
child 18096 cd53e40ab0e2
permissions -rw-r--r--
wireproto: don't audit local paths during stream_out Auditing at this stage is both pointless (paths are already trusted by the local repo) and expensive. Skipping the audits improves stream_out performance by about 15%.


  $ "$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`

  $ cd ..