/head: changeset 29

Updated
This commit is contained in:
jgoerzen 2002-06-21 03:31:05 +01:00
parent a38a2f0848
commit 44d35c26e0
2 changed files with 30 additions and 9 deletions

View File

@ -68,16 +68,36 @@ for accountname in accounts:
print "Done." print "Done."
for remotefolder in remoterepos.getfolders(): for remotefolder in remoterepos.getfolders():
print "*** SYNCHRONIZING FOLDER %s" % remotefolder.getname() print "*** SYNCHRONIZING FOLDER %s" % remotefolder.getname()
# Load local folder.
localfolder = localrepos.getfolder(remotefolder.getname()) localfolder = localrepos.getfolder(remotefolder.getname())
#if not localfolder.isuidvalidityok(remotefolder): if not localfolder.isuidvalidityok(remotefolder):
# print 'UID validity is a problem for this folder; skipping.' print 'UID validity is a problem for this folder; skipping.'
# continue continue
print "Reading remote message list...",
remotefolder.cachemessagelist()
print len(remotefolder.getmessagelist().keys()), "messages."
print "Reading local message list...", print "Reading local message list...",
localfolder.cachemessagelist() localfolder.cachemessagelist()
print len(localfolder.getmessagelist().keys()), "messages." print len(localfolder.getmessagelist().keys()), "messages."
print "Synchronizing remote to local..."
remotefolder.syncmessagesto(localfolder) # Load remote folder.
print "Reading remote message list...",
remotefolder.cachemessagelist()
print len(remotefolder.getmessagelist().keys()), "messages."
# Load status folder.
statusfolder = statusrepos.getfolder(remotefolder.getname())
if statusfolder.isnewfolder():
print "Local status folder is new; ignoring."
else:
print "Synchronizing local changes."
localfolder.syncmessagesto(statusfolder, [remotefolder, statusfolder])
# Synchronize remote changes.
print "Synchronizing remote to local..."
remotefolder.syncmessagesto(localfolder, [localfolder, statusfolder])
# Make sure the status folder is up-to-date.
print "Updating local status cache..."
localfolder.syncmessagesto(statusfolder)
statusfolder.save()

View File

@ -1 +1,2 @@
import Base, IMAP, Maildir import Base, IMAP, Maildir, LocalStatus