/head: changeset 29
Updated
This commit is contained in:
parent
a38a2f0848
commit
44d35c26e0
@ -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()
|
||||||
|
|
||||||
|
|
||||||
|
@ -1 +1,2 @@
|
|||||||
import Base, IMAP, Maildir
|
import Base, IMAP, Maildir, LocalStatus
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user