[PATCH] Make sure folder filters are always respected.
Sebastian Spaeth
Sebastian at SSpaeth.de
Sat Sep 1 01:52:34 BST 2012
Dave Abrahams <dave at boostpro.com> writes:
Hi Dave, very cool. THanks for that. And sorry for the long delay. I
agree that the patch should be split in smaller batches. WIll make
bisecting and reviewing easier. I have split them in 3 and pushed to the
next branch. Some comments below.
> * Value of sync_this is determined at Folder __init__ time so it is
> never inadvertently skipped.
Was this a problem somewhere or is it "just" a cleanup? I agree that
doing this at init time is much cleaner and nicer than sprinkling the
code throughout, so I am all for that. This went in the first patch.
> * Fix omitted check for local folder's sync_this value in
> SyncableAccount.sync()
The check was not omitted, but came later in syncfilter() when the
localfolder had been loaded. But it's better to check both at the same time.
Included
> * Add should_sync_folder() method to Repository
This is the second patch.
> * Eliminate DRY violations
Huh? DRY? dry-run or an acronym that I should be knowing? :-)
> - Factor out the code to find a local folder given a remote folder
Patch #1
> - Factor out the code that reports on skipped
> folders (sync_this_verbose)
This is the only thin not included for now. All the ui stuff is
historically in the ui classes and we call something like
ui.ignore_folder(folder) which outputs the message.
This is basically the 4. patch that I haven't got to create yet.
Do check commits:
7d1d528 No need to filter Maildir folders here
e94642b Determine folder syncing on Folder initialization
e7ca5b2 Combine checks for ignored folders in one place
in the next branch and see if they are according to your intentions.
Thanks for your contribution, nice cleanup.
Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/offlineimap-project/attachments/20120901/32d90484/attachment.sig>
More information about the OfflineIMAP-project
mailing list