Mercurial > hg > mercurial-source
changeset 9117:a87bc6e2a907
inotify: server: explicitely ignore events in subdirs of .hg/ (issue1735)
author | Nicolas Dumazet <nicdumz.commits@gmail.com> |
---|---|
date | Mon, 13 Jul 2009 21:55:17 +0900 |
parents | f90bbf1ea09f |
children | a5c060b80082 294c5e460b36 |
files | hgext/inotify/server.py tests/test-inotify tests/test-inotify.out |
diffstat | 3 files changed, 32 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/inotify/server.py +++ b/hgext/inotify/server.py @@ -636,6 +636,12 @@ assert evt.fullpath.startswith(self.wprefix) wpath = evt.fullpath[len(self.wprefix):] + # paths have been normalized, wpath never ends with a '/' + + if wpath.startswith('.hg/') and evt.mask & inotify.IN_ISDIR: + # ignore subdirectories of .hg/ (merge, patches...) + continue + if evt.mask & inotify.IN_UNMOUNT: self.process_unmount(wpath, evt) elif evt.mask & (inotify.IN_MODIFY | inotify.IN_ATTRIB):
--- a/tests/test-inotify +++ b/tests/test-inotify @@ -50,4 +50,24 @@ hg status hg ci -m0 +# Test for issue1735: inotify watches files in .hg/merge +hg st + +echo a > a + +hg ci -Am a +hg st + +echo b >> a +hg ci -m ab +hg st + +echo c >> a +hg st + +hg up 0 +hg st + +HGMERGE=internal:local hg up +hg st kill `cat hg.pid`