inotify: return version to client even when not matching
authorSimon Heimberg <simohe@besonet.ch>
Sun, 21 Jun 2009 18:11:19 +0200
changeset 8952 7c7a672e9db7
parent 8951 835a51e63c5b
child 8953 e1d119f450f0
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.
hgext/inotify/server.py
--- 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)