[PATCH] Re: Implement true 1-way sync
Sebastian Spaeth
Sebastian at SSpaeth.de
Mon Mar 28 23:39:09 BST 2011
On Mon, 28 Mar 2011 17:45:50 +0200, Nicolas Sebrecht <nicolas.s-dev at laposte.net> wrote:
> This ยง should be removed.
Yep, will do.
> (
> Oh, and I agree on the per-Repository configuration rather than a
> config option to the Account section even if not for the same reason.
> I'm much more sensible about the user-friendliness rather than the
> implementation POV, here.
> )
Good to know that user-friendliness and implementation-friendliness
overlap in this case :-)
> It could be for the next stable if merged before -rc2.
OK
> > +* Enable 1-way synchronization by settting a [Repository ...] to
> > + readonly = True. When using offlineimap for backup purposes you can
> > + thus make sure that no changes in your backup trickle back into the
> > + main IMAP server.
>
> Hugh? You said "either local or remote" in the commit message.
Yes, that is what you can do. Does this one say something different?
Any [Repository Foo] section can take a
readonly=True. And [Repository Foo] could be the local or remote
repository in the [Account section]. Is there a way to explain that
better?
> > +# Enable 1-way synchronization. When setting 'readonly' to True, this
> > +# repository will not be modified during a synchronization. This can be
> > +# used to backup an IMAP server when you do not want to accidentally
> > +# synchronizes changes in your local backup to the main IMAP
> > +# server.
>
> Ditto.
Excuse me? :-) I am not sure how I can improve this text.
> > Setting both involved Repositories in a synchronization is
> > +# obviously not sensible.
>
> Didn't know that. No, seriously, users rather want to know what will
> happen.
If both repositories are set to readonly, messages will not be
transferred, deleted or modified in either repository. It will
essentially be a noop. (not quite true, the Folder structure would still
be replicated from REMOTE to LOCAL, so new empty folders would be
created in the local repository nonetheless. Mmh, I wonder if we should
suppress that one too. I think we should. Will do that in v2.
Will also clarify that comment.
> Why the f**k do we need the same documentation 3 times in the same file?
> At least, make the text generic enough and refer to the same
> explanation.
That is a good question and I am not overly happy about the
duplication. But readonly= could occur in any type of repository and our
offlineimap.conf is currently the canonical description of how to
configure offlineimap containing all possibilities, I decided to add it
to all 3 [Repository ...] sections in that file. We could leave it out
of the Maildir repository and only let it remain in the IMAP and Gmail
ones where they are likely to be used.
> > + ui.debug('imap',"Not syncing to read-only repository '%s'" \
> > + % remoterepos.getname())
>
> Should really both string refer to 'imap' type?
Also good question, locale and remote repos could be Maildir,Imap,Gmail,
or UIDMapped, so we might want something different depending on the type
of repository. I believe it might be benefitial to introduce a new debug
category though, e.g. an empty one ('') where everything is logged that
is concerned with sync logic or stuff that is not clearly imap or
maildir.
Thanks for the feedback
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/20110328/3dd635de/attachment-0001.sig>
More information about the OfflineIMAP-project
mailing list