hgext/inotify/client.py
changeset 7024 ee308d44ad76
parent 6239 39cfcef4f463
child 7027 ab57069232b4
--- a/hgext/inotify/client.py	Sat Sep 06 14:11:33 2008 +0200
+++ b/hgext/inotify/client.py	Sun Sep 07 15:10:11 2008 +0200
@@ -14,7 +14,14 @@
 def query(ui, repo, names, match, list_ignored, list_clean, list_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 []: