changeset 8952:7c7a672e9db7

inotify: return version to client even when not matching Old clients are expecting a version string even in case of mismatch, otherwise they get stuck.
author Simon Heimberg <simohe@besonet.ch>
date Sun, 21 Jun 2009 18:11:19 +0200
parents 835a51e63c5b
children e1d119f450f0
files hgext/inotify/server.py
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/inotify/server.py	Thu Jun 25 22:43:58 2009 +0200
+++ b/hgext/inotify/server.py	Sun Jun 21 18:11:19 2009 +0200
@@ -717,6 +717,12 @@
         if version != common.version:
             self.ui.warn(_('received query from incompatible client '
                            'version %d\n') % version)
+            try:
+                # try to send back our version to the client
+                # this way, the client too is informed of the mismatch
+                sock.sendall(chr(common.version))
+            except:
+                pass
             return
 
         type = cs.read(4)