diff --git a/hgext/inotify/__init__.py b/hgext/inotify/__init__.py --- a/hgext/inotify/__init__.py +++ b/hgext/inotify/__init__.py @@ -46,7 +46,7 @@ def reposetup(ui, repo): files = match.files() if '.' in files: files = [] - if self._inotifyon and not ignored: + if self._inotifyon and not ignored and not self._dirty: cli = client(ui, repo) try: result = cli.statusquery(files, match, False, diff --git a/tests/test-inotify-dirty-dirstate b/tests/test-inotify-dirty-dirstate new file mode 100755 --- /dev/null +++ b/tests/test-inotify-dirty-dirstate @@ -0,0 +1,67 @@ +#!/bin/sh + +# issues when status queries are issued when dirstate is dirty + +"$TESTDIR/hghave" inotify || exit 80 + +echo "[extensions]" >> $HGRCPATH +echo "inotify=" >> $HGRCPATH +echo "fetch=" >> $HGRCPATH + +echo % issue1810: inotify and fetch +mkdir test; cd test +hg init + +echo foo > foo +hg add +hg ci -m foo + +cd .. + +hg clone test test2 +cd test2 +echo bar > bar +hg add +hg ci -m bar +cd ../test +echo spam > spam +hg add +hg ci -m spam +cd ../test2 +hg st + +# abort, outstanding changes +hg fetch -q +hg st +cd .. + + +echo % issue1719: inotify and mq + +echo "mq=" >> $HGRCPATH + +hg init test-1719 +cd test-1719 + +echo % inserve +hg inserve -d --pid-file=hg.pid +cat hg.pid >> "$DAEMON_PIDS" + +echo content > file +hg add file + +hg qnew -f test.patch + +hg status +hg qpop + +echo % st should not output anything +hg status + +hg qpush + +echo % st should not output anything +hg status + +hg qrefresh +hg status diff --git a/tests/test-inotify-dirty-dirstate.out b/tests/test-inotify-dirty-dirstate.out new file mode 100644 --- /dev/null +++ b/tests/test-inotify-dirty-dirstate.out @@ -0,0 +1,18 @@ +% issue1810: inotify and fetch +adding foo +updating working directory +1 files updated, 0 files merged, 0 files removed, 0 files unresolved +adding bar +adding spam +% issue1719: inotify and mq +% inserve +? hg.pid +popping test.patch +patch queue now empty +% st should not output anything +? hg.pid +applying test.patch +now at: test.patch +% st should not output anything +? hg.pid +? hg.pid