Mercurial > public > mercurial-scm > hg
diff hgext/inotify/server.py @ 8386:4aad982111b6
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
author | Nicolas Dumazet <nicdumz.commits@gmail.com> |
---|---|
date | Thu, 14 May 2009 15:48:47 +0200 |
parents | 1536501ade62 |
children | e387ecd7a6ed |
line wrap: on
line diff
--- a/hgext/inotify/server.py Mon May 11 08:19:28 2009 +0900 +++ b/hgext/inotify/server.py Thu May 14 15:48:47 2009 +0200 @@ -589,8 +589,6 @@ cs = common.recvcs(sock) version = ord(cs.read(1)) - sock.sendall(chr(common.version)) - if version != common.version: self.ui.warn(_('received query from incompatible client ' 'version %d\n') % version) @@ -638,7 +636,9 @@ try: try: - sock.sendall(struct.pack(common.resphdrfmt, + v = chr(common.version) + + sock.sendall(v + struct.pack(common.resphdrfmts['STAT'], *map(len, results))) sock.sendall(''.join(results)) finally: