# HG changeset patch # User Mike Becker # Date 1554897024 -7200 # Node ID 3dffe58a573f9fa3b8649f2f8bcf3663ff5abc8a # Parent 78a25071ed88bdc76cdc62abac9f952f8561a140 adds list-conflicts command to dav-sync diff -r 78a25071ed88 -r 3dffe58a573f dav/sync.c --- a/dav/sync.c Wed Apr 10 13:48:44 2019 +0200 +++ b/dav/sync.c Wed Apr 10 13:50:24 2019 +0200 @@ -163,6 +163,8 @@ tid = start_sighandler(&mutex); ret = cmd_restore(args); stop_sighandler(&mutex, tid); + } else if(!strcmp(cmd, "list-conflicts")) { + ret = cmd_list_conflicts(args); } else if(!strcmp(cmd, "resolve-conflicts")) { ret = cmd_resolve_conflicts(args); } else if(!strcmp(cmd, "delete-conflicts")) { @@ -217,6 +219,7 @@ fprintf(stderr, " archive [-cldSRM] [-t ] \n"); fprintf(stderr, " restore [-ldRM] [-V ] [-s ] [file...]\n"); + fprintf(stderr, " list-conflicts \n"); fprintf(stderr, " resolve-conflicts \n"); fprintf(stderr, " delete-conflicts \n"); fprintf(stderr, " trash-info \n"); @@ -3841,6 +3844,62 @@ return ret; } +int cmd_list_conflicts(CmdArgs *a) { + if(a->argc != 1) { + fprintf(stderr, "Too %s arguments\n", a->argc < 1 ? "few" : "many"); + return -1; + } + + SyncDirectory *dir = scfg_get_dir(a->argv[0]); + if(!dir) { + fprintf(stderr, "Unknown sync dir: %s\n", a->argv[0]); + return -1; + } + if(scfg_check_dir(dir)) { + return -1; + } + + SyncDatabase *db = load_db(dir->database); + if(!db) { + fprintf(stderr, "Cannot load database file: %s\n", dir->database); + return -1; + } + + remove_deleted_conflicts(dir, db); + + // get all conflict sources + UcxMapIterator i = ucx_map_iterator(db->conflict); + LocalResource *res; + UcxList* conflict_sources = NULL; + UCX_MAP_FOREACH(key, res, i) { + conflict_sources = ucx_list_append(conflict_sources, res->conflict_source); + } + + // print unique conflict sources + conflict_sources = ucx_list_sort(conflict_sources, ucx_cmp_str, NULL); + UCX_FOREACH(elem, conflict_sources) { + char* path = elem->data; + if(cmd_getoption(a, "verbose")) { + int confl_count = 1; + while(elem->next && !strcmp(elem->next->data, path)) { + elem = elem->next; + ++confl_count; + } + printf("%s (%d)\n", path, confl_count); + } else { + printf("%s\n", path); + while(elem->next && !strcmp(elem->next->data, path)) { + elem = elem->next; + } + } + } + + // cleanup + destroy_db(db); + + return 0; +} + // TODO: remove code dup (main.c ls_size_str) static char* size_str(uint64_t size) { diff -r 78a25071ed88 -r 3dffe58a573f dav/sync.h --- a/dav/sync.h Wed Apr 10 13:48:44 2019 +0200 +++ b/dav/sync.h Wed Apr 10 13:50:24 2019 +0200 @@ -174,6 +174,7 @@ void remove_deleted_conflicts(SyncDirectory *dir, SyncDatabase *db); +int cmd_list_conflicts(CmdArgs *args); int cmd_resolve_conflicts(CmdArgs *args); int cmd_delete_conflicts(CmdArgs *args); diff -r 78a25071ed88 -r 3dffe58a573f docs/html/add-directory.html --- a/docs/html/add-directory.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/add-directory.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/add-repository.html --- a/docs/html/add-repository.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/add-repository.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/add-tag.html --- a/docs/html/add-tag.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/add-tag.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/archive.html --- a/docs/html/archive.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/archive.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/check-config.html --- a/docs/html/check-config.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/check-config.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/check-repositories.html --- a/docs/html/check-repositories.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/check-repositories.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/commands.html --- a/docs/html/commands.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/commands.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/configuration.html --- a/docs/html/configuration.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/configuration.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/copy.html --- a/docs/html/copy.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/copy.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/date.html --- a/docs/html/date.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/date.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/delete-conflicts.html --- a/docs/html/delete-conflicts.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/delete-conflicts.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/empty-trash.html --- a/docs/html/empty-trash.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/empty-trash.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/encryption.html --- a/docs/html/encryption.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/encryption.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/export.html --- a/docs/html/export.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/export.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/get-property.html --- a/docs/html/get-property.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/get-property.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/get.html --- a/docs/html/get.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/get.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/getting-started.html --- a/docs/html/getting-started.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/getting-started.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/import.html --- a/docs/html/import.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/import.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/index.html --- a/docs/html/index.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/index.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/info.html --- a/docs/html/info.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/info.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/introduction.html --- a/docs/html/introduction.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/introduction.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/list-conflicts.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/html/list-conflicts.html Wed Apr 10 13:50:24 2019 +0200 @@ -0,0 +1,86 @@ + + + + + + + dav-sync list-conflicts + + + + + + + + +
    + +

    dav-sync list-conflicts [-v] <directory>

    +

    Lists all conflicting files. If verbose output is enabled, the output also shows the number of entries for the same conflicting file.

    +

    For each conflict a backup file with the pattern orig.N.filename has been created. You can resolve the conflict by either deleting the backup, or replacing the conflicting file with the backup. In either case you don't need to do anything more and dav-sync will remove the conflict from the database automatically. You can also use the delete-conflicts command to bulk-delete all backups (in case you want to proceed with the upstream version of your files) or the resolve-conflicts command to forcefully clear the conflict database.

    +
    + + + diff -r 78a25071ed88 -r 3dffe58a573f docs/html/list-directories.html --- a/docs/html/list-directories.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/list-directories.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/list-repositories.html --- a/docs/html/list-repositories.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/list-repositories.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/list-tags.html --- a/docs/html/list-tags.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/list-tags.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/list.html --- a/docs/html/list.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/list.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/lock.html --- a/docs/html/lock.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/lock.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/mkdir.html --- a/docs/html/mkdir.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/mkdir.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/move.html --- a/docs/html/move.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/move.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/pull.html --- a/docs/html/pull.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/pull.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/push.html --- a/docs/html/push.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/push.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/put.html --- a/docs/html/put.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/put.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/remove-property.html --- a/docs/html/remove-property.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/remove-property.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/remove-repository.html --- a/docs/html/remove-repository.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/remove-repository.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/remove-tag.html --- a/docs/html/remove-tag.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/remove-tag.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/remove.html --- a/docs/html/remove.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/remove.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/resolve-conflicts.html --- a/docs/html/resolve-conflicts.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/resolve-conflicts.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • @@ -77,7 +78,7 @@

    dav-sync resolve-conflicts

    dav-sync resolve-conflicts <directory>

    -

    Removes conflict entries from the database. This does not merge any files. All files which are marked as conflict are normal files after running this command. In other words: by executing this command you assert that you have resolved the conflicts.

    +

    Forcefully clears the conflict database. This does not merge any files. All files which are marked as conflict are normal files after running this command and will be uploaded at the next push. In other words: by executing this command you assert that you have resolved the conflicts. Usually you will not need this command.

    diff -r 78a25071ed88 -r 3dffe58a573f docs/html/set-property.html --- a/docs/html/set-property.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/set-property.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/set-tags.html --- a/docs/html/set-tags.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/set-tags.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/sync-check-config.html --- a/docs/html/sync-check-config.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/sync-check-config.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/sync-commands.html --- a/docs/html/sync-commands.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/sync-commands.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/sync-configuration.html --- a/docs/html/sync-configuration.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/sync-configuration.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/trash-info.html --- a/docs/html/trash-info.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/trash-info.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/html/unlock.html --- a/docs/html/unlock.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/html/unlock.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/man/dav-sync.1.man --- a/docs/man/dav-sync.1.man Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/man/dav-sync.1.man Wed Apr 10 13:50:24 2019 +0200 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pandoc 1.16.0.2 +.\" Automatically generated by Pandoc 1.19.2.4 .\" .TH "DAV\-SYNC" "1" "July 1, 2018" "Version 1.2" "DavUtils User Manuals" .hy @@ -41,13 +41,21 @@ .RS .RE .TP +.B list\-conflicts [\f[B]\-v\f[]] \f[I]directory\f[] +Lists all conflicting files. +If verbose output is enabled, the output also shows the number of +entries for the same conflicting file. +.RS +.RE +.TP .B resolve\-conflicts \f[I]directory\f[] -Removes conflict entries from the database. +Forcefully clears the conflict database. This does not merge any files. All files which are marked as conflict are normal files after running this command. In other words: by executing this command you assert that \f[B]you\f[] have resolved the conflicts. +Usually you will never need this command. .RS .RE .TP diff -r 78a25071ed88 -r 3dffe58a573f docs/src/dav-sync.1.md --- a/docs/src/dav-sync.1.md Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/src/dav-sync.1.md Wed Apr 10 13:50:24 2019 +0200 @@ -33,11 +33,15 @@ the push command (with the same conflict behavior), however it does not delete files on the server. +list-conflicts [**-v**] *directory* +: Lists all conflicting files. If verbose output is enabled, the output also + shows the number of entries for the same conflicting file. + resolve-conflicts *directory* -: Removes conflict entries from the database. This does not merge any files. +: Forcefully clears the conflict database. This does not merge any files. All files which are marked as conflict are normal files after running this command. In other words: by executing this command you assert that **you** - have resolved the conflicts. + have resolved the conflicts. Usually you will never need this command. delete-conflicts *directory* : Deletes all files that are marked as a conflict. This will always delete diff -r 78a25071ed88 -r 3dffe58a573f docs/src/header.html --- a/docs/src/header.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/src/header.html Wed Apr 10 13:50:24 2019 +0200 @@ -42,6 +42,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/src/index.html --- a/docs/src/index.html Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/src/index.html Wed Apr 10 13:50:24 2019 +0200 @@ -53,6 +53,7 @@
  • pull
  • push
  • archive
  • +
  • list-conflicts
  • resolve-conflicts
  • delete-conflicts
  • trash-info
  • diff -r 78a25071ed88 -r 3dffe58a573f docs/src/list-conflicts.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/src/list-conflicts.md Wed Apr 10 13:50:24 2019 +0200 @@ -0,0 +1,21 @@ +--- +title: 'dav-sync list-conflicts' +--- + +**`dav-sync list-conflicts [-v] `** + +Lists all conflicting files. If verbose output is enabled, the output also +shows the number of entries for the same conflicting file. + +For each conflict a backup file with the pattern `orig.N.filename` has been +created. +You can resolve the conflict by either deleting the backup, or replacing the +conflicting file with the backup. +In either case you don't need to do anything more and `dav-sync` will remove +the conflict from the database automatically. +You can also use the [delete-conflicts][1] command to bulk-delete all backups +(in case you want to proceed with the upstream version of your files) or the +[resolve-conflicts][2] command to forcefully clear the conflict database. + +[1]: ./delete-conflicts.html +[2]: ./resolve-conflicts.html diff -r 78a25071ed88 -r 3dffe58a573f docs/src/resolve-conflicts.md --- a/docs/src/resolve-conflicts.md Wed Apr 10 13:48:44 2019 +0200 +++ b/docs/src/resolve-conflicts.md Wed Apr 10 13:50:24 2019 +0200 @@ -4,6 +4,8 @@ **`dav-sync resolve-conflicts `** -Removes conflict entries from the database. This does not merge any files. All files which are marked as conflict are normal files after running this command. +Forcefully clears the conflict database. This does not merge any files. +All files which are marked as conflict are normal files after running this command and will be uploaded at the next push. In other words: by executing this command you assert that *you* have resolved the conflicts. +Usually you will not need this command.