Issue1811

Title inotify uses dirstate data when it's dirty
Priority bug Status done-cbb
Superseder Nosy List ThomasAH, nicdumz, simohe, tonfa
Assigned To nicdumz Topics inotify

Created on 2009-08-24.18:06:03 by nicdumz, last changed 2010-01-01.19:28:06 by mpm.

Files
File name Uploaded Type Edit Remove
dirtydirstate.patch nicdumz, 2009-08-24.18:06:03 text/x-patch
Messages
msg10986 (view) Author: tonfa Date: 2009-11-16.11:00:58
changeset:   9858:ea38a2c1bdd3
user:        Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date:        Mon Nov 16 11:55:29 2009 +0100
summary:     lock: the correct way to do a trylock() is to use a timeout 
of 0

changeset:   9859:951ec6c7d703
tag:         tip
user:        Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date:        Mon Nov 16 11:58:03 2009 +0100
summary:     inotify: workaround test-inotify-dirty-dirstate failures


First one is a fix for the lock warning, the second one workaround the 
failure until a proper fix is issued (workaround was provided by Nicolas).
msg10985 (view) Author: ThomasAH Date: 2009-11-16.09:43:17
Not yet in hg-stable (only crew-stable), therefore at most 'testing'.

But anyway, now I get this when running 'make tests':

ERROR: test-inotify-dirty-dirstate output changed
--- Expected output 
+++ Test output 
@@ -1,9 +1,14 @@
 % issue1810: inotify and fetch
 adding foo
-updating working directory
-1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+/tmp/thomas/hgtests.SAA3Py/install/lib/python/mercurial/lock.py:80:
DeprecationWarning: use lock.release instead of del lock
+  locker = self.testlock()
 adding bar
+/tmp/thomas/hgtests.SAA3Py/install/lib/python/mercurial/lock.py:80:
DeprecationWarning: use lock.release instead of del lock
+  locker = self.testlock()
 adding spam
+/tmp/thomas/hgtests.SAA3Py/install/lib/python/mercurial/lock.py:80:
DeprecationWarning: use lock.release instead of del lock
+  locker = self.testlock()
+abort: repository is unrelated
 % issue1719: inotify and mq
 % inserve
 ? hg.pid
msg10972 (view) Author: nicdumz Date: 2009-11-14.01:00:55
In crew-stable: http://hg.intevation.org/mercurial/crew-stable/rev/f47c0881b16e
msg10960 (view) Author: nicdumz Date: 2009-11-13.05:49:47
As there was no activity, I went ahead and emailed a patch today, using
Simon's first suggestion ("let's recompute the dirstate data").

We can perhaps do better than a simple dirstate recomputation (?), but for
now, it does not make sense to leave this bug live, as we have a working
solution.
msg10632 (view) Author: nicdumz Date: 2009-10-03.16:32:20
The last activity on this that I've heard of was
http://selenic.com/pipermail/mercurial-devel/2009-August/015017.html

Delegating the status calls to the dirstate (bypass inotify) when the
dirstate is dirty looks good to me.
msg10630 (view) Author: tonfa Date: 2009-10-03.16:22:41
What was the status of this, wasn't a simple "let's recompute the dirstate 
data" good enough?

thanks!
msg10418 (view) Author: nicdumz Date: 2009-08-24.18:06:03
I am creating this issue to supersede issue1810 and issue1719.

Those two issues arise in different contexts, but the source of the problem
is the very same: accessing dirstate when it's dirty, and simon's is already
working on a patch.

I'm adding a patch containing merged tests and their corresponding outputs.
History
Date User Action Args
2010-01-01 19:28:06mpmsetstatus: in-progress -> done-cbb
assignedto: simohe -> nicdumz
nosy: ThomasAH, tonfa, simohe, nicdumz
2009-11-16 11:00:59tonfasetnosy: ThomasAH, tonfa, simohe, nicdumz
messages: + msg10986
2009-11-16 09:43:18ThomasAHsetstatus: resolved -> in-progress
nosy: + ThomasAH
messages: + msg10985
2009-11-14 01:00:55nicdumzsetstatus: testing -> resolved
messages: + msg10972
2009-11-13 05:49:57nicdumzsetstatus: chatting -> testing
2009-11-13 05:49:47nicdumzsetmessages: + msg10960
2009-11-13 05:45:43nicdumzunlinkissue1810 superseder
2009-10-03 16:32:20nicdumzsetmessages: + msg10632
2009-10-03 16:22:41tonfasetstatus: unread -> chatting
nosy: + tonfa
messages: + msg10630
2009-08-24 18:07:40nicdumzlinkissue1719 superseder
2009-08-24 18:07:22nicdumzlinkissue1810 superseder
2009-08-24 18:06:03nicdumzcreate