Update: it looks like I was not really testing anything, because apparently the
inotify extension no longer does anything unless you explicitly 'hg inserve'.
(It used to automatically start the daemon on demand but it seems this is no
longer true?) When I update the test case accordingly, I get the original bug,
plus an error:
#!/bin/sh
cd /tmp
killall hg
rm -rf hg-inotify-test
hg init hg-inotify-test
cd hg-inotify-test
hg inserve &
echo '^build$' > .hgignore
hg ci -m ignorelist -A
mkdir build
touch build/x
touch build/y
echo 'stat #1'
hg stat
touch .hgignore
echo 'stat #2'
hg stat
hg: no process killed
adding .hgignore
stat #1
M .hgignore
? build/x
? build/y
stat #2
** unknown exception encountered, details follow
** report bug details to http://www.selenic.com/mercurial/bts
** or mercurial@selenic.com
** Mercurial Distributed SCM (version 1.0.2)
Traceback (most recent call last):
File "/home/jglick/bin/hg", line 20, in <module>
mercurial.dispatch.run()
File "/home/jglick/lib/python/mercurial/dispatch.py", line 20, in run
sys.exit(dispatch(sys.argv[1:]))
File "/home/jglick/lib/python/mercurial/dispatch.py", line 29, in dispatch
return _runcatch(u, args)
File "/home/jglick/lib/python/mercurial/dispatch.py", line 45, in _runcatch
return _dispatch(ui, args)
File "/home/jglick/lib/python/mercurial/dispatch.py", line 364, in _dispatch
ret = _runcommand(ui, options, cmd, d)
File "/home/jglick/lib/python/mercurial/dispatch.py", line 417, in _runcommand
return checkargs()
File "/home/jglick/lib/python/mercurial/dispatch.py", line 373, in checkargs
return cmdfunc()
File "/home/jglick/lib/python/mercurial/dispatch.py", line 356, in <lambda>
d = lambda: func(ui, repo, *args, **cmdoptions)
File "/home/jglick/lib/python/hgext/inotify/__init__.py", line 36, in serve
cmdutil.service(opts, initfn=service.init, runfn=service.run)
File "/home/jglick/lib/python/mercurial/cmdutil.py", line 561, in service
return runfn()
File "/home/jglick/lib/python/hgext/inotify/__init__.py", line 31, in run
self.master.run()
File "/home/jglick/lib/python/hgext/inotify/server.py", line 686, in run
self.table[fd].handle_event(fd, event)
File "/home/jglick/lib/python/hgext/inotify/server.py", line 595, in handle_event
self.watcher.handle_timeout()
File "/home/jglick/lib/python/hgext/inotify/server.py", line 541, in
handle_timeout
self.deferred_event(wpath, evt)
File "/home/jglick/lib/python/hgext/inotify/server.py", line 454, in
deferred_event
self.modified(wpath)
File "/home/jglick/lib/python/hgext/inotify/server.py", line 420, in modified
self.update_hgignore()
File "/home/jglick/lib/python/hgext/inotify/server.py", line 383, in
update_hgignore
if self.repo.dirstate.ignorefunc is not None:
File "/home/jglick/lib/python/mercurial/dirstate.py", line 70, in __getattr__
raise AttributeError, name
AttributeError: ignorefunc |