From fb055de11472f4f2f36765d2e2c0e1e71c9f3ded Mon Sep 17 00:00:00 2001 From: jgoerzen Date: Wed, 3 Jul 2002 06:16:56 +0100 Subject: [PATCH] /head: changeset 55 Fixed the deleted message caching. --- head/ChangeLog | 29 +++++++++++++++++++++++------ head/debian/changelog | 7 +++++++ head/offlineimap/folder/Base.py | 4 ++-- head/offlineimap/folder/IMAP.py | 3 ++- head/offlineimap/version.py | 2 +- 5 files changed, 35 insertions(+), 10 deletions(-) diff --git a/head/ChangeLog b/head/ChangeLog index b1e4287..b2e93cd 100644 --- a/head/ChangeLog +++ b/head/ChangeLog @@ -1,3 +1,25 @@ +2002-07-02 14:16 jgoerzen + + * debian/changelog, offlineimap/version.py: Preparation for 1.0.4 + +2002-07-02 14:13 jgoerzen + + * offlineimap/folder/IMAP.py: Removed debugging code + +2002-07-02 14:11 jgoerzen + + * offlineimap/folder/: Base.py, IMAP.py: Fixed the deleted message + caching. + +2002-07-02 14:05 jgoerzen + + * offlineimap/: folder/Base.py, folder/IMAP.py, ui/UIBase.py: First + stab at optimization of message deletion + +2002-06-24 14:09 jgoerzen + + * ChangeLog: REL 1.0.3 + 2002-06-24 14:08 jgoerzen * debian/changelog: REL 1.0.3 PREP @@ -396,14 +418,9 @@ * offlineimap/repository/: Base.py, __init__.py: Added -2002-06-18 13:28 jgoerzen - - * offlineimap/mailbox/__init__.py: [no log message] - 2002-06-18 13:26 jgoerzen - * offlineimap/: folder/__init__.py, mailbox/__init__.py, - repository/Base.py: Updated + * offlineimap/: folder/__init__.py, repository/Base.py: Updated 2002-06-18 13:09 jgoerzen diff --git a/head/debian/changelog b/head/debian/changelog index a41c39a..60ccc0f 100644 --- a/head/debian/changelog +++ b/head/debian/changelog @@ -1,3 +1,10 @@ +offlineimap (1.0.4) unstable; urgency=low + + * Deletion of more than one message has been optimized. This could make + deleting large numbers of messages far faster. + + -- John Goerzen Tue, 2 Jul 2002 14:16:04 -0500 + offlineimap (1.0.3) unstable; urgency=low * Fixed a bug when a message was deleted on the IMAP side and modified diff --git a/head/offlineimap/folder/Base.py b/head/offlineimap/folder/Base.py index b092fa6..c50603e 100644 --- a/head/offlineimap/folder/Base.py +++ b/head/offlineimap/folder/Base.py @@ -185,9 +185,9 @@ class BaseFolder: if not uid in self.getmessagelist(): deletelist.append(uid) if len(deletelist): - __main__.ui.deletingmessages(uidlist, applyto) + __main__.ui.deletingmessages(deletelist, applyto) for object in applyto: - object.deletemessages(uidlist) + object.deletemessages(deletelist) def syncmessagesto_flags(self, dest, applyto): """Pass 4 of folder synchronization. diff --git a/head/offlineimap/folder/IMAP.py b/head/offlineimap/folder/IMAP.py index 9b110d0..c9be210 100644 --- a/head/offlineimap/folder/IMAP.py +++ b/head/offlineimap/folder/IMAP.py @@ -112,13 +112,14 @@ class IMAPFolder(BaseFolder): for result in r: resultcount += 1 flags = imaputil.flags2hash(imaputil.imapsplit(result)[1])['FLAGS'] + uid = long(imaputil.flags2hash(imaputil.imapsplit(result)[1])['UID']) self.messagelist[uid]['flags'] = imaputil.flagsimap2maildir(flags) assert resultcount == len(uidlist), "Got incorrect number of results back" def deletemessage(self, uid): self.deletemessages([uid]) - def deletemessage(self, uidlist): + def deletemessages(self, uidlist): # Weed out ones not in self.messagelist uidlist = [uid for uid in uidlist if uid in self.messagelist] if not len(uidlist): diff --git a/head/offlineimap/version.py b/head/offlineimap/version.py index a129306..0de06b1 100644 --- a/head/offlineimap/version.py +++ b/head/offlineimap/version.py @@ -1,5 +1,5 @@ productname = 'OfflineIMAP' -versionstr = "1.0.2" +versionstr = "1.0.4" versionlist = versionstr.split(".") major = versionlist[0]