inotify: make inotifydirstate.status() returns a tuple of lists. stable
authorGreg Ward <greg-hg@gerg.ca>
Tue, 20 Jul 2010 14:00:47 -0400
branchstable
changeset 11628 68a30daead3f
parent 11612 0e789549271d
child 11629 9e874ee0fe97
inotify: make inotifydirstate.status() returns a tuple of lists. This makes it consistent with dirstate.status(), which is important if there are other extensions messing with the output of status(). Those extensions can safely assume that dirstate.status() returns a tuple of lists, because its docstring says it does. But inotifystatus.dirstate() returns a list of lists, which can break those other extensions.
hgext/inotify/client.py
--- a/hgext/inotify/client.py	Wed Jul 14 18:28:12 2010 -0400
+++ b/hgext/inotify/client.py	Tue Jul 20 14:00:47 2010 -0400
@@ -154,7 +154,7 @@
                 if names:
                     return filter(match, names.split('\0'))
             return []
-        results = map(readnames, resphdr[:-1])
+        results = tuple(map(readnames, resphdr[:-1]))
 
         if names:
             nbytes = resphdr[-1]