From 04f11b422e7a8d50fe362aa6b911f6d77deed049 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Mon, 28 Jul 2014 15:29:41 +0200 Subject: [PATCH] source -> datastore rename, improved terminology The word "source" implies reading, while in fact access is read/write. "datastore" avoids that misconception. Writing it in one word emphasizes that it is single entity. While renaming, also remove references to explicit --*-property parameters. The only necessary use today is "--sync-property ?" and "--datastore-property ?". --datastore-property was used instead of the short --store-property because "store" might be mistaken for the verb. It doesn't matter that it is longer because it doesn't get typed often. --source-property must remain valid for backward compatility. As many user-visible instances of "source" as possible got replaced in text strings by the newer term "datastore". Debug messages were left unchanged unless some regex happened to match it. The source code will continue to use the old variable and class names based on "source". Various documentation enhancements: Better explain what local sync is and how it involves two sync configs. "originating config" gets introduces instead of just "sync config". Better explain the relationship between contexts, sync configs, and source configs ("a sync config can use the datastore configs in the same context"). An entire section on config properties in the terminology section. "item" added (Todd Wilson correctly pointed out that it was missing). Less focus on conflict resolution, as suggested by Graham Cobb. Fix examples that became invalid when fixing the password storage/lookup mechanism for GNOME keyring in 1.4. The "command line conventions", "Synchronization beyond SyncML" and "CalDAV and CardDAV" sections were updated. It's possible that the other sections also contain slightly incorrect usage of the terminology or are simply out-dated. --- Makefile.am | 2 +- README.rst | 618 +++++++++++------- src/backends/activesync/ActiveSyncSource.h | 2 +- .../activesync/ActiveSyncSourceRegister.cpp | 2 +- src/backends/akonadi/README | 8 +- src/backends/sqlite/README | 2 +- src/backends/webdav/WebDAVSource.cpp | 6 +- src/dbus/server/connection.cpp | 6 +- src/dbus/server/read-operations.cpp | 8 +- src/syncevo/Cmdline.cpp | 72 +- src/syncevo/LocalTransportAgent.cpp | 6 +- src/syncevo/SyncConfig.cpp | 36 +- src/syncevo/SyncContext.cpp | 24 +- src/syncevo/SyncSource.cpp | 6 +- test/test-dbus.py | 94 +-- 15 files changed, 537 insertions(+), 355 deletions(-) diff --git a/Makefile.am b/Makefile.am index 9ade4e21..b2848cbf 100644 --- a/Makefile.am +++ b/Makefile.am @@ -379,7 +379,7 @@ README.patched.rst: README.rst src/syncevolution -e 's/^:Version: .*/:Version: $(VERSION)/;' \ -e 's/:Date: .*/":Date: " . `date +%Y-%m-%d`/e;' \ -e 'if (s;(<< see "syncevolution --sync-property ." >>\n);run("src/syncevolution --daemon=no --sync-property ?") || $$1;e) { $$syncfound=1; }' \ - -e 'if (s;(<< see "syncevolution --source-property ." >>\n);run("src/syncevolution --daemon=no --source-property ?") || $$1;e) { $$sourcefound=1; }' \ + -e 'if (s;(<< see "syncevolution --datastore-property ." >>\n);run("src/syncevolution --daemon=no --source-property ?") || $$1;e) { $$sourcefound=1; }' \ -e 'print;' \ -e '}' \ -e 'die "<> tag not in README.rst?!" unless $$syncfound;' \ diff --git a/README.rst b/README.rst index abd18a98..6160792b 100644 --- a/README.rst +++ b/README.rst @@ -14,13 +14,13 @@ SYNOPSIS ======== List and manipulate databases: - syncevolution --print-databases|--create-database|--remove-database [] [ ] + syncevolution --print-databases|--create-database|--remove-database [] [ ] Show information about configuration(s): syncevolution --print-servers|--print-configs|--print-peers Show information about a specific configuration: - syncevolution --print-config [--quiet] [--] [main| ...] + syncevolution --print-config [--quiet] [--] [main| ...] List sessions: syncevolution --print-sessions [--quiet] [--] @@ -29,39 +29,39 @@ Show information about SyncEvolution: syncevolution --help|-h|--version Run a synchronization as configured: - syncevolution [ ...] + syncevolution [ ...] Run a synchronization with properties changed just for this run: - syncevolution --run [--] [ ...] + syncevolution --run [--] [ ...] Restore data from the automatic backups: - syncevolution --restore --before|--after [--dry-run] [--] ... + syncevolution --restore --before|--after [--dry-run] [--] ... Create, update or remove a configuration: - syncevolution --configure [--] [ ...] + syncevolution --configure [--] [ ...] syncevolution --remove|--migrate [--] List items: - syncevolution --print-items [--] [ []] + syncevolution --print-items [--] [ []] Export item(s): - syncevolution [--delimiter ] --export ||- [--] [ [ [ ...]]] + syncevolution [--delimiter ] --export ||- [--] [ [ [ ...]]] --luids ... Add item(s): - syncevolution [--delimiter |none] --import ||- [--] [ []] + syncevolution [--delimiter |none] --import ||- [--] [ []] --luids ... Update item(s): - syncevolution --update [--] + syncevolution --update [--] - syncevolution [--delimiter |none] --update |- [--] ... + syncevolution [--delimiter |none] --update |- [--] ... --luids ... Remove item(s): - syncevolution --delete-items [--] ( ... | '*') + syncevolution --delete-items [--] ( ... | '*') DESCRIPTION @@ -95,85 +95,141 @@ peer host The device or computer that SyncEvolution runs on. +item + The smallest unit of synchronization. Examples of items include + calendar events and individual contacts, memos, or tasks. + database Each peer has one or more databases that get synchronized (Google Calendar, Google Contacts). Conceptually a database is a set of items where each item is independent of the others. -data source - A name for something that provides access to data. Primarily used for - the configuration which combines backend and database settings, sometimes - also instead of these two terms. - -local/remote - Synchronization always happens between a pair of databases and thus - has two sides. One database or side of a sync is remote (the one - of the peer) or local (SyncEvolution). For the sake of consistency (and - lack of better terms), these terms are used even if the peer is another - instance of SyncEvolution and/or all data resides on the same storage. - -sync config - A sync configuration defines how to access a peer: the protocol - which is to be used, how to find the peer, credentials, etc. Peers - might support more than one protocol, in which case multiple - sync configs have to be created. - - Sync configs can be used to initiate a sync (like contacting a - SyncML server) or to handle an incoming sync request (when acting - as SyncML server which is contacted by the peer). - -source config - Each data source corresponds to a local database. A source config - defines how to access that database, like a sync config does for - peers. This information about a local database is independent - of the peers that the database might be synchronized with. - - Sync configs use these shared source configs and add additional, - per-peer settings to each of them that define how that local - database maps to a remote database in the peer. By default a source - config is inactive inside a sync config and thus ignored. It must be - activated by setting the unshared `sync` property to something other - than `none` (aka `disabled`). - - In SyncEvolution's predefined configuration templates, the following - names for sources are used. Different names can be chosen for sources - that are defined manually. - - * addressbook: a list of contacts - * calendar: calendar *events* - * memo: plain text notes - * todo: task list - * calendar+todo: a virtual source combining one local "calendar" and - one "todo" source (required for synchronizing with some phones) - backend Access to databases is provided by SyncEvolution backends. It does not matter where that data is stored. Some backends provide access to data outside of the host itself (`CalDAV and CardDAV`_, ActiveSync). -configuration property - Sync and source configs contain configuration properties. Each - property is a name/value pair. Sync properties are used in sync configs, - source properties in source configs. The names were chosen so that - they are unique, i.e., no sync property has the same name as a source - property. +datastore (or just "store") + Used for the combination of SyncEvolution backend and database settings. + A datastore provides read/write access to a database, which is a prerequisite + for syncing the database. The datastore is independent of the peers that + the database might be synchronized with. - A property can be *unshared* (has separate values for each peer, therefore - sometimes also called *per-peer*; for example the `uri` property which - defines the remote database), *shared* (same value for all peers; for - example the `database` property for selecting the local database) or - *global* (exactly one value). + This used to be called "data source" or just "source", which is a + term still found in older documentation, some file paths and the + source code of SyncEvolution. + +local/remote + Synchronization always happens between a pair of databases and thus + has two sides. One database or side of a sync is remote (the one + of the peer), the other is local (SyncEvolution). For the sake of consistency (and + lack of better terms), these terms are used even if the peer is another + instance of SyncEvolution and/or all data resides on the same storage. + +sync config + A sync configuration defines how to talk with a peer: the protocol + which is to be used, how to find the peer, credentials, etc. + + Sync configs can be used to initiate a sync (like contacting a + SyncML server) or to handle an incoming sync request (when acting + as SyncML server which is contacted by the peer). + + If the peer supports SyncML as sync protocol, a sync only uses one + sync config on the SyncEvolution side. If the peer supports data + access via some other protocols, then SyncEvolution can make that + data available via SyncML and run a sync where SyncML is used + internally. Such a sync involves two sync configs, see ``originating + config`` and ``target config``. + + A sync config can use all datastores defined in the same context + (see below). Some properties of the datastore can be set differently + for each peer and thus sync config (``per-peer``). One of these, the + ``sync`` property, defines if and how a datastore is used during a + sync. context - Sync and source configs are defined inside a configuration context. - Typically each context represents a certain set of sources. The values - of shared properties are only shared inside their context. That way - it is possible to define a second `work` context with a `work calendar` - source using one database and use the implicit `default` context for - a private `calendar` source with a different database. + Sync and datastore configs are defined inside one or more configuration + contexts. There is always a ``@default`` context that gets used if nothing + else is specified. -context config - The shared and global properties of a certain context. + Typically each context represents a certain set of related + datastores. For example, normally the ``@default`` context is used for + local databases. Datastores related to a certain peer can + be defined in a context ``@peer-name`` named after that peer. + +configuration properties + SyncEvolution uses key/value pairs to store configuration options. + A configuration is a set of unique keys and their values that together + describe a certain object. + + These sets of properties are addressed via the main config name (a + sync config name with or without an explicit context, or just the + context name) and optionally the datastore name (if the properties + are for a specific datastore). + + Sync properties are set for sync configs, independently of a + particular datastore. Properties that cannot be set without + specifying they datastore that they apply to are datastore + properties. This includes properties that belong both to a datastore + and a sync config. + + The property names were chosen so that they are unique, i.e., no + sync property has the same name as a datastore property. For historic + reasons, internally these properties are treated as two different + sets and there are two different command line options to query the + list of sync resp. datastore properties. + + Some configuration properties are shared between configurations + automatically. This sharing is hard-coded and cannot be configured. + It has the advantage that certain settings only need to be set + once and/or can be changed for several different configs + at once. + + A property can be *unshared* (has separate values for each peer, therefore + sometimes also called *per-peer*; for example the ``sync`` property), + *shared* (same value for all peers; for + example the ``database`` property for selecting the local database) or + *global* (exactly one value). + + Together with the distinction between sync and datastore properties, + this currently results in five different groups of properties: + + * Sync properties (by definition, this also includes properties + independent of a particular sync config because they are set for + all sync configs at once, independently of any particular + datastore): + + * global (= ``~/.config/syncevolution/config.ini``): + independent of a particular context, for example ``keyring`` + * shared (= ``~/.config/syncevolution//config.ini``): + set once for each context, for example ``logdir`` + * unshared (= ``~/.config/syncevolution//peers//config.ini``): + set separately for each sync config, for example ``syncURL`` + + * Datastore properties: + + * shared (= ``~/.config/syncevolution//sources//config.ini``): + the properties required for access to the data, primarily ``backend`` and ``database`` + * unshared (= ``~/.config/syncevolution//peers//sources//config.ini``): + the already mentioned ``sync`` and ``uri`` properties, but also a per-peer + sync format properties + + Many properties have reasonable defaults, either defined in the + configuration layer or chosen at runtime by the SyncEvolution + engine reading the configuration, and therefore do not have to + be set. + + The configuration layer in SyncEvolution has a very limited + understanding of the semantic of each property. It just knows about + some generic types (strings, boolean, integers, ...) and where + properties are supposed to be stored. It is the layer above that, + the one which actually tries to use the configuration, that + determines whether the property values make sense as + specified. Beware that it is possible to set properties to values + that conflict with other property values (triggering errors when + using the configuration) or to set properties that are not used + (typically they get ignored silently, unless an explicit error check + was implemented). configuration template Templates define the settings for specific peers. Some templates @@ -189,57 +245,75 @@ configuration template add sync configs for different peers to that context without reseting the existing settings. + In SyncEvolution's predefined configuration templates, the following + names for datastores are used. Different names can be chosen for datastores + that are defined manually. + + * addressbook: a list of contacts + * calendar: calendar *events* + * memo: plain text notes + * todo: task list + * calendar+todo: a virtual datastore combining one local "calendar" and + one "todo" datastore (required for synchronizing with some phones) + local sync Traditionally, a sync config specifies SyncML as the synchronization - protocol. The peer must support SyncML for this to work. When the - peer acts as SyncML server, conflict resolution happens on the - peer, outside of the control of SyncEvolution. + protocol via the `syncURL` property. The peer must support SyncML for + this to work. - In a so called `local sync`_, SyncEvolution connects two of its own - backends and runs all of the synchronization logic itself on the host. + In a so called local sync, SyncEvolution acts as SyncML server + and client at the same time, connecting the two sides via internal + message passing. Both sides have their own set of datastores, which may + use CalDAV, CardDAV or ActiveSync to access the data. + + See `Synchronization beyond SyncML`_. + +originating config + In a local sync, the sync config used to start the sync is called + the originating sync config, or just originating config. target config - In addition to the normal sync config, a local sync also uses a target - config. This target config is a special kind of sync config. It defines - sync properties that are necessary to access databases on the other - side of the local sync. Sync configs can have arbitrary names while - a target config must be named `target-config`. + In addition to the originating config, a local sync also uses a target + config. At the configuration level, this target config is just another + sync config. It becomes a target config when referenced by a sync config + for local syncing. COMMAND LINE CONVENTIONS ======================== -The ```` and the ```` strings in the command line synopsis are -used to find the sync resp. source configs. Depending on which +The ```` and the ```` strings in the command line synopsis are +used to find the sync resp. datastore configs. Depending on which other parameters are given, different operations are executed. -A config name has the format ``[][@]``. When the context -is not specified explicitly, SyncEvolution first searches for an -existing configuration with the given name. If not found, it uses the -``@default`` context as fallback. Thus the empty config name is an alias -for ``@default``. +The ```` string has the format ``[][@]``. When +the context is not specified explicitly, SyncEvolution first searches +for an existing sync configuration with the given ```` name. If +not found, the configuration can only be created, but not read. It +will be created in the ``@default`` context as fallback. The empty +```` string is an alias for ``@default``. The ```` part identifies a specific sync or target config inside the context. It is optional and does not have to be specified when not -needed, for example when configuring the shared settings of sources +needed, for example when configuring the shared settings of datastores (``--configure @default addressbook``) or accessing items inside a -source (``--print-items @work calendar``). +datastore (``--print-items @work calendar``). -Listing sources on the command line limits the operation to those -sources (called *active sources* below). If not given, all sources -defined for the config are active. Some operations require -the name of exactly one source. +Listing datastores on the command line limits the operation to those +datastores (called *active datastores* below). If not given, all datastores +enabled for the config are active. Some operations require +the name of exactly one datastore. Properties are set with key/value assignments and/or the -``--sync/source-property`` keywords. Those keywords are only needed for -the hypothetical situation that a sync and source property share the -same name (not normally the case). Without them, SyncEvolution +``--sync/store-property`` keywords. Those keywords are only needed for +the hypothetical situation that a sync and datastore property share the +same name (which was intentionally avoided). Without them, SyncEvolution automatically identifies which kind of property is meant based on the name. A ```` assignment has the following format:: - [/][@|@@]= + [/][@|@@]= The optional ```` or ``@`` suffix limits the scope of the value to that particular configuration. This is useful when @@ -262,8 +336,8 @@ overrides ``@``, which overrides `no suffix given`. Specifying some suffix which does not apply to the current operation does not trigger an error, so beware of typos. -Source properties can be specified with a ``/`` prefix. This -allows limiting the value to the selected source. For example:: +Datastore properties can be specified with a ``/`` prefix. This +allows limiting the value to the selected datastore. For example:: --configure "addressbook/database=My Addressbook" \ "calendar/database=My Calendar" \ @@ -273,15 +347,15 @@ Another way to achieve the same effect is to run the ``--configure`` operation twice, once for ``addressbook`` and once for ``calendar``:: --configure "database=My Addressbook" @default addressbook - --configure "calendar/database=My Calendar" @default calendar + --configure "database=My Calendar" @default calendar -If the same property is set both with and without a ``/`` prefix, -then the more specific value with that prefix is used for that source, +If the same property is set both with and without a ``/`` prefix, +then the more specific value with that prefix is used for that datastore, regardless of the order on the command line. The following command -enables all sources except for the addressbook:: +enables all datastores except for the addressbook:: - --configure --source-property addressbook/sync=none \ - --source-property sync=two-way \ + --configure addressbook/sync=none \ + sync=two-way \ @@ -290,7 +364,7 @@ USAGE :: - syncevolution --print-databases [] [ ] + syncevolution --print-databases [] [ ] If no additional arguments are given, then SyncEvolution will list all available backends and the databases that can be accessed through each @@ -300,29 +374,29 @@ information (like credentials or URL of a remote server). This additional information can be provided on the command line with property assignments (``username=...``) or in an existing configuration. -When listing all databases of all active sources, the output starts +When listing all databases of all active datastores, the output starts with a heading that lists the values for the ``backend`` property which select the backend, followed by the databases. Each database has a name and a unique ID (in brackets). Typically both can be used as value of the 'database' property. One database might be marked as ``default``. It will be used when ``database`` is not set explicitly. -When selecting an existing source configuration or specifying the ``backend`` +When selecting an existing datastore configuration or specifying the ``backend`` property on the command line, only the databases for that backend are listed and the initial line shows how that backend was selected -(/ resp. backend value). +(/ resp. backend value). Some backends do not support listing of databases. For example, the file backend synchronizes directories with one file per item and always needs an explicit ``database`` property because it cannot guess which directory it is meant to use. :: - syncevolution --create-database [] [ ] + syncevolution --create-database [] [ ] Creates a new database for the selected ``backend``, using the information given in the ``database`` property. As with ``--print-databases``, it is possible to give the properties directly -without configuring a source first. +without configuring a datastore first. The interpretation of the ``database`` property depends on the backend. Not all backends support this operation. @@ -330,24 +404,24 @@ backend. Not all backends support this operation. The EDS backend uses the value of the ``database`` as name of the new database and assigns a unique URI automatically. :: - syncevolution --remove-database [] [ ] + syncevolution --remove-database [] [ ] Looks up the database based on the ``database`` property (depending on the backend, both name and a URI are valid), then deletes the data. -Note that source configurations using the database are not removed. :: +Note that datastore configurations using the database are not removed. :: syncevolution -Without the optional list of sources, all sources which are enabled in +Without the optional list of datastores, all datastores which are enabled in their configuration file are synchronized. :: - syncevolution ... + syncevolution ... Otherwise only the ones mentioned on the command line are active. It -is possible to configure sources without activating their -synchronization: if the synchronization mode of a source is set to -`disabled`, the source will be ignored. Explicitly listing such a -source will synchronize it in `two-way` mode once. +is possible to configure datastores without activating their +synchronization: if the synchronization mode of a datastore is set to +`disabled`, the datastore will be ignored. Explicitly listing such a +datastore will synchronize it in `two-way` mode once. Progress and error messages are written into a log file that is preserved for each synchronization run. Details about that is found in @@ -378,25 +452,29 @@ associated with this is that the server might not recognize items that it already has stored previously which then would lead to duplication of items. :: - syncevolution --configure [ ...] + syncevolution --configure [ ...] Options in the configuration can be modified via the command -line. Source properties are changed for all sources unless sources are -listed explicitly. Some source properties have to be different for -each source, in which case syncevolution must be called multiple times -with one source listed in each invocation. :: +line. The and the optional parameters define +what gets created or modified. The remaining parameters define +which values get set or modified. + +To change settings of specific datastores, either invoke syncevolution +multiple times with exactly one parameter or use the +``[/]`` prefix described above for property assignments. :: syncevolution --remove Deletes the configuration. If the refers to a specific peer, only that peer's configuration is removed. If it refers to -a context, that context and all peers inside it are removed. +a context, that context and all peers and datastores defined inside +it are removed. Note that there is no confirmation question. Neither local data referenced by the configuration nor the content of log dirs are deleted. :: - syncevolution --run [ ...] + syncevolution --run [ ...] Options can also be overridden for just the current run, without changing the configuration. In order to prevent accidentally running a @@ -404,35 +482,35 @@ sync session when a configuration change was intended, either --configure or --run must be given explicitly if options are specified on the command line. :: - syncevolution --status [ ...] + syncevolution --status [ ...] Prints what changes were made locally since the last synchronization. Depends on access to database dumps from the last run, so enabling the ``logdir`` property is recommended. :: syncevolution --print-servers|--print-configs|--print-peers - syncevolution --print-config [--quiet] [main| ...] + syncevolution --print-config [--quiet] [main| ...] syncevolution --print-sessions [--quiet] These commands print information about existing configurations. When printing a configuration a short version without comments can be -selected with --quiet. When sources are listed, only their -configuration is shown. `Main` instead or in combination with sources +selected with --quiet. When datastores are listed, only their +configuration is shown. `Main` instead or in combination with datastores lists only the main peer configuration. :: syncevolution --restore --before|--after - [--dry-run] ... + [--dry-run] ... This restores local data from the backups made before or after a synchronization session. The --print-sessions command can be used to -find these backups. The source(s) have to be listed explicitly. There +find these backups. The datastore(s) have to be listed explicitly. There is intentionally no default, because as with --remove there is no confirmation question. With --dry-run, the restore is only simulated. The session directory has to be specified explicitly with its path name (absolute or relative to current directory). It does not have to be one of the currently active log directories, as long as it contains -the right database dumps for the selected sources. +the right database dumps for the selected datastores. A restore tries to minimize the number of item changes (see section `Item Changes and Data Changes`_). This means that items that are @@ -441,24 +519,24 @@ the peer during the next synchronization. If the peer somehow needs to get a clean copy of all local items, then use ``--sync refresh-from-local`` in the next run. :: - syncevolution --print-items - syncevolution [--delimiter ] --export ||- [ [ [ ...]]] - syncevolution [--delimiter |none] --import ||- [ ] - syncevolution --update - syncevolution [--delimiter |none] --update |- ... - syncevolution --delete-items ( ... | *) + syncevolution --print-items + syncevolution [--delimiter ] --export ||- [ [ [ ...]]] + syncevolution [--delimiter |none] --import ||- [ ] + syncevolution --update + syncevolution [--delimiter |none] --update |- ... + syncevolution --delete-items ( ... | *) Restore depends on the specific format of the automatic backups created by SyncEvolution. Arbitrary access to item data is provided with additional options. here is the unique local identifier -assigned to each item in the source, transformed so that it contains +assigned to each item in the datastore, transformed so that it contains only alphanumeric characters, dash and underscore. A star * in --delete-items selects all items for deletion. There are two ways of specifying luids: either as additional parameters after the -config and source parameters (which may be empty in this case, but +config and datastore parameters (which may be empty in this case, but must be given) or after the ``--luids`` keyword. - and may be given to define the database which is to + and may be given to define the database which is to be used. If not given or not refering to an existing configuration (which is not an error, due to historic reasons), the desired backend must be given via the ``backend`` property, like this:: @@ -479,7 +557,7 @@ question mark can be used to get the corresponding help text and/or a list of valid values. --sync|-s |? - Temporarily synchronize the active sources in that mode. Useful + Temporarily synchronize the active datastores in that mode. Useful for a `refresh-from-local` or `refresh-from-remote` sync which clears all data at one end and copies all items from the other. @@ -494,12 +572,12 @@ a list of valid values. --print-servers|--print-configs|--print-peers|-p Prints the complete configuration for the selected to stdout, including up-to-date comments for all properties. The - format is the normal .ini format with source configurations in - different sections introduced with [] lines. Can be combined - with --sync-property and --source-property to modify the configuration - on-the-fly. When one or more sources are listed after the - name on the command line, then only the configs of those sources are - printed. `main` selects the main configuration instead of source + format is the normal .ini format with datastore configurations in + different sections introduced with [] lines. Can be combined + with --sync-property and --datastore-property to modify the configuration + on-the-fly. When one or more datastores are listed after the + name on the command line, then only the configs of those datastores are + printed. `main` selects the main configuration instead of datastore configurations. Using --quiet suppresses the comments for each property. When setting a --template, then the reference configuration for that peer is printed instead of an existing configuration. @@ -512,36 +590,36 @@ a list of valid values. --quiet, only the paths are listed. --configure|-c - Modify the configuration files for the selected peer and/or sources. + Modify the configuration files for the selected peer and/or datastores. If no such configuration exists, then a new one is created using one of the template configurations (see --template option). Choosing a template sets most of the relevant properties for the peer and the - default set of sources (see above for a list of those). Anything + default set of datastores (see above for a list of those). Anything specific to the user (like username/password) still has to be set manually. - When creating a new configuration and listing sources explicitly on the - command line, only those sources will be set to active in the new + When creating a new configuration and listing datastores explicitly on the + command line, only those datastores will be set to active in the new configuration, i.e. `syncevolution -c memotoo addressbook` followed by `syncevolution memotoo` will only synchronize the - address book. The other sources are created in a disabled state. - When modifying an existing configuration and sources are specified, - then the source properties of only those sources are modified. + address book. The other datastores are created in a disabled state. + When modifying an existing configuration and datastores are specified, + then the datastore properties of only those datastores are modified. - By default, creating a config requires a template. Source names on the + By default, creating a config requires a template. Datastore names on the command line must match those in the template. This allows catching - typos in the peer and source names. But it also prevents some advanced + typos in the peer and datastore names. But it also prevents some advanced use cases. Therefore it is possible to disable these checks in two ways:: - use `--template none` or - - specify all required sync and source properties that are normally + - specify all required sync and datastore properties that are normally in the templates on the command line (syncURL, backend, ...) --run|-r To prevent accidental sync runs when a configuration change was intended, but the `--configure` option was not used, `--run` must be - specified explicitly when sync or source properties are selected + specified explicitly when sync or datastore properties are selected on the command line and they are meant to be used during a sync session triggered by the invocation. @@ -568,7 +646,7 @@ a list of valid values. stores. \--export - Writes all items in the source or all items whose is + Writes all items in the datastore or all items whose is given into a directory if the --export parameter exists and is a directory. The of each item is used as file name. Otherwise it creates a new file under that name and writes the selected items @@ -587,7 +665,7 @@ a list of valid values. \--import Adds all items found in the directory or input file to the - source. When reading from a directory, each file is treated as one + datastore. When reading from a directory, each file is treated as one item. Otherwise the input is split at the chosen delimiter. "none" as delimiter disables splitting of the input. @@ -598,7 +676,7 @@ a list of valid values. must match with the number of items in the input. \--delete-items - Removes the specified items from the source. Most backends print + Removes the specified items from the datastore. Most backends print some progress information about this, but besides that, no further output is produced. Trying to remove an item which does not exist typically leads to an ERROR message, but is not reflected in a @@ -608,14 +686,14 @@ a list of valid values. or in addition to listing individual luids to delete all items. --sync-property|-y =|=?|? - Overrides a source-independent configuration property for the + Overrides a datastore-independent configuration property for the current synchronization run or permanently when --configure is used to update the configuration. Can be used multiple times. Specifying an unused property will trigger an error message. ---source-property|-z =|=?|? +--datastore-property|--source-property|-z =|=?|? Same as --sync-property, but applies to the configuration of all active - sources. `--sync ` is a shortcut for `--source-property sync=`. + datastores. `--sync ` is a shortcut for `--datastore-property sync=`. --template|-l |default|? Can be used to select from one of the built-in default configurations @@ -675,7 +753,7 @@ CONFIGURATION PROPERTIES This section lists predefined properties. Backends can add their own properties at runtime if none of the predefined properties are suitable for a certain setting. Those additional properties are not -listed here. Use ``--sync/source-property ?`` to get an up-to-date +listed here. Use ``--sync/datastore-property ?`` to get an up-to-date list. The predefined properties may also be interpreted slightly differently @@ -692,9 +770,9 @@ Sync properties --------------- << see "syncevolution --sync-property ?" >> -Source properties ------------------ -<< see "syncevolution --source-property ?" >> +Datastore properties +-------------------- +<< see "syncevolution --datastore-property ?" >> EXAMPLES @@ -724,11 +802,11 @@ Review configuration:: syncevolution --print-config memotoo -Synchronize all sources:: +Synchronize all datastores:: syncevolution memotoo -Deactivate all sources:: +Deactivate all datastores:: syncevolution --configure \ sync=none \ @@ -766,7 +844,7 @@ clients, see `Exchanging Data`_:: memotoo@other syncevolution --configure \ - --source-property database= \ + database= \ @other addressbook syncevolution --configure \ @@ -793,8 +871,8 @@ servers via the SyncML protocol. Starting with release 1.2, SyncEvolution also supports other protocols like CalDAV and CardDAV. -These protocols are implemented in backends which look like data -sources. SyncEvolution then synchronizes data between a pair of +These protocols are implemented in backends which behave like local +datastores. SyncEvolution then synchronizes data between a pair of backends. Because the entire sync logic (matching of items, merging) is done locally by SyncEvolution, this mode of operation is called *local sync*. @@ -805,29 +883,62 @@ Some examples of things that can be done with local sync: * mirror a local database as items in a directory, with format conversion and one-way or two-way data transfer (export vs. true syncing) -Because local sync involves two sides, two configurations are -needed. One is called the *target config*. By convention it must be -called ``target-config@``, for example -``target-config@google-calendar``. The target config holds properties -which apply to all sources inside that context, like user name, -password and URL for the server. Once configured, the target config -can be used to list/import/export/update items via the SyncEvolution -command line. It cannot be used for synchronization because it does -not defined what the items are supposed to be synchronized with. +Because local sync involves two sides, two sync configurations are +needed. One is called the *target config*. Traditionally, this really +was a configuration called ``target-config``, for example +``target-config@google``. Using this particular name is no longer required. -For synchronization, a second *sync config* is needed. This config has -the same role as the traditional SyncML configs and is typically +The target config can hold properties which apply to all datastores +inside its context, like user name, password and URL for the server +(more on that below) and sync settings (like logging and data +backups). Once configured, the target config can be used to +list/import/export/update items via the SyncEvolution command line. It +cannot be used for synchronization because it does not defined what +the items are supposed to be synchronized with. + +For synchronization, a second *originating config* is needed. This config has +the same role as the traditional SyncML sync configs and is typically defined in the same implicit ``@default`` context as those -configs. All configs in that context use the same local data. The sync -config defines the database pairs and the sync mode (one-way, two-way, ...). +configs. All configs in that context use the same local data, thus turning +that local data into the hub through with data flows to all peers that the +host is configured to sync with. -The first step is to select a target config with -``syncURL=local://@``. Multiple sync configs can -access the same target config. In the second step, the ``uri`` of each -source in the sync config must be set to the name of the corresponding -source in the target config. The ``sync`` property in the sync config -defines the direction of the data flow. It can be set temporarily when -starting a synchronzation with the sync config. +A sync config becomes an originating config in a local sync by setting +the ``syncURL`` to the special URL ``local://[][@]``. This selects the target config to +sync with. If the target config name is left out, the actual string +``target-config`` is used as name. The context can be omitted if the +target config name is unique. Originating and target config can be in +the same context. Care must be taken to not use a datastore more than +once in a local sync. + +In addition, ``peerIsClient=1`` must be set in the originating config, +because SyncEvolution only supports running the SyncML client on the +target side. It makes sense to use the local databases on +originating side, because that side requires more frequent access to +the data. + +The originating config defines the database pairs, either implicitly +(by using the same datastore names on both sides, which is possible when +different contexts are used) or explicitly (via the `uri` properties +set for the datastores on the originating side). The originating config +also defines the ``sync`` mode for each pair. ``uri`` and ``sync`` +values on the target side are ignored and do not have to be specified. + +As a special case, datastores used in combination with the target config +may access the credentials and ``syncURL`` stored there as fallback when +nothing was specified for the datastores directly. This makes sense for +the WebDAV and ActiveSync backends where the credentials are typically +the same and (depending on the web server) the same start URL can be +used to find calendar and contact databases. + + **Warning:** when setting password for the target config and using a + keyring, a ``syncURL`` or a unique ``remoteDeviceID`` string must be + set, because they are needed to identify the host in the keyring. + +If this feature is not used, the ``syncURL`` could be left empty because +local sync itself does not use it. However, the command line expects +it to be set to ``none`` explicitly to detect typos. **Warning:** because the client in the local sync starts the sync, ``preventSlowSync=0`` must be set in the target config to have an effect. @@ -848,14 +959,14 @@ CardDAV services (using DNS SRV entries, ``.well-known`` URIs, properties of the current principal, ...). Alternatively, credentials can also be set in the ``databaseUser`` and -``databasePassword`` properties of the source. The downside is that these -values have to be set for each source and cannot be shared. The advantage -is that, in combination with setting ``database``, such sources can be +``databasePassword`` properties of the datastore. The downside is that these +values have to be set for each datastore and cannot be shared. The advantage +is that, in combination with setting ``database``, such datastores can be used as part of a normal SyncML server or client sync config. SyncEvolution then reads and writes data directly from the server and exchanges it via SyncML with the peer that is defined in the sync config. -The ``database`` property of each source can be set to the URL of a +The ``database`` property of each datastore can be set to the URL of a specific *collection* (= database in WebDAV terminology). If not set, then the WebDAV backend first locates the server based on ``username`` or ``syncURL`` and then scans it for the default event resp. contact @@ -876,22 +987,22 @@ To scan for collections, use:: backend= \ username= \ "password=!@#ABcd1234" \ - syncURL= + syncURL= -Configuration templates for Google Calendar, Yahoo Calendar and a +Configuration templates for Google Calendar/Contacts, Yahoo Calendar and a generic CalDAV/CardDAV server are included in SyncEvolution. The Yahoo template also contains an entry for contact synchronization, but using it is not recommended due to known server-side issues. The following commands set up synchronization with a generic WebDAV -server that supports CalDAV, CardDAV and auto-discovery. For Google and Yahoo, -replace ``webdav`` with ``google-calendar`` resp. ``yahoo`` and remove the -``addressbook`` source when setting up the sync config. :: +server that supports CalDAV, CardDAV and scanning starting at the +root of the server. :: # configure target config syncevolution --configure \ --template webdav \ - username=123456@example.com \ + syncURL=http://example.com \ + username=123456 \ "password=!@#ABcd1234" \ target-config@webdav @@ -912,20 +1023,21 @@ replace ``webdav`` with ``google-calendar`` resp. ``yahoo`` and remove the Here are some alternative ways of configuring the target config:: - # A) Server has one URL as starting point instead of DNS auto-discovery. + # A) Server supports DNS auto-discovery via domain name in the username. syncevolution --configure \ --template webdav \ - username=123456 \ + username=123456@example.com \ "password=!@#ABcd1234" \ - syncURL=http://example.com \ target-config@webdav # B) Explicitly specify collections (from server documentation or --print-databases). # The 'calendar' and 'addressbook' names are the ones expected by the sync config - # above, additional sources can also be configured and/or the names can be changed. + # above, additional datastores can also be configured and/or the names can be changed. syncevolution --configure \ username=123456 \ "password=!@#ABcd1234" \ + --template none \ + syncURL=http://example.com \ addressbook/backend=carddav \ addressbook/database=http://example.com/addressbooks/123456/ \ calendar/backend=caldav \ @@ -933,10 +1045,15 @@ Here are some alternative ways of configuring the target config:: target-config@webdav \ calendar addressbook +When creating these target configs, the command line tool tries to +verify that the datastores really work and (in the case of --template +webdav) will enable only datastores which really work. This involves +contacting the WebDAV server. + Finally, here is how the ``@webdav`` context needs to be configured so that SyncML clients or servers can be added to it:: - # configure sources + # configure datastores syncevolution --configure \ databaseUser=123456 \ "databasePassword=!@#ABcd1234" \ @@ -957,6 +1074,69 @@ clients or servers can be added to it:: syncevolution --sync slow memotoo@webdav +Google + OAuth +-------------- + +For Google there is no common start URL for CalDAV and CardDAV, +therefore the "Google" template lists all that may be relevant and the +setup is very similar to the generic ``webdav`` case, except that the +syncURL does not have to be specified:: + + # configure target config + syncevolution --configure \ + --template google \ + username=john.doe@gmail.com \ + "password=!@#ABcd1234" \ + target-config@google + + # configure sync config + syncevolution --configure \ + --template SyncEvolution_Client \ + syncURL=local://@google \ + username= \ + password= \ + google \ + calendar addressbook + + # initial slow sync + syncevolution --sync slow google + + # incremental sync + syncevolution google + +If your Google account is configured to use two-factor login, then you +need to create an application specific password for SyncEvolution. See +https://support.google.com/mail/answer/1173270 + +Google already announced that they will turn off support for logging +into their CalDAV/CardDAV services with plain username/password +credentials. SyncEvolution supports the new login method, OAuth, but +it depends on additional components to implement OAuth: GNOME Online +Accounts, Ubuntu Online Accounts, or gSSO. + +Support for GNOME Online Accounts (GOA) is compiled into +syncevolution.org binaries and therefore documented here. For +instructions regarding binaries shipped by distributions please +consult the documentation provided by the distribution or search the +web. + +For Google Calendar, GOA >= 3.8 is required. For Google Contacts, GOA +3.8 may work if it was patched by the distribution (as done in Debian +Jessie), otherwise a version >= 3.10 is required. + +Use the GNOME Control Center to create an account for Google. It is +not necessary to enable any of the data categories. That would turn on +access in other GNOME apps (for example, Evolution), whereas +SyncEvolution's use of the account is configured separately via the +SyncEvolution command line. + +When configuring SyncEvolution for Google, follow the instructions +above with ``username=goa:`` and empty password. +If the email address does not uniquely identify the GOA account, +the SyncEvolution command line will provide a list of accounts to choose +from. + + NOTES ===== @@ -971,7 +1151,7 @@ needed. Calendar items and tasks can be sent and received in iCalendar possible because it cannot represent all data that Evolution stores. .. note:: The Evolution backends are mentioned as examples; - the same applies to other data sources. + the same applies to other datastores. How the server stores the items depends on its implementation and configuration. To check which data is preserved, one can use this @@ -984,7 +1164,7 @@ calendars and tasks): to make the new address book usable in SyncEvolution) 3. add a configuration for that second address book and the same URI on the SyncML server, see EXAMPLES_ above -4. synchronize again, this time using the other data source +4. synchronize again, this time using the other datastore Now one can either compare the address books in Evolution or do that automatically, described here for contacts: diff --git a/src/backends/activesync/ActiveSyncSource.h b/src/backends/activesync/ActiveSyncSource.h index ee7fda46..6c9bf81a 100644 --- a/src/backends/activesync/ActiveSyncSource.h +++ b/src/backends/activesync/ActiveSyncSource.h @@ -186,7 +186,7 @@ class ActiveSyncSource : boost::shared_ptr m_itemNode; private: - /** "source-config@" instance which holds our username == ActiveSync account ID */ + /** "target-config@" instance which holds our username == ActiveSync account ID */ boost::shared_ptr m_context; /** account ID for libeas, must be set in "username" config property */ diff --git a/src/backends/activesync/ActiveSyncSourceRegister.cpp b/src/backends/activesync/ActiveSyncSourceRegister.cpp index 53a6b6a2..aab77ccc 100644 --- a/src/backends/activesync/ActiveSyncSourceRegister.cpp +++ b/src/backends/activesync/ActiveSyncSourceRegister.cpp @@ -204,7 +204,7 @@ static TestingSyncSource *createEASSource(const ClientTestConfig::createsource_t return res.release(); } else { // sorry, no database - SE_LOG_ERROR(NULL, "cannot create EAS source for database %s, check config", + SE_LOG_ERROR(NULL, "cannot create EAS datastore for database %s, check config", res->getDatabaseID().c_str()); return NULL; } diff --git a/src/backends/akonadi/README b/src/backends/akonadi/README index ca52b20b..184b9f95 100644 --- a/src/backends/akonadi/README +++ b/src/backends/akonadi/README @@ -27,13 +27,13 @@ Query databases: syncevolution Configuring syncevolution for contacts with Akonadi as backend: -syncevolution --configure --source-property sync=none \ +syncevolution --configure --datastore-property sync=none \ --sync-property username=... \ --sync-property password=... \ scheduleworld -syncevolution --configure --source-property sync=two-way \ - --source-property type=kde-contacts \ - --source-property evolutionsource=akonadi:?... \ +syncevolution --configure --datastore-property sync=two-way \ + --datastore-property type=kde-contacts \ + --datastore-property evolutionsource=akonadi:?... \ scheduleworld addressbook Initial run: diff --git a/src/backends/sqlite/README b/src/backends/sqlite/README index e2bc28cd..335d950c 100644 --- a/src/backends/sqlite/README +++ b/src/backends/sqlite/README @@ -21,7 +21,7 @@ Install /tmp/syncsqlite.so by moving it into the installation. It then should show up as additional choice for the "type" property: - syncevolution --source-property type=? + syncevolution --datastore-property type=? ... SQLite Address Book = addressbook = contacts = sqlite-contacts diff --git a/src/backends/webdav/WebDAVSource.cpp b/src/backends/webdav/WebDAVSource.cpp index 4e61e4d9..65c13761 100644 --- a/src/backends/webdav/WebDAVSource.cpp +++ b/src/backends/webdav/WebDAVSource.cpp @@ -81,7 +81,7 @@ public: if (sourceName.empty()) { sourceName = ""; } - description = StringPrintf("sync config '%s', source config '%s', database='%s'", + description = StringPrintf("sync config '%s', datastore config '%s', database='%s'", syncName.c_str(), sourceName.c_str(), url.c_str()); @@ -219,14 +219,14 @@ void ContextSettings::lookupAuthProvider() if (m_sourceConfig) { identity = m_sourceConfig->getUser(); password = m_sourceConfig->getPassword(); - credentialsFrom = "source config"; + credentialsFrom = "datastore config"; } // fall back to context if (m_context && !identity.wasSet() && !password.wasSet()) { identity = m_context->getSyncUser(); password = m_context->getSyncPassword(); - credentialsFrom = "source context"; + credentialsFrom = "context"; } SE_LOG_DEBUG(NULL, "using username '%s' from %s for WebDAV, password %s", identity.toString().c_str(), diff --git a/src/dbus/server/connection.cpp b/src/dbus/server/connection.cpp index b50eaf0a..8842fa7f 100644 --- a/src/dbus/server/connection.cpp +++ b/src/dbus/server/connection.cpp @@ -225,7 +225,7 @@ void Connection::process(const Caller_t &caller, uint32_t contentType; std::string serverURI; if (!numSources) { - SE_LOG_DEBUG(NULL, "SAN message with no sources, using selected modes"); + SE_LOG_DEBUG(NULL, "SAN message with no datastores, using selected modes"); // Synchronize all known sources with the default mode. if (san.GetNthSync(0, syncType, contentType, serverURI)) { SE_LOG_DEBUG(NULL, "SAN invalid header, using default modes"); @@ -233,7 +233,7 @@ void Connection::process(const Caller_t &caller, SE_LOG_DEBUG(NULL, "SAN invalid sync type %d, using default modes", syncType); } else { m_syncMode = PrettyPrintSyncMode(SyncMode(syncType), true); - SE_LOG_DEBUG(NULL, "SAN sync mode for all configured sources: %s", m_syncMode.c_str()); + SE_LOG_DEBUG(NULL, "SAN sync mode for all configured datastores: %s", m_syncMode.c_str()); } } else { for (int sync = 1; sync <= numSources; sync++) { @@ -604,7 +604,7 @@ void Connection::ready() // range selection for events) if (boost::starts_with(sourceConfig->getURINonEmpty(), serverURI)) { SE_LOG_DEBUG(NULL, - "SAN entry #%d = source %s with mode %s", + "SAN entry #%d = datastore %s with mode %s", (int)sync, source.c_str(), syncMode.c_str()); m_sourceModes[source] = syncMode; found = true; diff --git a/src/dbus/server/read-operations.cpp b/src/dbus/server/read-operations.cpp index 62c4ebda..6bd57d97 100644 --- a/src/dbus/server/read-operations.cpp +++ b/src/dbus/server/read-operations.cpp @@ -289,7 +289,7 @@ void ReadOperations::checkSource(const std::string &sourceName) } } if(it == sourceNames.end()) { - SE_THROW_EXCEPTION(NoSuchSource, "'" + m_configName + "' has no '" + sourceName + "' source"); + SE_THROW_EXCEPTION(NoSuchSource, "'" + m_configName + "' has no '" + sourceName + "' datastore"); } bool checked = false; try { @@ -307,7 +307,7 @@ void ReadOperations::checkSource(const std::string &sourceName) } if (!checked) { - SE_THROW_EXCEPTION(SourceUnusable, "The source '" + sourceName + "' is not usable"); + SE_THROW_EXCEPTION(SourceUnusable, "The datastore '" + sourceName + "' is not usable"); } } void ReadOperations::getDatabases(const string &sourceName, SourceDatabases_t &databases) @@ -322,14 +322,14 @@ void ReadOperations::getDatabases(const string &sourceName, SourceDatabases_t &d if (!source.get()) { continue; } else if (source->isInactive()) { - SE_THROW_EXCEPTION(NoSuchSource, "'" + m_configName + "' backend of source '" + sourceName + "' is not supported"); + SE_THROW_EXCEPTION(NoSuchSource, "'" + m_configName + "' backend of datastore '" + sourceName + "' is not supported"); } else { databases = source->getDatabases(); return; } } - SE_THROW_EXCEPTION(NoSuchSource, "'" + m_configName + "' has no '" + sourceName + "' source"); + SE_THROW_EXCEPTION(NoSuchSource, "'" + m_configName + "' has no '" + sourceName + "' datastore"); } SE_END_CXX diff --git a/src/syncevo/Cmdline.cpp b/src/syncevo/Cmdline.cpp index fdeb9c70..790d077c 100644 --- a/src/syncevo/Cmdline.cpp +++ b/src/syncevo/Cmdline.cpp @@ -179,6 +179,7 @@ bool Cmdline::parse(vector &parsed) } parsed.push_back(m_argv[opt]); } else if(boost::iequals(m_argv[opt], "--source-property") || + boost::iequals(m_argv[opt], "--datastore-property") || boost::iequals(m_argv[opt], "-z")) { opt++; if (!parseProp(SOURCE_PROPERTY_TYPE, @@ -770,7 +771,7 @@ bool Cmdline::run() { if (!m_server.empty()) { // list for specific backend chosen via config if (m_sources.size() != 1) { - SE_THROW(StringPrintf("must specify exactly one source after the config name '%s'", + SE_THROW(StringPrintf("must specify exactly one datastore after the config name '%s'", m_server.c_str())); } sourceName = *m_sources.begin(); @@ -959,7 +960,7 @@ bool Cmdline::run() { string origPeer; if (m_migrate) { if (!m_sources.empty()) { - SE_LOG_ERROR(NULL, "cannot migrate individual sources"); + SE_LOG_ERROR(NULL, "cannot migrate individual datastores"); return false; } @@ -1295,7 +1296,7 @@ bool Cmdline::run() { } if (!sources.empty()) { - Exception::throwError(SE_HERE, string("no such source(s): ") + boost::join(sources, " ")); + Exception::throwError(SE_HERE, string("no such datastore(s): ") + boost::join(sources, " ")); } } @@ -1368,9 +1369,9 @@ bool Cmdline::run() { explanation.push_back(StringPrintf("configuration '%s' does not exist", m_server.c_str())); } if (haveSourceName && !sourceNodes.exists()) { - explanation.push_back(StringPrintf("source '%s' does not exist", sourceName.c_str())); + explanation.push_back(StringPrintf("datastore '%s' does not exist", sourceName.c_str())); } else if (!haveSourceName) { - explanation.push_back("no source selected"); + explanation.push_back("no datastore selected"); } SyncSourceConfig sourceConfig(sourceName, sourceNodes); if (!sourceConfig.getBackend().wasSet()) { @@ -1650,7 +1651,7 @@ bool Cmdline::run() { // check whether there were any sources specified which do not exist if (!unmatchedSources.empty()) { - Exception::throwError(SE_HERE, string("no such source(s): ") + boost::join(unmatchedSources, " ")); + Exception::throwError(SE_HERE, string("no such datastore(s): ") + boost::join(unmatchedSources, " ")); } if (m_status) { @@ -1682,7 +1683,7 @@ bool Cmdline::run() { return false; } if (m_sources.empty()) { - usage(false, "Sources must be selected explicitly for --restore to prevent accidental restore."); + usage(false, "Datastores must be selected explicitly for --restore to prevent accidental restore."); return false; } context->restore(m_restore, @@ -1811,7 +1812,7 @@ bool Cmdline::parseProp(PropertyType propertyType, if (isSyncProp) { if (isSourceProp) { - usage(false, StringPrintf("property '%s' in %s could be both a sync and a source property, use --sync-property or --source-property to disambiguate it", propname, args.c_str())); + usage(false, StringPrintf("property '%s' in %s could be both a sync and a datastore property, use --sync-property or --datastore-property to disambiguate it", propname, args.c_str())); return false; } else { validProps = &m_validSyncProps; @@ -1888,7 +1889,7 @@ bool Cmdline::parseProp(PropertyType propertyType, if (validProps == &m_validSyncProps) { // complain if sync property includes source prefix if (!spec.m_source.empty()) { - SE_LOG_ERROR(NULL, "%s: source name '%s' not allowed in sync property", + SE_LOG_ERROR(NULL, "%s: datastore name '%s' not allowed in sync property", args.c_str(), spec.m_source.c_str()); return false; @@ -3190,7 +3191,8 @@ protected: { TestCmdline cmdline("--configure", - "--source-property", "uri = dummy", + // Intentionally use legacy parameter name here. + "--datastore-property", "uri = dummy", "scheduleworld", "xyz", NULL); @@ -3262,7 +3264,7 @@ protected: " not always obvious.\n" " \n" " When accepting a sync session in a SyncML server (HTTP server), only\n" - " sources with sync != disabled are made available to the client,\n" + " datastores with sync != disabled are made available to the client,\n" " which chooses the final sync mode based on its own configuration.\n" " When accepting a sync session in a SyncML client (local sync with\n" " the server contacting SyncEvolution on a device), the sync mode\n" @@ -3278,7 +3280,7 @@ protected: string(filter.m_cmdline->m_props[""].m_sourceProps[""])); CPPUNIT_ASSERT_EQUAL_DIFF("", string(filter.m_cmdline->m_props[""].m_syncProps)); - TestCmdline filter2("--source-property", "sync=refresh", NULL); + TestCmdline filter2("--datastore-property", "sync=refresh", NULL); CPPUNIT_ASSERT(filter2.m_cmdline->parse()); CPPUNIT_ASSERT(!filter2.m_cmdline->run()); CPPUNIT_ASSERT_NO_THROW(filter2.expectUsageError("[ERROR] No configuration name specified.\n")); @@ -3287,10 +3289,10 @@ protected: CPPUNIT_ASSERT_EQUAL_DIFF("", string(filter2.m_cmdline->m_props[""].m_syncProps)); - TestCmdline filter3("--source-property", "xyz=1", NULL); + TestCmdline filter3("--datastore-property", "xyz=1", NULL); CPPUNIT_ASSERT(!filter3.m_cmdline->parse()); CPPUNIT_ASSERT_EQUAL(string(""), filter3.m_out.str()); - CPPUNIT_ASSERT_EQUAL(string("[ERROR] '--source-property xyz=1': no such property\n"), filter3.m_err.str()); + CPPUNIT_ASSERT_EQUAL(string("[ERROR] '--datastore-property xyz=1': no such property\n"), filter3.m_err.str()); TestCmdline filter4("xyz=1", NULL); CPPUNIT_ASSERT(!filter4.m_cmdline->parse()); @@ -3602,7 +3604,7 @@ protected: // updating "type" for peer is mapped to updating "backend", // "databaseFormat", "syncFormat", "forceSyncFormat" TestCmdline cmdline("--configure", - "--source-property", "addressbook/type=file:text/vcard:3.0", + "--datastore-property", "addressbook/type=file:text/vcard:3.0", "scheduleworld", NULL); cmdline.doit(); @@ -3624,7 +3626,7 @@ protected: { // updating type for context must not affect peer TestCmdline cmdline("--configure", - "--source-property", "type=file:text/x-vcard:2.1", + "--datastore-property", "type=file:text/x-vcard:2.1", "@default", "addressbook", NULL); cmdline.doit(); @@ -3742,7 +3744,7 @@ protected: } { - TestCmdline cmdline("--source-property", "?", + TestCmdline cmdline("--datastore-property", "?", NULL); cmdline.doit(); CPPUNIT_ASSERT_EQUAL_DIFF("", cmdline.m_err.str()); @@ -3751,7 +3753,7 @@ protected: } { - TestCmdline cmdline("--source-property", "?", + TestCmdline cmdline("--datastore-property", "?", "--sync-property", "?", NULL); cmdline.doit(); @@ -3762,7 +3764,7 @@ protected: { TestCmdline cmdline("--sync-property", "?", - "--source-property", "?", + "--datastore-property", "?", NULL); cmdline.doit(); CPPUNIT_ASSERT_EQUAL_DIFF("", cmdline.m_err.str()); @@ -3771,11 +3773,11 @@ protected: } { - TestCmdline cmdline("--source-property", "sync=?", + TestCmdline cmdline("--datastore-property", "sync=?", NULL); cmdline.doit(); CPPUNIT_ASSERT_EQUAL_DIFF("", cmdline.m_err.str()); - CPPUNIT_ASSERT_EQUAL_DIFF("'--source-property sync=?'\n", + CPPUNIT_ASSERT_EQUAL_DIFF("'--datastore-property sync=?'\n", filterIndented(cmdline.m_out.str())); } @@ -3806,8 +3808,8 @@ protected: // create from scratch with only addressbook configured { TestCmdline cmdline("--configure", - "--source-property", "database = file://tmp/test", - "--source-property", "type = file:text/x-vcard", + "--datastore-property", "database = file://tmp/test", + "--datastore-property", "type = file:text/x-vcard", "@foobar", "addressbook", NULL); @@ -3835,8 +3837,8 @@ protected: // add calendar { TestCmdline cmdline("--configure", - "--source-property", "database@foobar = file://tmp/test2", - "--source-property", "backend = calendar", + "--datastore-property", "database@foobar = file://tmp/test2", + "--datastore-property", "backend = calendar", "@foobar", "calendar", NULL); @@ -3880,8 +3882,8 @@ protected: // disable all sources except for addressbook { TestCmdline cmdline("--configure", - "--source-property", "addressbook/sync=two-way", - "--source-property", "sync=none", + "--datastore-property", "addressbook/sync=two-way", + "--datastore-property", "sync=none", "scheduleworld@foobar", NULL); cmdline.doit(); @@ -3896,8 +3898,8 @@ protected: { TestCmdline cmdline("--configure", "--template", "SyncEvolution", - "--source-property", "addressbook/type=file:text/vcard:3.0", - "--source-property", "calendar/type=file:text/calendar:2.0", + "--datastore-property", "addressbook/type=file:text/vcard:3.0", + "--datastore-property", "calendar/type=file:text/calendar:2.0", "syncevo@syncevo", NULL); cmdline.doit(); @@ -3969,7 +3971,7 @@ protected: { TestCmdline cmdline("--configure", - "--source-property", "sync = disabled", + "--datastore-property", "sync = disabled", "scheduleworld", NULL); cmdline.doit(); @@ -3985,7 +3987,7 @@ protected: { TestCmdline cmdline("--configure", - "--source-property", "sync = one-way-from-server", + "--datastore-property", "sync = one-way-from-server", "scheduleworld", "addressbook", NULL); @@ -4007,7 +4009,7 @@ protected: { TestCmdline cmdline("--configure", "--sync", "two-way", - "-z", "database=source", + "-z", "database=datastore", // note priority of suffix: most specific wins "--sync-property", "maxlogdirs@scheduleworld@default=20", "--sync-property", "maxlogdirs@default=10", @@ -4026,10 +4028,10 @@ protected: "sync = two-way"); boost::replace_all(expected, "# database = ", - "database = source"); + "database = datastore"); boost::replace_all(expected, "database = xyz", - "database = source"); + "database = datastore"); boost::replace_all(expected, "# maxlogdirs = 10", "maxlogdirs = 20"); @@ -4501,7 +4503,7 @@ private: CPPUNIT_ASSERT(out.find("\nOptions:\n") == std::string::npos); CPPUNIT_ASSERT(boost::ends_with(out, "Remove item(s):\n" - " syncevolution --delete-items [--] ( ... | '*')\n\n")); + " syncevolution --delete-items [--] ( ... | '*')\n\n")); // exact error message CPPUNIT_ASSERT_EQUAL(error, err); diff --git a/src/syncevo/LocalTransportAgent.cpp b/src/syncevo/LocalTransportAgent.cpp index b432d3a8..5d79e6e4 100644 --- a/src/syncevo/LocalTransportAgent.cpp +++ b/src/syncevo/LocalTransportAgent.cpp @@ -833,9 +833,9 @@ class LocalTransportAgentChild : public TransportAgent if (!targetNodes.dataConfigExists()) { if (targetName.empty()) { - Exception::throwError(SE_HERE, "missing URI for one of the sources"); + Exception::throwError(SE_HERE, "missing URI for one of the datastores"); } else { - Exception::throwError(SE_HERE, StringPrintf("%s: source not configured", + Exception::throwError(SE_HERE, StringPrintf("%s: datastore not configured", fullTargetName.c_str())); } } @@ -846,7 +846,7 @@ class LocalTransportAgentChild : public TransportAgent // done before in this loop => error in original config. if (!targetSource.isDisabled()) { Exception::throwError(SE_HERE, - StringPrintf("%s: source targetted twice by %s", + StringPrintf("%s: datastore targetted twice by %s", fullTargetName.c_str(), serverConfig.first.c_str())); } diff --git a/src/syncevo/SyncConfig.cpp b/src/syncevo/SyncConfig.cpp index dba85ab8..d836c010 100644 --- a/src/syncevo/SyncConfig.cpp +++ b/src/syncevo/SyncConfig.cpp @@ -1302,7 +1302,7 @@ static ConfigProperty syncPropSyncURL("syncURL", "Identifies how to contact the peer,\n" "best explained with some examples.\n\n" "HTTP(S) SyncML servers::\n\n" - " http://example.com/sync\n" + " http://example.com/sync\n\n" "OBEX over Bluetooth uses the MAC address, with\n" "the channel chosen automatically::\n\n" " obex-bt://00:0A:94:03:F3:7E\n\n" @@ -1427,7 +1427,7 @@ static BoolConfigProperty syncPropPreventSlowSync("preventSlowSync", "side with a refresh-from-client/server sync instead of doing\n" "a slow sync.\n" "When this option is enabled, slow syncs that could cause problems\n" - "are not allowed to proceed. Instead, the affected sources are\n" + "are not allowed to proceed. Instead, the affected datastores are\n" "skipped, allowing the user to choose a suitable sync mode in\n" "the next run (slow sync selected explicitly, refresh sync).\n" "The following situations are handled:\n\n" @@ -2007,7 +2007,7 @@ void PasswordConfigProperty::checkPassword(UserInterface &ui, serverName.c_str(), username.c_str()); } else { - SE_LOG_DEBUG(NULL, "checking password property '%s' in source '%s' of config '%s' with user identity '%s'", + SE_LOG_DEBUG(NULL, "checking password property '%s' in datastore '%s' of config '%s' with user identity '%s'", getMainName().c_str(), sourceName.c_str(), serverName.c_str(), @@ -2154,7 +2154,7 @@ void PasswordConfigProperty::savePassword(UserInterface &ui, serverName.c_str(), username.c_str()); } else { - SE_LOG_DEBUG(NULL, "possibly saving password property '%s' in source '%s' of config '%s' with user identity '%s'", + SE_LOG_DEBUG(NULL, "possibly saving password property '%s' in datastore '%s' of config '%s' with user identity '%s'", getMainName().c_str(), sourceName.c_str(), serverName.c_str(), @@ -2681,7 +2681,7 @@ StringConfigProperty SyncSourceConfig::m_sourcePropSync("sync", "not always obvious.\n" "\n" "When accepting a sync session in a SyncML server (HTTP server), only\n" - "sources with sync != disabled are made available to the client,\n" + "datastores with sync != disabled are made available to the client,\n" "which chooses the final sync mode based on its own configuration.\n" "When accepting a sync session in a SyncML client (local sync with\n" "the server contacting SyncEvolution on a device), the sync mode\n" @@ -2710,25 +2710,25 @@ public: SourceBackendConfigProperty() : StringConfigProperty("backend", "Specifies the SyncEvolution backend and thus the\n" - "data which is synchronized by this source. Each\n" + "data which is synchronized by this datastore. Each\n" "backend may support multiple databases (see 'database'\n" "property), different formats inside that database (see\n" "'databaseFormat'), and different formats when talking to\n" "the sync peer (see 'syncFormat' and 'forceSyncFormat').\n" "\n" "A special 'virtual' backend combines several other\n" - "data sources and presents them as one set of items\n" + "datastores and presents them as one set of items\n" "to the peer. For example, Nokia phones typically\n" "exchange tasks and events as part of one set of\n" "calendar items.\n" "\n" "Right now such a virtual backend is limited to\n" - "combining one calendar source with events and one\n" - "task source. They have to be specified in the\n" + "combining one calendar datastore with events and one\n" + "task datastore. They have to be specified in the\n" "``database`` property, typically like this:\n" "``calendar,todo``\n" "\n" - "Different sources combined in one virtual source must\n" + "Different datastores combined in one virtual datastore must\n" "have a common format. As with other backends,\n" "the preferred format can be influenced via the 'syncFormat'\n" "attribute.\n" @@ -2821,7 +2821,7 @@ static ConfigProperty sourcePropDatabaseID(Aliases("database") + "evolutionsourc "like for example the system address book.\n" "Not setting this property selects that default\n" "database.\n\n" - "If the backend is a virtual data source,\n" + "If the backend is a virtual data datastore,\n" "this field must contain comma seperated list of\n" "sub datasources actually used to store data.\n" "If your sub datastore has a comma in name, you\n" @@ -2833,8 +2833,8 @@ static ConfigProperty sourcePropDatabaseID(Aliases("database") + "evolutionsourc "run ``syncevolution --print-databases``. The name\n" "is printed in front of the colon, followed by\n" "an identifier in brackets. Usually the name is unique and can be\n" - "used to reference the data source. The default\n" - "data source is marked with at the end\n" + "used to reference the data datastore. The default\n" + "data datastore is marked with at the end\n" "of the line, if there is a default.\n"); static StringConfigProperty sourcePropDatabaseFormat("databaseFormat", @@ -2845,11 +2845,11 @@ static StringConfigProperty sourcePropDatabaseFormat("databaseFormat", static ConfigProperty sourcePropURI("uri", "this is appended to the server's URL to identify the\n" - "server's database; if unset, the source name is used as\n" + "server's database; if unset, the datastore name is used as\n" "fallback"); static ConfigProperty sourcePropUser(Aliases("databaseUser") + "evolutionuser", - "authentication for backend data source; password can be specified\n" + "authentication for backend data datastore; password can be specified\n" "in multiple ways, see SyncML server password for details\n" "\n" "Warning: setting database user/password in cases where it is not\n" @@ -2889,7 +2889,7 @@ public: key.object += " "; key.object += sourceName; key.object += " backend"; - key.description = StringPrintf("databasePassword for %s in source %s", + key.description = StringPrintf("databasePassword for %s in datastore %s", descr.c_str(), sourceName.c_str()); return key; } @@ -3004,11 +3004,11 @@ SyncSourceNodes::getNode(const ConfigProperty &prop) const { switch (prop.getSharing()) { case ConfigProperty::GLOBAL_SHARING: - return boost::shared_ptr(new FilterConfigNode(boost::shared_ptr(new DevNullConfigNode("no global source properties")))); + return boost::shared_ptr(new FilterConfigNode(boost::shared_ptr(new DevNullConfigNode("no global datastore properties")))); break; case ConfigProperty::SOURCE_SET_SHARING: if (prop.isHidden()) { - return boost::shared_ptr(new FilterConfigNode(boost::shared_ptr(new DevNullConfigNode("no hidden source set properties")))); + return boost::shared_ptr(new FilterConfigNode(boost::shared_ptr(new DevNullConfigNode("no hidden datastore set properties")))); } else { return m_sharedNode; } diff --git a/src/syncevo/SyncContext.cpp b/src/syncevo/SyncContext.cpp index 37c648c8..a187ca70 100644 --- a/src/syncevo/SyncContext.cpp +++ b/src/syncevo/SyncContext.cpp @@ -1407,7 +1407,7 @@ public: m_doLogging && (m_client.getDumpData() || m_client.getPrintChanges())) { // dump initial databases - SE_LOG_INFO(NULL, "creating complete data backup of source %s before sync (%s)", + SE_LOG_INFO(NULL, "creating complete data backup of datastore %s before sync (%s)", sourceName.c_str(), (m_client.getDumpData() && m_client.getPrintChanges()) ? "enabled with dumpData and needed for printChanges" : m_client.getDumpData() ? "because it was enabled with dumpData" : @@ -2224,12 +2224,12 @@ void SyncContext::initSources(SourceList &sourceList) = getSyncSourceConfig(source); if (!source_config || !source_config->exists()) { Exception::throwError(SE_HERE, - StringPrintf("Virtual data source \"%s\" references a nonexistent datasource \"%s\".", name.c_str(), source.c_str())); + StringPrintf("Virtual datastore \"%s\" references a nonexistent datasource \"%s\".", name.c_str(), source.c_str())); } pair< map::iterator, bool > res = subSources.insert(make_pair(source, name)); if (!res.second) { Exception::throwError(SE_HERE, - StringPrintf("Data source \"%s\" included in the virtual sources \"%s\" and \"%s\". It can only be included in one virtual source at a time.", + StringPrintf("Datastore \"%s\" included in the virtual datastores \"%s\" and \"%s\". It can only be included in one virtual datastore at a time.", source.c_str(), res.first->second.c_str(), name.c_str())); } @@ -2865,13 +2865,13 @@ void SyncContext::getConfigXML(string &xml, string &configname) sourceType.m_format != subType.m_format || sourceType.m_forceFormat != subType.m_forceFormat)) { SE_LOG_WARNING(NULL, - "Virtual data source \"%s\" and sub data source \"%s\" have different data format. Will use the format in virtual data source.", + "Virtual datastore \"%s\" and sub datastore \"%s\" have different data format. Will use the format in virtual datastore.", vSource->getDisplayName().c_str(), source.c_str()); } } if (mappedSources.size() !=2) { - vSource->throwError(SE_HERE, "virtual data source currently only supports events+tasks combinations"); + vSource->throwError(SE_HERE, "virtual datastore currently only supports events+tasks combinations"); } string name = vSource->getName(); @@ -3379,7 +3379,7 @@ SyncMLStatus SyncContext::sync(SyncReport *report) // instantiate backends, but do not open them yet initSources(sourceList); if (sourceList.empty()) { - Exception::throwError(SE_HERE, "no sources active, check configuration"); + Exception::throwError(SE_HERE, "no datastores active, check configuration"); } // request all config properties once: throwing exceptions @@ -3555,7 +3555,7 @@ bool SyncContext::sendSAN(uint16_t version) mode = SA_TWO_WAY; } if (mode < SA_FIRST || mode > SA_LAST) { - SE_LOG_DEV(NULL, "Ignoring data source %s with an invalid sync mode", name.c_str()); + SE_LOG_DEV(NULL, "Ignoring datastore %s with an invalid sync mode", name.c_str()); continue; } syncMode = mode; @@ -3576,7 +3576,7 @@ bool SyncContext::sendSAN(uint16_t version) contentTypeB = 0; SE_LOG_DEBUG(NULL, "Unknown datasource mimetype, use 0 as default"); } - SE_LOG_DEBUG(NULL, "SAN source %s uri %s type %u mode %d", + SE_LOG_DEBUG(NULL, "SAN datastore %s uri %s type %u mode %d", name.c_str(), uri.c_str(), contentTypeB, @@ -3586,7 +3586,7 @@ bool SyncContext::sendSAN(uint16_t version) }; } else { string mimetype = GetLegacyMIMEType(sourceType.m_format, sourceType.m_forceFormat); - SE_LOG_DEBUG(NULL, "SAN source %s uri %s type %s", + SE_LOG_DEBUG(NULL, "SAN datastore %s uri %s type %s", name.c_str(), uri.c_str(), mimetype.c_str()); @@ -3595,7 +3595,7 @@ bool SyncContext::sendSAN(uint16_t version) } if (!hasSource) { - SE_THROW ("No source enabled for server alerted sync!"); + SE_THROW ("No datastore enabled for server alerted sync!"); } /* Generate the SAN Package */ @@ -3709,7 +3709,7 @@ bool SyncContext::setFreeze(bool freeze) } if (m_sourceListPtr) { BOOST_FOREACH (SyncSource *source, *m_sourceListPtr) { - SE_LOG_DEBUG(NULL, "SyncContext::setFreeze(): source %s", source->getDisplayName().c_str()); + SE_LOG_DEBUG(NULL, "SyncContext::setFreeze(): datastore %s", source->getDisplayName().c_str()); source->setFreeze(freeze); } } @@ -4054,7 +4054,7 @@ SyncMLStatus SyncContext::doSync() if (!explanation.empty()) { string sourceparam = boost::join(sources, " "); SE_LOG_ERROR(NULL, - "Aborting because of unexpected slow sync for source(s): %s", + "Aborting because of unexpected slow sync for datastore(s): %s", sourceparam.c_str()); SE_LOG_INFO(NULL, "%s", explanation.c_str()); } else { diff --git a/src/syncevo/SyncSource.cpp b/src/syncevo/SyncSource.cpp index 656e53e5..21e8f112 100644 --- a/src/syncevo/SyncSource.cpp +++ b/src/syncevo/SyncSource.cpp @@ -438,7 +438,7 @@ SyncSource *SyncSource::createSource(const SyncSourceParams ¶ms, bool error, SyncSource *source = NULL; source = new VirtualSyncSource(params, config); if (error && !source) { - Exception::throwError(SE_HERE, params.getDisplayName() + ": virtual source cannot be instantiated"); + Exception::throwError(SE_HERE, params.getDisplayName() + ": virtual datastore cannot be instantiated"); } return source; } @@ -507,7 +507,7 @@ VirtualSyncSource::VirtualSyncSource(const SyncSourceParams ¶ms, SyncConfig std::string evoSyncSource = getDatabaseID(); BOOST_FOREACH(std::string name, getMappedSources()) { if (name.empty()) { - throwError(SE_HERE, StringPrintf("configuration of underlying sources contains empty source name: database = '%s'", + throwError(SE_HERE, StringPrintf("configuration of underlying datastores contains empty datastore name: database = '%s'", evoSyncSource.c_str())); } SyncSourceNodes source = config->getSyncSourceNodes(name); @@ -516,7 +516,7 @@ VirtualSyncSource::VirtualSyncSource(const SyncSourceParams ¶ms, SyncConfig m_sources.push_back(syncSource); } if (m_sources.size() != 2) { - throwError(SE_HERE, StringPrintf("configuration of underlying sources must contain exactly one calendar and one todo source (like calendar+todo): database = '%s'", + throwError(SE_HERE, StringPrintf("configuration of underlying datastores must contain exactly one calendar and one todo datastore (like calendar+todo): database = '%s'", evoSyncSource.c_str())); } } diff --git a/test/test-dbus.py b/test/test-dbus.py index 07fe817b..176d0411 100755 --- a/test/test-dbus.py +++ b/test/test-dbus.py @@ -2299,7 +2299,7 @@ class TestSessionAPIsEmptyName(DBusUtil, unittest.TestCase): self.session.CheckSource("", utf8_strings=True) except dbus.DBusException, ex: self.assertEqual(str(ex), - "org.syncevolution.NoSuchSource: '' has no '' source") + "org.syncevolution.NoSuchSource: '' has no '' datastore") else: self.fail("no exception thrown") @@ -2309,7 +2309,7 @@ class TestSessionAPIsEmptyName(DBusUtil, unittest.TestCase): self.session.GetDatabases("", utf8_strings=True) except dbus.DBusException, ex: self.assertEqual(str(ex), - "org.syncevolution.NoSuchSource: '' has no '' source") + "org.syncevolution.NoSuchSource: '' has no '' datastore") else: self.fail("no exception thrown") @@ -2567,19 +2567,19 @@ class TestSessionAPIsDummy(DBusUtil, unittest.TestCase): self.session.CheckSource("", utf8_strings=True) except dbus.DBusException, ex: self.assertEqual(str(ex), - "org.syncevolution.NoSuchSource: 'dummy-test' has no '' source") + "org.syncevolution.NoSuchSource: 'dummy-test' has no '' datastore") else: self.fail("no exception thrown") def testCheckSourceNoSourceName(self): - """TestSessionAPIsDummy.testCheckSourceNoSourceName - test the right error is reported when the source doesn't exist """ + """TestSessionAPIsDummy.testCheckSourceNoSourceName - test the right error is reported when the datastore doesn't exist """ self.setupConfig() try: self.session.CheckSource("dummy", utf8_strings=True) except dbus.DBusException, ex: self.assertEqual(str(ex), "org.syncevolution.NoSuchSource: 'dummy-test' " - "has no 'dummy' source") + "has no 'dummy' datastore") else: self.fail("no exception thrown") @@ -2592,7 +2592,7 @@ class TestSessionAPIsDummy(DBusUtil, unittest.TestCase): self.session.CheckSource("memo", utf8_strings=True) except dbus.DBusException, ex: self.assertEqual(str(ex), - "org.syncevolution.SourceUnusable: The source 'memo' is not usable") + "org.syncevolution.SourceUnusable: The datastore 'memo' is not usable") else: self.fail("no exception thrown") @@ -2609,7 +2609,7 @@ class TestSessionAPIsDummy(DBusUtil, unittest.TestCase): self.fail("no exception thrown") def testCheckSourceNoBackend(self): - """TestSessionAPIsDummy.testCheckSourceNoBackend - test the right error is reported when the source is unusable""" + """TestSessionAPIsDummy.testCheckSourceNoBackend - test the right error is reported when the datastore is unusable""" self.setupConfig() config = { "source/memo" : { "backend" : "file", "databaseFormat" : "text/calendar", @@ -2619,12 +2619,12 @@ class TestSessionAPIsDummy(DBusUtil, unittest.TestCase): self.session.CheckSource("memo", utf8_strings=True) except dbus.DBusException, ex: self.assertEqual(str(ex), - "org.syncevolution.SourceUnusable: The source 'memo' is not usable") + "org.syncevolution.SourceUnusable: The datastore 'memo' is not usable") else: self.fail("no exception thrown") def testCheckSource(self): - """TestSessionAPIsDummy.testCheckSource - testCheckSource - test all sources are okay""" + """TestSessionAPIsDummy.testCheckSource - testCheckSource - test all datastores are okay""" self.setupConfig() try: for source in self.sources: @@ -2646,18 +2646,18 @@ class TestSessionAPIsDummy(DBusUtil, unittest.TestCase): self.session.GetDatabases("", utf8_strings=True) except dbus.DBusException, ex: self.assertEqual(str(ex), - "org.syncevolution.NoSuchSource: 'dummy-test' has no '' source") + "org.syncevolution.NoSuchSource: 'dummy-test' has no '' datastore") else: self.fail("no exception thrown") def testGetDatabasesEmpty(self): - """TestSessionAPIsDummy.testGetDatabasesEmpty - test the right error is reported for non-existing source""" + """TestSessionAPIsDummy.testGetDatabasesEmpty - test the right error is reported for non-existing datastore""" self.setupConfig() try: databases = self.session.GetDatabases("never_use_this_source_name", utf8_strings=True) except dbus.DBusException, ex: self.assertEqual(str(ex), - "org.syncevolution.NoSuchSource: 'dummy-test' has no 'never_use_this_source_name' source") + "org.syncevolution.NoSuchSource: 'dummy-test' has no 'never_use_this_source_name' datastore") else: self.fail("no exception thrown") @@ -6195,7 +6195,7 @@ spds/sources/todo/config.txt:# evolutionpassword = self.assertTrue(out.startswith("List and manipulate databases:\n")) self.assertEqual(out.find("\nOptions:\n"), -1) self.assertTrue(out.endswith("Remove item(s):\n" \ - " syncevolution --delete-items [--] ( ... | '*')\n\n")) + " syncevolution --delete-items [--] ( ... | '*')\n\n")) self.assertEqualDiff(specific_error, stripOutput(err)) @property('debug', False) @@ -6855,7 +6855,7 @@ sources/xyz/config.ini:# databasePassword = """) not always obvious. When accepting a sync session in a SyncML server (HTTP server), only - sources with sync != disabled are made available to the client, + datastores with sync != disabled are made available to the client, which chooses the final sync mode based on its own configuration. When accepting a sync session in a SyncML client (local sync with the server contacting SyncEvolution on a device), the sync mode @@ -7341,7 +7341,7 @@ syncevolution/default/sources/eds_event/config.ini:backend = calendar expectSuccess = False) self.assertEqualDiff('', out) err = stripOutput(err) - self.assertEqualDiff('[ERROR] error code from SyncEvolution fatal error (local, status 10500): no such source(s): eds_event\n', err) + self.assertEqualDiff('[ERROR] error code from SyncEvolution fatal error (local, status 10500): no such datastore(s): eds_event\n', err) shutil.rmtree(self.configdir, True) # allow user to proceed if they wish and possible: here @@ -7350,7 +7350,7 @@ syncevolution/default/sources/eds_event/config.ini:backend = calendar expectSuccess = False) self.assertEqualDiff('', out) err = stripOutput(err) - self.assertEqualDiff('[ERROR] error code from SyncEvolution fatal error (local, status 10500): no such source(s): eds_event\n', err) + self.assertEqualDiff('[ERROR] error code from SyncEvolution fatal error (local, status 10500): no such datastore(s): eds_event\n', err) shutil.rmtree(self.configdir, True) # allow user to proceed if they wish: configure exactly the @@ -7961,20 +7961,20 @@ sources/memo/config.ini:type = todo expectSuccess = False) # Information about supported modules is optional, depends on compilation of # SyncEvolution. - self.assertRegexpMatches(err, r'''\[ERROR\] error code from SyncEvolution error parsing config file \(local, status 20010\): bar: backend not supported (by any of the backend modules \((\S+, )+\S+\) )?or not correctly configured \(backend=select backend databaseFormat= syncFormat=\)\n\[ERROR\] configuration 'foo' does not exist\n\[ERROR\] source 'bar' does not exist\n\[ERROR\] backend property not set\n''') + self.assertRegexpMatches(err, r'''\[ERROR\] error code from SyncEvolution error parsing config file \(local, status 20010\): bar: backend not supported (by any of the backend modules \((\S+, )+\S+\) )?or not correctly configured \(backend=select backend databaseFormat= syncFormat=\)\n\[ERROR\] configuration 'foo' does not exist\n\[ERROR\] datastore 'bar' does not exist\n\[ERROR\] backend property not set\n''') self.assertEqualDiff('', out) # "foo" not configured, no source named out, err, code = self.runCmdline(["--print-items", "foo"], expectSuccess = False) - self.assertRegexpMatches(err, r'''\[ERROR\] error code from SyncEvolution error parsing config file \(local, status 20010\): backend not supported (by any of the backend modules \((\S+, )+\S+\) )?or not correctly configured \(backend=select backend databaseFormat= syncFormat=\)\n\[ERROR\] configuration 'foo' does not exist\n\[ERROR\] no source selected\n\[ERROR\] backend property not set\n''') + self.assertRegexpMatches(err, r'''\[ERROR\] error code from SyncEvolution error parsing config file \(local, status 20010\): backend not supported (by any of the backend modules \((\S+, )+\S+\) )?or not correctly configured \(backend=select backend databaseFormat= syncFormat=\)\n\[ERROR\] configuration 'foo' does not exist\n\[ERROR\] no datastore selected\n\[ERROR\] backend property not set\n''') self.assertEqualDiff('', out) # nothing known about source out, err, code = self.runCmdline(["--print-items"], expectSuccess = False) - self.assertRegexpMatches(err, r'''\[ERROR\] error code from SyncEvolution error parsing config file \(local, status 20010\): backend not supported (by any of the backend modules \((\S+, )+\S+\) )?or not correctly configured \(backend=select backend databaseFormat= syncFormat=\)\n\[ERROR\] no source selected\n\[ERROR\] backend property not set\n''') + self.assertRegexpMatches(err, r'''\[ERROR\] error code from SyncEvolution error parsing config file \(local, status 20010\): backend not supported (by any of the backend modules \((\S+, )+\S+\) )?or not correctly configured \(backend=select backend databaseFormat= syncFormat=\)\n\[ERROR\] no datastore selected\n\[ERROR\] backend property not set\n''') self.assertEqualDiff('', out) # now create "foo" @@ -7987,7 +7987,7 @@ sources/memo/config.ini:type = todo out, err, code = self.runCmdline(["--print-items", "foo"], expectSuccess = False) - self.assertRegexpMatches(err, r'''\[ERROR\] error code from SyncEvolution error parsing config file \(local, status 20010\): backend not supported (by any of the backend modules \((\S+, )+\S+\) )?or not correctly configured \(backend=select backend databaseFormat= syncFormat=\)\n\[ERROR\] no source selected\n\[ERROR\] backend property not set\n''') + self.assertRegexpMatches(err, r'''\[ERROR\] error code from SyncEvolution error parsing config file \(local, status 20010\): backend not supported (by any of the backend modules \((\S+, )+\S+\) )?or not correctly configured \(backend=select backend databaseFormat= syncFormat=\)\n\[ERROR\] no datastore selected\n\[ERROR\] backend property not set\n''') self.assertEqualDiff('', out) # "foo" configured, but "bar" is not @@ -7995,7 +7995,7 @@ sources/memo/config.ini:type = todo "foo", "bar"], expectSuccess = False) - self.assertRegexpMatches(err, r'''\[ERROR\] error code from SyncEvolution error parsing config file \(local, status 20010\): bar: backend not supported (by any of the backend modules \((\S+, )+\S+\) )?or not correctly configured \(backend=select backend databaseFormat= syncFormat=\)\n\[ERROR\] source 'bar' does not exist\n\[ERROR\] backend property not set\n''') + self.assertRegexpMatches(err, r'''\[ERROR\] error code from SyncEvolution error parsing config file \(local, status 20010\): bar: backend not supported (by any of the backend modules \((\S+, )+\S+\) )?or not correctly configured \(backend=select backend databaseFormat= syncFormat=\)\n\[ERROR\] datastore 'bar' does not exist\n\[ERROR\] backend property not set\n''') self.assertEqualDiff('', out) # add "bar" source, using file backend @@ -8367,13 +8367,13 @@ END:VCARD''') out = self.stripSyncTime(out) self.assertEqualDiff('''[INFO remote@client] target side of local sync ready [INFO remote@client] @client/addressbook: starting first time sync, two-way (peer is server) -[INFO remote@client] creating complete data backup of source addressbook before sync (enabled with dumpData and needed for printChanges) +[INFO remote@client] creating complete data backup of datastore addressbook before sync (enabled with dumpData and needed for printChanges) @client data changes to be applied during synchronization: *** @client/addressbook *** Comparison was impossible. [INFO] @default/addressbook: starting first time sync, two-way (peer is client) -[INFO] creating complete data backup of source addressbook before sync (enabled with dumpData and needed for printChanges) +[INFO] creating complete data backup of datastore addressbook before sync (enabled with dumpData and needed for printChanges) @default data changes to be applied during synchronization: *** @default/addressbook *** Comparison was impossible. @@ -8462,13 +8462,13 @@ no changes out = self.stripSyncTime(out) self.assertEqualDiff('''[INFO remote@client] target side of local sync ready [INFO remote@client] @client/addressbook: starting normal sync, two-way (peer is server) -[INFO remote@client] creating complete data backup of source addressbook before sync (enabled with dumpData and needed for printChanges) +[INFO remote@client] creating complete data backup of datastore addressbook before sync (enabled with dumpData and needed for printChanges) @client data changes to be applied during synchronization: *** @client/addressbook *** no changes [INFO] @default/addressbook: starting normal sync, two-way (peer is client) -[INFO] creating complete data backup of source addressbook before sync (enabled with dumpData and needed for printChanges) +[INFO] creating complete data backup of datastore addressbook before sync (enabled with dumpData and needed for printChanges) @default data changes to be applied during synchronization: *** @default/addressbook *** no changes @@ -8544,13 +8544,13 @@ END:VCARD''') out = self.stripSyncTime(out) self.assertEqualDiff('''[INFO remote@client] target side of local sync ready [INFO remote@client] @client/addressbook: starting normal sync, two-way (peer is server) -[INFO remote@client] creating complete data backup of source addressbook before sync (enabled with dumpData and needed for printChanges) +[INFO remote@client] creating complete data backup of datastore addressbook before sync (enabled with dumpData and needed for printChanges) @client data changes to be applied during synchronization: *** @client/addressbook *** no changes [INFO] @default/addressbook: starting normal sync, two-way (peer is client) -[INFO] creating complete data backup of source addressbook before sync (enabled with dumpData and needed for printChanges) +[INFO] creating complete data backup of datastore addressbook before sync (enabled with dumpData and needed for printChanges) @default data changes to be applied during synchronization: *** @default/addressbook *** after last sync | current data @@ -8640,13 +8640,13 @@ no changes out = self.stripSyncTime(out) self.assertEqualDiff('''[INFO remote@client] target side of local sync ready [INFO remote@client] @client/addressbook: starting normal sync, two-way (peer is server) -[INFO remote@client] creating complete data backup of source addressbook before sync (enabled with dumpData and needed for printChanges) +[INFO remote@client] creating complete data backup of datastore addressbook before sync (enabled with dumpData and needed for printChanges) @client data changes to be applied during synchronization: *** @client/addressbook *** no changes [INFO] @default/addressbook: starting normal sync, two-way (peer is client) -[INFO] creating complete data backup of source addressbook before sync (enabled with dumpData and needed for printChanges) +[INFO] creating complete data backup of datastore addressbook before sync (enabled with dumpData and needed for printChanges) @default data changes to be applied during synchronization: *** @default/addressbook *** after last sync | current data @@ -8751,24 +8751,24 @@ END:VCARD''') self.assertEqualDiff('''[INFO remote@client] target side of local sync ready [INFO remote@client] @client/addressbook: starting first time sync, two-way (peer is server) [INFO remote@client] @client/calendar: starting first time sync, two-way (peer is server) -[INFO remote@client] creating complete data backup of source addressbook before sync (enabled with dumpData and needed for printChanges) +[INFO remote@client] creating complete data backup of datastore addressbook before sync (enabled with dumpData and needed for printChanges) @client data changes to be applied during synchronization: *** @client/addressbook *** Comparison was impossible. -[INFO remote@client] creating complete data backup of source calendar before sync (enabled with dumpData and needed for printChanges) +[INFO remote@client] creating complete data backup of datastore calendar before sync (enabled with dumpData and needed for printChanges) *** @client/calendar *** Comparison was impossible. [INFO] @default/addressbook: starting first time sync, two-way (peer is client) [INFO] @default/calendar: starting first time sync, two-way (peer is client) -[INFO] creating complete data backup of source addressbook before sync (enabled with dumpData and needed for printChanges) +[INFO] creating complete data backup of datastore addressbook before sync (enabled with dumpData and needed for printChanges) @default data changes to be applied during synchronization: *** @default/addressbook *** Comparison was impossible. [INFO] @default/addressbook: started -[INFO] creating complete data backup of source calendar before sync (enabled with dumpData and needed for printChanges) +[INFO] creating complete data backup of datastore calendar before sync (enabled with dumpData and needed for printChanges) *** @default/calendar *** Comparison was impossible. @@ -8867,24 +8867,24 @@ no changes self.assertEqualDiff('''[INFO remote@client] target side of local sync ready [INFO remote@client] @client/addressbook: starting normal sync, two-way (peer is server) [INFO remote@client] @client/calendar: starting normal sync, two-way (peer is server) -[INFO remote@client] creating complete data backup of source addressbook before sync (enabled with dumpData and needed for printChanges) +[INFO remote@client] creating complete data backup of datastore addressbook before sync (enabled with dumpData and needed for printChanges) @client data changes to be applied during synchronization: *** @client/addressbook *** no changes -[INFO remote@client] creating complete data backup of source calendar before sync (enabled with dumpData and needed for printChanges) +[INFO remote@client] creating complete data backup of datastore calendar before sync (enabled with dumpData and needed for printChanges) *** @client/calendar *** no changes [INFO] @default/addressbook: starting normal sync, two-way (peer is client) [INFO] @default/calendar: starting normal sync, two-way (peer is client) -[INFO] creating complete data backup of source addressbook before sync (enabled with dumpData and needed for printChanges) +[INFO] creating complete data backup of datastore addressbook before sync (enabled with dumpData and needed for printChanges) @default data changes to be applied during synchronization: *** @default/addressbook *** no changes [INFO] @default/addressbook: started -[INFO] creating complete data backup of source calendar before sync (enabled with dumpData and needed for printChanges) +[INFO] creating complete data backup of datastore calendar before sync (enabled with dumpData and needed for printChanges) *** @default/calendar *** no changes @@ -8975,18 +8975,18 @@ END:VCARD''') self.assertEqualDiff('''[INFO remote@client] target side of local sync ready [INFO remote@client] @client/addressbook: starting normal sync, two-way (peer is server) [INFO remote@client] @client/calendar: starting normal sync, two-way (peer is server) -[INFO remote@client] creating complete data backup of source addressbook before sync (enabled with dumpData and needed for printChanges) +[INFO remote@client] creating complete data backup of datastore addressbook before sync (enabled with dumpData and needed for printChanges) @client data changes to be applied during synchronization: *** @client/addressbook *** no changes -[INFO remote@client] creating complete data backup of source calendar before sync (enabled with dumpData and needed for printChanges) +[INFO remote@client] creating complete data backup of datastore calendar before sync (enabled with dumpData and needed for printChanges) *** @client/calendar *** no changes [INFO] @default/addressbook: starting normal sync, two-way (peer is client) [INFO] @default/calendar: starting normal sync, two-way (peer is client) -[INFO] creating complete data backup of source addressbook before sync (enabled with dumpData and needed for printChanges) +[INFO] creating complete data backup of datastore addressbook before sync (enabled with dumpData and needed for printChanges) @default data changes to be applied during synchronization: *** @default/addressbook *** after last sync | current data @@ -9001,7 +9001,7 @@ END:VCARD END:VCARD ------------------------------------------------------------------------------- [INFO] @default/addressbook: started -[INFO] creating complete data backup of source calendar before sync (enabled with dumpData and needed for printChanges) +[INFO] creating complete data backup of datastore calendar before sync (enabled with dumpData and needed for printChanges) *** @default/calendar *** no changes @@ -9097,18 +9097,18 @@ no changes self.assertEqualDiff('''[INFO remote@client] target side of local sync ready [INFO remote@client] @client/addressbook: starting normal sync, two-way (peer is server) [INFO remote@client] @client/calendar: starting normal sync, two-way (peer is server) -[INFO remote@client] creating complete data backup of source addressbook before sync (enabled with dumpData and needed for printChanges) +[INFO remote@client] creating complete data backup of datastore addressbook before sync (enabled with dumpData and needed for printChanges) @client data changes to be applied during synchronization: *** @client/addressbook *** no changes -[INFO remote@client] creating complete data backup of source calendar before sync (enabled with dumpData and needed for printChanges) +[INFO remote@client] creating complete data backup of datastore calendar before sync (enabled with dumpData and needed for printChanges) *** @client/calendar *** no changes [INFO] @default/addressbook: starting normal sync, two-way (peer is client) [INFO] @default/calendar: starting normal sync, two-way (peer is client) -[INFO] creating complete data backup of source addressbook before sync (enabled with dumpData and needed for printChanges) +[INFO] creating complete data backup of datastore addressbook before sync (enabled with dumpData and needed for printChanges) @default data changes to be applied during synchronization: *** @default/addressbook *** after last sync | current data @@ -9123,7 +9123,7 @@ END:VCARD < ------------------------------------------------------------------------------- [INFO] @default/addressbook: started -[INFO] creating complete data backup of source calendar before sync (enabled with dumpData and needed for printChanges) +[INFO] creating complete data backup of datastore calendar before sync (enabled with dumpData and needed for printChanges) *** @default/calendar *** no changes @@ -9219,13 +9219,13 @@ no changes [INFO remote@client] target side of local sync ready [INFO remote@client] @client/calendar: inactive [INFO remote@client] @client/addressbook: starting normal sync, two-way (peer is server) -[INFO remote@client] creating complete data backup of source addressbook before sync (enabled with dumpData and needed for printChanges) +[INFO remote@client] creating complete data backup of datastore addressbook before sync (enabled with dumpData and needed for printChanges) @client data changes to be applied during synchronization: *** @client/addressbook *** no changes [INFO] @default/addressbook: starting normal sync, two-way (peer is client) -[INFO] creating complete data backup of source addressbook before sync (enabled with dumpData and needed for printChanges) +[INFO] creating complete data backup of datastore addressbook before sync (enabled with dumpData and needed for printChanges) @default data changes to be applied during synchronization: *** @default/addressbook *** no changes