[PATCH] Re: Implement true 1-way sync
nicolas.s-dev at laposte.net
Tue Mar 29 18:07:40 BST 2011
On Mon, Mar 28, 2011 at 06:39:09PM -0400, Sebastian Spaeth wrote:
> On Mon, 28 Mar 2011 17:45:50 +0200, Nicolas Sebrecht <nicolas.s-dev at laposte.net> wrote:
> > > +* 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?
Yes. You assume the backup to be local while users may want to backup a
local Maildir into a remote IMAP, for example. But this isn't what
sounds most wrong.
I'm not sure why to add a detailed example of use case at all since
having one side readonly makes purpose clear enough, I think. Saying
just something like
("usefull for backup, for example")
is enough. Also, the comment talk about one way type of synchronisation
(local readonly) for both local and remote type of repository section.
So, giving a use case might not be that good. It's much better to
explain the option by /what it technically does/ rather than /look at
this particular thing you could do with this feature/.
Would you like a man page of the 'cp' command saying
"when using 'cp' you make make a copy of your music file with
cp boring.mp3 for_my_stepmother.mp3
> 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
Well, this isn't exactly what stands in the commented doc. ,-)
> 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.
The v2 patch looks OK to me about that point.
> > > + 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
I agree. Looks like we need a preceding to introduce this feature before
merging this one. :-)
More information about the OfflineIMAP-project