Nicolas Dumazet <nicdumz.commits@gmail.com> [Thu, 21 May 2009 19:22:29 +0900] rev 8608
inotify: rename handle_event to handle_pollevent to avoid confusion
event here refers to poll events, and are different from events read in
server.read_events for example, where those events are inotify events.
Nicolas Dumazet <nicdumz.commits@gmail.com> [Thu, 21 May 2009 16:54:05 +0900] rev 8607
inotify: handle_event: do not use event and fd parameters.
event is particularly confusing given the context (is it an inotify event?
a polling event?) and is never used. Remove it.
fd has very little use, and it gives the false impression that event handling
depends on fd. It's wrong: the same behavior is triggered, for all events.
Nicolas Dumazet <nicdumz.commits@gmail.com> [Fri, 22 May 2009 10:26:56 +0900] rev 8606
inotify: use a decorator instead of dispatching calls
Nicolas Dumazet <nicdumz.commits@gmail.com> [Fri, 22 May 2009 09:57:53 +0900] rev 8605
inotify: do not defer inotify events processing
Doing a part of the event processing and deferring the rest is a bad
habit: it complexifies the code, and it does not respect event ordering!
Moreover, there is already a timeout handling, so that inotify events are
only processed when a treshold is exceeded: there is no requirement to
delay anymore the events processing.
Nicolas Dumazet <nicdumz.commits@gmail.com> [Thu, 21 May 2009 15:55:58 +0900] rev 8604
inotify: do not recurse in handle_timeout(): call it explicitely, not in scan()
When in handle_timeout, scan() is called when a repertory is created/modified.
But the first line of scan calls handle_timeout.
This had the consequence of calling recursively handle_timeout:
* several calls to read_events (but only the first one retrieves events)
* every time that an event is queued for a deferred action, the next time that
scan() is called, handle_timeout is called, the event queue is treated,
even if all the events haven't been read/queued yet. This could lead to
inconsistencies
Henrik Stuart <hg@hstuart.dk> [Sun, 24 May 2009 17:07:27 +0200] rev 8603
i18n-da: typo
Benoit Boissinot <benoit.boissinot@ens-lyon.org> [Sun, 24 May 2009 16:33:22 +0200] rev 8602
merge with crew
Dmitriy Kostunin <dmitriy.kostunin@gmail.com> [Tue, 31 Mar 2009 00:04:07 +0900] rev 8601
inotify: adding test for issue1556
Nicolas Dumazet <nicdumz.commits@gmail.com> [Sat, 23 May 2009 18:44:01 +0900] rev 8600
inotify: proper fix for issue1542 (partially reverting 67e59a9886d5)
issue1542 description:
Unknown files (?) placed in a directory are still marked as present and unknown
when the containing directory is moved out of the repository scope.
Why 67e59a9886d5 was bad:
* When the problem we're addressing only deals with unknown files, the fix to
updatestatus applies for all statuses
* The only reason to move the call schedule_work(wpath, 'd') seems to be that
it allowed an updatestatus call on the deleted directory, in deleted(). But
deleted() should not be called on directories in the first place.
* After fixing an independant issue (1371), test-inotify-issue1542 was failing
Fix:
When processing a deletion of a directory, walk the tree of the unknown files
and remove the entries from repowatcher.
This step does not need to be added in the generic scan() routine: it is only
necessary on a directory deletion.
Nicolas Dumazet <nicdumz.commits@gmail.com> [Sun, 24 May 2009 18:43:05 +0900] rev 8599
inotify: server: refactor updatestatus()
* Instead of one entry point, use two entry points, updatefile()
and deletefile(), both internally calling the helper function _updatestatus
* Do not rely on TypeError to detect the type of oldstatus: use isinstance
* The call updatestatus(wpath, None) in deleted() was a bit particular:
because no osstat and no newstatus was given, the newstatus was determined
using the data stored internally. To replace this exact behavior with the
new code, one would use:
root, fn = self.split(wpath)
d = self.dir(self.tree, root)
self.filedeleted(wpath, d.get(fn))
This, however, duplicates code with _updatestatus(), which led us to an
interesting question: why are we basing ourselves on repowatcher data to
update the status, where everywhere else, we are comparing against dirsate?
There is no reason to do this, which is why the new code is:
self.filedeleted(wpath, self.repo.dirstate[wpath])
Incidentally, after this, the test for issue1371 passes again.
Patrick Mezard <pmezard@gmail.com> [Sun, 24 May 2009 16:27:56 +0200] rev 8598
convert: deprecate external cvsps, to be removed in 1.4
Patrick Mezard <pmezard@gmail.com> [Sun, 24 May 2009 16:27:50 +0200] rev 8597
osutil: silence uninitialized variable warning
Patrick Mezard <pmezard@gmail.com> [Sun, 24 May 2009 16:27:37 +0200] rev 8596
convert/hg: update documentation
Henrik Stuart <hg@hstuart.dk> [Sun, 24 May 2009 16:16:46 +0200] rev 8595
i18n-da: better word for "check"
Henrik Stuart <hg@hstuart.dk> [Sun, 24 May 2009 16:14:32 +0200] rev 8594
i18n-da: fixed use of plural form for parent