From bc73c11239124aa668321b45ab5d4b3a94ca8054 Mon Sep 17 00:00:00 2001 From: Sebastian Spaeth Date: Fri, 24 Feb 2012 08:31:31 +0100 Subject: [PATCH] Revert "Don't CHECK imapserver after each APPEND" This reverts commit 47390e03d6a07b2ab73b65b74b668b7ce0663f57. It is one of two potential candidates for the APPENDUID regression that John Wiegley reported. We need to examine this carefully before reintroducing this patch. Resolved Changelog.draft.rst conflict. --- Changelog.draft.rst | 2 ++ offlineimap/folder/IMAP.py | 9 ++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Changelog.draft.rst b/Changelog.draft.rst index cd252b3..61dbe35 100644 --- a/Changelog.draft.rst +++ b/Changelog.draft.rst @@ -30,6 +30,8 @@ Changes we would not propagate local folders to the remote repository. (now tested in test03) +* Revert "* Slight performance enhancement uploading mails to an IMAP + server in the common case." It might have led to instabilities. Bug Fixes --------- diff --git a/offlineimap/folder/IMAP.py b/offlineimap/folder/IMAP.py index f783d22..64770ef 100644 --- a/offlineimap/folder/IMAP.py +++ b/offlineimap/folder/IMAP.py @@ -568,6 +568,10 @@ class IMAPFolder(BaseFolder): "failed (error). Server reponded: %s\nMessage content was: " "%s" % (self, self.getrepository(), str(e), dbg_output), OfflineImapError.ERROR.MESSAGE) + # Checkpoint. Let it write out stuff, etc. Eg searches for + # just uploaded messages won't work if we don't do this. + typ, dat = imapobj.check() + assert(typ == 'OK') # get the new UID, default to 0 (=unknown) uid = 0 @@ -587,11 +591,6 @@ class IMAPFolder(BaseFolder): "'%s'" % str(resp)) else: # Don't support UIDPLUS - # Checkpoint. Let it write out stuff, etc. Eg searches for - # just uploaded messages won't work if we don't do this. - typ, dat = imapobj.check() - assert(typ == 'OK') - uid = self.savemessage_searchforheader(imapobj, headername, headervalue) # If everything failed up to here, search the message