[CalendarServer-changes] [3995] CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/ Twisted/twisted.mail.imap4.patch

source_changes at macosforge.org source_changes at macosforge.org
Mon Apr 13 07:49:04 PDT 2009


Revision: 3995
          http://trac.macosforge.org/projects/calendarserver/changeset/3995
Author:   exarkun at twistedmatrix.com
Date:     2009-04-13 07:49:03 -0700 (Mon, 13 Apr 2009)
Log Message:
-----------
Twisted #1105 resolved, patch no longer necessary

Removed Paths:
-------------
    CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.mail.imap4.patch

Deleted: CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.mail.imap4.patch
===================================================================
--- CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.mail.imap4.patch	2009-04-13 00:33:27 UTC (rev 3994)
+++ CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.mail.imap4.patch	2009-04-13 14:49:03 UTC (rev 3995)
@@ -1,65 +0,0 @@
-Index: twisted/mail/imap4.py
-===================================================================
---- twisted/mail/imap4.py	(revision 19773)
-+++ twisted/mail/imap4.py	(working copy)
-@@ -363,16 +363,11 @@
-         for L in self.lines:
-             names = parseNestedParens(L)
-             N = len(names)
-+            # This section is patched as described in http://twistedmatrix.com/trac/ticket/1105
-             if (N >= 1 and names[0] in self._1_RESPONSES or
-+                N >= 2 and names[1] in self._2_RESPONSES or
-                 N >= 2 and names[0] == 'OK' and isinstance(names[1], types.ListType) and names[1][0] in self._OK_RESPONSES):
-                 send.append(L)
--            elif N >= 3 and names[1] in self._2_RESPONSES:
--                if isinstance(names[2], list) and len(names[2]) >= 1 and names[2][0] == 'FLAGS' and 'FLAGS' not in self.args:
--                    unuse.append(L)
--                else:
--                    send.append(L)
--            elif N >= 2 and names[1] in self._2_RESPONSES:
--                send.append(L)
-             else:
-                 unuse.append(L)
-         d, self.defer = self.defer, None
-@@ -2245,10 +2240,12 @@
-                     for f in fetched.get('FLAGS', []):
-                         sum.append(f)
-                     flags.setdefault(mId, []).extend(sum)
-+            elif L.find('BYE LOGOUT') != -1:
-+                pass
-             else:
-                 log.msg('Unhandled unsolicited response: ' + repr(L))
--        if flags:
--            self.flagsChanged(flags)
-+        #if flags:
-+        #    self.flagsChanged(flags)
-         if recent is not None or exists is not None:
-             self.newMessages(exists, recent)
- 
-@@ -3336,6 +3333,8 @@
-                             if len(data) < 2:
-                                 raise IllegalServerResponse("Not enough arguments", data)
-                             flags.setdefault(id, {})[data[0]] = data[1]
-+                            if data[0] == 'FLAGS':
-+                                self.flagsChanged({id: data[1]})
-                             del data[:2]
-                 else:
-                     print '(2)Ignoring ', parts
-@@ -3431,7 +3430,16 @@
-                     except ValueError:
-                         raise IllegalServerResponse, line
-                     else:
--                        info[id] = parseNestedParens(parts[2])
-+                        data = parseNestedParens(parts[2])[0]
-+                        # This section is patched as described in http://twistedmatrix.com/trac/ticket/1105
-+                        # XXX this will fail if 'FLAGS' is a retrieved part
-+                        for i in range(len(data) -1):
-+                            if data[i] == 'FLAGS':
-+                                self.flagsChanged({id: data[i+1]})
-+                                del data[i:i+2]
-+                                break
-+                        if data:
-+                            info.setdefault(id, []).append(data)
-         return info
- 
-     def _fetch(self, messages, useUID=0, **terms):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20090413/09c64bd9/attachment.html>


More information about the calendarserver-changes mailing list