On Fri, 2014-04-04 at 12:24 +0005, Khurshid Alam wrote:
> On Fri, Apr 4, 2014 at 2:22 PM, Patrick Ohly <[email protected]>
> wrote
> 
> > syncevolution --configure \ printChanges=0 \ loglevel=3 \
> > syncURL=none \ target-config@google Remember that the command line
> > is doing sanity checks when creating new configs to catch typos, so
> > we have to confirm explicitly that this new config is meant to be
> > created without a syncURL. Now we need to enable access to the
> > main-google-addressbook. It would be inactive otherwise. This is
> > useful when configuring a peer in a context which has many different
> > sources defined, but you only want the peer to have access to a
> > certain subset of them. Any "sync" value other than "none" is okay
> > here. syncevolution --configure \ sync=two-way \
> > target-config@google main-google-addressbook
> 
> Can this be done with a single command line?
> 
> 
> syncevolution --configure \
>               printChanges=0 \
>               loglevel=3 \
>               syncURL=none \
>               target-config@google main-google-addressbook

This is a valid invocation. However, it does not set any property in the
"main-google-addressbook" source. It will get created, but with all
properties unset.

More generally speaking, a "--configure" operation will touch all
configs (sync and source) that get named on the command line and ensure
that each sync resp. source property is set to one of the following (in
this order, weakest one first):
     1. The default state of the property, typically unset => populates
        new config.ini files with all currently defined properties and
        their comments.
     2. The current state of property (if the config already exists) =>
        property does not change.
     3. A value from the command line without explicit source name (e.g.
        sync=two-way) => new value.
     4. A value from the command line with explicit source name (e.g.
        main-google-addressbook/sync=two-way) => new value.

> I omitted "sync=tow-way" parameter because it can be defined when we
> pair the sources....or can it?

The "pairing" via "--configure google@default" does not set properties
in the "target-config@google". So no, the "sync=two-way" must be set
separately there.

> > The next step is to set up the actual connection between @default
> > and @google. We want to choose sources explicitly, so disable all
> > sources which might be defined in the @default context:
> > syncevolution --configure \ syncURL=local://@google \ peerIsClient=1
> > \ sync=none \ google@default Then pair the sources. We are doing
> > that for only one pair of sources here, but it could also be done
> > for more. syncevolution --configure \ sync=two-way \
> > uri=main-google-addressbook \ google@default my-vcard-source
> 
> 
> 
> So basically in first configuration, "sync=none" disables all sources
> in the @default (including my-vcard-source) & in 2nd configuration,
> it, again, enables nothing but "my-vcard-source" (via sync=two-way) &
> pairs it with main-google-addressbook. 

Correct.

> This is kind of a roundabout way to me.

You would prefer to have nothing enabled by default?

We can do that, but then the "memotoo" use case in my email no longer
works.

>  And why do we have to do everything with @default context? What if I
> configure without it:
> 
> 
> 1. syncevolution --configure \
>               syncURL=local://@google \
>               peerIsClient=1 \
>               google my-vcard-source
> 
> 
> 2. syncevolution --configure \
>               sync=two-way \
>               uri=main-google-addressbook \
>               google my-vcard-source
> 
> 
> 3. syncevolution google my-vcard-source

That's the same thing, because "google@default" = "google". I just
didn't want to use a short-hand notation in my examples because the
"@default" context is there, even if it doesn't get named explicitly.

> Here, as any other sources are not defined, they will simply remain
> inactive during the sync. Aren't they?

Correct.

> > And now sync: syncevolution --sync slow google@default syncevolution
> > google@default
> 
> Lets say I also have a second source enabled in the @default context:
> my-vcard-source2
> 
> 
> So this command: "syncevolution google@default my-vcard-source2" will
> only sync my-vcard-source2. Right?

Right. It's a feature that naming one or more sources during a sync
operation temporarily selects this/these source(s) for the sync.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.



_______________________________________________
SyncEvolution mailing list
[email protected]
https://lists.syncevolution.org/mailman/listinfo/syncevolution

Reply via email to