merge with -stable
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Wed, 10 Sep 2008 23:20:04 +0200
changeset 7027 ab57069232b4
parent 7023 74be9d0c665c (current diff)
parent 7026 3e49127bcec3 (diff)
child 7028 93746cbf15b5
merge with -stable
hgext/inotify/client.py
--- 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 []:
--- a/tests/test-inotify-issue1208.out	Wed Sep 10 22:54:28 2008 +0200
+++ b/tests/test-inotify-issue1208.out	Wed Sep 10 23:20:04 2008 +0200
@@ -1,9 +1,7 @@
 % fail
-failed to contact inotify server: AF_UNIX path too long
+failed to contact inotify server: No such file or directory
 deactivating inotify
 abort: could not start server: File exists
 % inserve
 % status
-failed to contact inotify server: AF_UNIX path too long
-deactivating inotify
 ? hg.pid