hgext/inotify/client.py
changeset 7027 ab57069232b4
parent 6753 ed5ffb2c12f3
parent 7024 ee308d44ad76
child 7145 6f4a253f2a64
--- a/hgext/inotify/client.py	Wed Sep 10 22:54:28 2008 +0200
+++ b/hgext/inotify/client.py	Wed Sep 10 23:20:04 2008 +0200
@@ -14,7 +14,14 @@
 def query(ui, repo, names, match, ignored, clean, unknown=True):
     sock = socket.socket(socket.AF_UNIX)
     sockpath = repo.join('inotify.sock')
-    sock.connect(sockpath)
+    try:
+        sock.connect(sockpath)
+    except socket.error, err:
+        if err[0] == "AF_UNIX path too long":
+            sockpath = os.readlink(sockpath)
+            sock.connect(sockpath)
+        else:
+            raise
 
     def genquery():
         for n in names or []: