[PATCH v4 2/2] Re: True 1-way sync (backup)
    Nicolas Sebrecht 
    nicolas.s-dev at laposte.net
       
    Mon May  2 19:13:16 BST 2011
    
    
  
On Sun, May 01, 2011 at 08:18:29PM +0200, Sebastian Spaeth wrote:
> 
> This commit enables true 1-way syncing between repositories. This has
> often been demanded for backup purposes when you do not want to cause
> accidental modifications of your backup that would be propagated to the
> other side.
> 
> This has been implemented by allowing to configure a Repository as
> 'readonly' to forbid any modification on it.
> 
> 'readonly' applies to all the type of repositories.
> 
> Signed-off-by: Sebastian Spaeth <Sebastian at SSpaeth.de>
> ---
> The change to v3 is the improved commit message, an added space after a
> comma and changing the debug type from "imap" to "" as was requested by
> Nicolas, the changes are really minor. I can send an interpatch diff
> though.
Nice...
> diff --git a/offlineimap.conf b/offlineimap.conf
<...>
> @@ -349,12 +351,20 @@ def syncfolder(accountname, remoterepos, remotefolder, localrepos,
>                               remotefolder.getmessagecount())
>  
>          # Synchronize remote changes.
> -        ui.syncingmessages(remoterepos, remotefolder, localrepos, localfolder)
> -        remotefolder.syncmessagesto(localfolder, statusfolder)
> +        if not localrepos.getconf('readonly', False):
> +            ui.syncingmessages(remoterepos, remotefolder, localrepos, localfolder)
> +            remotefolder.syncmessagesto(localfolder, statusfolder)
> +        else:
> +            ui.debug('imap', "Not syncing to read-only repository '%s'" \
> +                         % localrepos.getname())
... but I still see one 'imap' argument, here. Is it intended?
(Just tell me, there's no need a resend).
-- 
Nicolas Sebrecht
    
    
More information about the OfflineIMAP-project
mailing list