/head: changeset 55

Fixed the deleted message caching.
This commit is contained in:
jgoerzen 2002-07-03 06:16:56 +01:00
parent 11ce82668c
commit fb055de114
5 changed files with 35 additions and 10 deletions

View File

@ -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 2002-06-24 14:08 jgoerzen
* debian/changelog: REL 1.0.3 PREP * debian/changelog: REL 1.0.3 PREP
@ -396,14 +418,9 @@
* offlineimap/repository/: Base.py, __init__.py: Added * 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 2002-06-18 13:26 jgoerzen
* offlineimap/: folder/__init__.py, mailbox/__init__.py, * offlineimap/: folder/__init__.py, repository/Base.py: Updated
repository/Base.py: Updated
2002-06-18 13:09 jgoerzen 2002-06-18 13:09 jgoerzen

View File

@ -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 <jgoerzen@complete.org> Tue, 2 Jul 2002 14:16:04 -0500
offlineimap (1.0.3) unstable; urgency=low offlineimap (1.0.3) unstable; urgency=low
* Fixed a bug when a message was deleted on the IMAP side and modified * Fixed a bug when a message was deleted on the IMAP side and modified

View File

@ -185,9 +185,9 @@ class BaseFolder:
if not uid in self.getmessagelist(): if not uid in self.getmessagelist():
deletelist.append(uid) deletelist.append(uid)
if len(deletelist): if len(deletelist):
__main__.ui.deletingmessages(uidlist, applyto) __main__.ui.deletingmessages(deletelist, applyto)
for object in applyto: for object in applyto:
object.deletemessages(uidlist) object.deletemessages(deletelist)
def syncmessagesto_flags(self, dest, applyto): def syncmessagesto_flags(self, dest, applyto):
"""Pass 4 of folder synchronization. """Pass 4 of folder synchronization.

View File

@ -112,13 +112,14 @@ class IMAPFolder(BaseFolder):
for result in r: for result in r:
resultcount += 1 resultcount += 1
flags = imaputil.flags2hash(imaputil.imapsplit(result)[1])['FLAGS'] flags = imaputil.flags2hash(imaputil.imapsplit(result)[1])['FLAGS']
uid = long(imaputil.flags2hash(imaputil.imapsplit(result)[1])['UID'])
self.messagelist[uid]['flags'] = imaputil.flagsimap2maildir(flags) self.messagelist[uid]['flags'] = imaputil.flagsimap2maildir(flags)
assert resultcount == len(uidlist), "Got incorrect number of results back" assert resultcount == len(uidlist), "Got incorrect number of results back"
def deletemessage(self, uid): def deletemessage(self, uid):
self.deletemessages([uid]) self.deletemessages([uid])
def deletemessage(self, uidlist): def deletemessages(self, uidlist):
# Weed out ones not in self.messagelist # Weed out ones not in self.messagelist
uidlist = [uid for uid in uidlist if uid in self.messagelist] uidlist = [uid for uid in uidlist if uid in self.messagelist]
if not len(uidlist): if not len(uidlist):

View File

@ -1,5 +1,5 @@
productname = 'OfflineIMAP' productname = 'OfflineIMAP'
versionstr = "1.0.2" versionstr = "1.0.4"
versionlist = versionstr.split(".") versionlist = versionstr.split(".")
major = versionlist[0] major = versionlist[0]