nextcloud-desktop/csync
Jocelyn Turcotte e974771796 csync: Use an explicit instruction for should_update_metadata
The current way of tracking the need to update the metadata without
propagation using a separate flag makes it difficult to track
priorities between the local and remote tree. The logic is also
difficult to logically cover since the possibilities matrix isn't
100% covered, leaving the flag only used in a few situations
(mostly involving folders, but not only).

The reason we need to change this is to be able to track the sync
state of files for overlay icons. The instruction alone can't be
used since CSYNC_INSTRUCTION_SYNC is used for folders even though
they won't be propagated. Removing this logic is however not possible
without using something else than CSYNC_INSTRUCTION_NONE since too
many codepath interpret (rightfully) this as meaning "nothing to do".

This patch adds a new CSYNC_INSTRUCTION_UPDATE_METADATA instruction
to let the update and reconcile steps tell the SyncEngine to update
the metadata of a file without any propagation. Other flags are left
to be interpretted by the implementation as implicitly needing
metadata update or not, as this was already the case for most file
propagation jobs. For example, CSYNC_INSTRUCTION_NEW for directories
now also implicitly update the metadata.

Since it's not impossible for folders to emit CSYNC_INSTRUCTION_SYNC
or CSYNC_INSTRUCTION_CONFLICT, the corresponding code paths in the
sync engine have been removed.

Since the reconcile step can now know if the local tree needs metadata
update while the remote side might want propagation, the
localMetadataUpdate logic in SyncEngine::treewalkFile now simply use
a CSYNC_INSTRUCTION_UPDATE_METADATA for the local side, which is now
implemented as a different database query.
2016-08-17 15:39:31 +02:00
..
src csync: Use an explicit instruction for should_update_metadata 2016-08-17 15:39:31 +02:00
tests tx.pl: Fix each put_to_dir taking 10 seconds 2016-08-15 15:35:53 +02:00
AUTHORS Move csync in order to merge it with mirall 2014-01-13 14:39:50 +01:00
ChangeLog Minor build etc typos 2015-09-10 13:20:11 +05:45
CMakeLists.txt Add TestSyncEngine and TestSyncFileStatusTracker auto tests 2016-08-17 15:39:30 +02:00
config_csync.h.cmake csync: remove PLUGIN install patch from cmake files 2015-12-02 13:13:41 +01:00
config_test.h.cmake fix csync BINARYDIR and SOURCEDIR 2014-01-20 16:16:29 +01:00
ConfigureChecks.cmake Add TestSyncEngine and TestSyncFileStatusTracker auto tests 2016-08-17 15:39:30 +02:00
COPYING Move csync in order to merge it with mirall 2014-01-13 14:39:50 +01:00
CTestConfig.cmake Move csync in order to merge it with mirall 2014-01-13 14:39:50 +01:00
CTestCustom.cmake Move csync in order to merge it with mirall 2014-01-13 14:39:50 +01:00
DefineOptions.cmake Move csync in order to merge it with mirall 2014-01-13 14:39:50 +01:00
INSTALL Minor build etc typos 2015-09-10 13:20:11 +05:45
README Minor build etc typos 2015-09-10 13:20:11 +05:45

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

WHAT IS CSYNC?
==============

csync is a lightweight utility to synchronize files between two directories on
a system or between multiple systems.

It synchronizes bidirectionally and allows the user to keep two copies of files
and directories in sync. csync uses widely adopted protocols, such as smb or
sftp, so that there is no need for a server component. It is a user-level
program which means you dont need to be a superuser or administrator.

CONTRIBUTIONS
=============

If you want to contribute to the development of the software then please join
the mailing list. Patches are accepted preferably created with git and we are
always glad to receive feedback or suggestions to the address
csync-devel@csync.org.
More information on the various mailing lists can be found at
http://www.csync.org/communication/.

You can also get the sourcecode straight from the git repository - see
http://git.csync.org/

DOCUMENTATION
=============

As a user you can find a userguide which is shipped with this package or is
available at the website. For developers there is doxygen documentation and
comments in the source code itself. See

http://www.csync.org/userguide/
and
http://www.csync.org/api/