Commit Graph

16 Commits

Author SHA1 Message Date
Nicolas Dumazet
28d2c833e7 inotify: raise QueryFailed when the server crash
When the server crashes, it does not write back on the socket. The message
which is then read from the socket is '', which raises a TypeError.
Catching TypeError to raise QueryFailed instead.
2009-06-13 17:39:01 +02:00
Nicolas Dumazet
21b374a449 inotify: introduce debuginotify, which lists which paths are under watch 2009-04-22 00:37:35 +09:00
Nicolas Dumazet
f83e3d685a inotify: change protocol so that different query types can be supported. 2009-04-17 20:10:47 +09:00
Nicolas Dumazet
0d917847ce inotify: Separate query sending logic from Server starting.
Use a decorator around the public statusquery method of Client:

start_server(query_to_server):
    try:
        query_to_server()
    except QueryFailed:
        [error recovery, inotify Server (re)starting]
        query_to_server()

This way, introducing a new xxxquery Client method is easy:
one has only to code the protocol part of xxxquery, ignoring errors,
and decorating it using start_server to handle server recovery
and (re)starts
2009-04-07 19:30:01 +09:00
Nicolas Dumazet
73cefeb380 inotify: modular architecture for inotify clients
Put the socket init, query generation and response analysis in
a more generic client class.
2009-04-07 18:39:34 +09:00
Nicolas Dumazet
e3d71f714c inotify: Abstract the layer format and sizes to a inotify.common dictionary
Instead of having a single possible request format, introduce a dictionary
of possible messages in inotify.common
2009-05-14 15:48:47 +02:00
Martin Geisler
750183bdad updated license to be explicit about GPL version 2 2009-04-26 01:08:54 +02:00
Nicolas Dumazet
2a759b6b22 inotify: files is always a list: 'files or []' is redundant
files comes from match.files() : it always returns a list.
2009-04-08 13:27:28 +09:00
Brendan Cully
27542d729d inotify: remove unused imports (thanks pyflakes) 2008-11-25 18:45:08 -08:00
Benoit Boissinot
ea7fe6dacc remove unused variables 2008-10-28 19:25:26 +01:00
Martin Geisler
da335e4675 i18n: import _ instead of gettext 2008-10-21 17:47:49 +02:00
Benoit Boissinot
3babcafb3e inotify: fix status not showing "clean" files (issue907)
The inotify server uses 'c' for clean, not 'n'.
2008-10-18 23:06:29 +02:00
Benoit Boissinot
9ceefedcef merge with -stable 2008-09-10 23:20:04 +02:00
Benoit Boissinot
bb6f34eb86 inotify: add client code for long pathname handling 2008-09-07 15:10:11 +02:00
Matt Mackall
73c76dd164 repo.status: eliminate list_ 2008-06-26 14:35:50 -05:00
Bryan O'Sullivan
08dc4f9063 Add inotify extension 2008-03-12 15:30:11 -07:00