# HG changeset patch # User Olaf Wintermann # Date 1576423328 -3600 # Node ID 444aa8fe133f1745d00a4d0bda1ddacd15f3bce3 # Parent 0a48f17c729d2f514074592c388a3ed63aa219b8 finish documentation of new dav-sync commands and options diff -r 0a48f17c729d -r 444aa8fe133f dav/sync.c --- a/dav/sync.c Sun Dec 15 13:48:31 2019 +0100 +++ b/dav/sync.c Sun Dec 15 16:22:08 2019 +0100 @@ -282,6 +282,7 @@ fprintf(stderr, " delete-conflicts \n"); fprintf(stderr, " trash-info \n"); fprintf(stderr, " empty-trash \n"); + fprintf(stderr, " list-versions [-s ] \n"); fprintf(stderr, " add-tag [-s ] \n"); fprintf(stderr, " remove-tag [-s ] \n"); fprintf(stderr, " set-tags [-s ] [tags]\n"); diff -r 0a48f17c729d -r 444aa8fe133f docs/src/archive.md --- a/docs/src/archive.md Sun Dec 15 13:48:31 2019 +0100 +++ b/docs/src/archive.md Sun Dec 15 16:22:08 2019 +0100 @@ -2,7 +2,7 @@ title: 'dav-sync archive' --- -**`dav-sync archive [-cld] [-t ] `** +**`dav-sync archive [-cldSRM] [-t ] `** Uploads all new and modified files to the server. The command is similar to the push command, however it does not delete files on the server. @@ -15,3 +15,9 @@ **`-d`** Don't lock the repository (default) **`-t `** Only sync files that match the tag filter expression + +**`-S`** Save the previous file version, before replacing it + +**`-R`** Upload files, that were deleted on the server since last sync, but still locally available + +**`-M`** Upload files, that were modified on the server since last sync diff -r 0a48f17c729d -r 444aa8fe133f docs/src/push.md --- a/docs/src/push.md Sun Dec 15 13:48:31 2019 +0100 +++ b/docs/src/push.md Sun Dec 15 16:22:08 2019 +0100 @@ -2,7 +2,7 @@ title: 'dav-sync push' --- -**`dav-sync push [-cldr] [-t ] `** +**`dav-sync push [-cldrSRM] [-t ] `** Pushes all local changes to the server. This uploads all locally modified files and deletes all locally deleted files on the server. @@ -17,3 +17,9 @@ **`-t `** Only sync files that match the tag filter expression **`-r`** Remove resources not matching the tag filter + +**`-S`** Save the previous file version, before replacing it + +**`-R`** Upload files, that were deleted on the server since last sync, but still locally available + +**`-M`** Upload files, that were modified on the server since last sync diff -r 0a48f17c729d -r 444aa8fe133f docs/src/repository-url.md --- a/docs/src/repository-url.md Sun Dec 15 13:48:31 2019 +0100 +++ b/docs/src/repository-url.md Sun Dec 15 16:22:08 2019 +0100 @@ -0,0 +1,11 @@ +--- +title: 'dav repository-url' +--- + +Prints the url of an repository. + +**`dav repository-url [-p] `** + +**`-p`** don't include user and password in the url + +**Command alias:** repo-url diff -r 0a48f17c729d -r 444aa8fe133f docs/src/restore.md --- a/docs/src/restore.md Sun Dec 15 13:48:31 2019 +0100 +++ b/docs/src/restore.md Sun Dec 15 16:22:08 2019 +0100 @@ -0,0 +1,23 @@ +--- +title: 'dav-sync restore' +--- + +**`dav-sync restore [-ldRM] [-V ] [-s ] [file...]`** + +Restores local files by downloading them from the server. The *file* argument can be a local absolute or relative file path. + +If no files are specified, a sync directory must be specified with the *-s* option. + +**`-l`** Lock the repository before accessing it. After `restore` completed, the repository is unlocked + +**`-d`** Don't lock the repository (default) + +**`-R`** Restore only files, that were locally removed + +**`-M`** Restore only files, that were locally modified + +**`-V `** Restore a specific file version. *version* must be the version name listed by [dav-sync list-versions][1] + +[1]: ./list-versions.html + + diff -r 0a48f17c729d -r 444aa8fe133f docs/src/sync-list-versions.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/src/sync-list-versions.md Sun Dec 15 16:22:08 2019 +0100 @@ -0,0 +1,26 @@ +--- +title: 'dav-sync list-versions' +--- + +**`dav-sync list-versions [-s ] `** + +Lists all available versions of a SyncDirectory file. Example: + + $ dav-sync list-versions test.txt + name: 1576420562-69ba29c77659c2db + lastmodified: Sun, 15 Dec 2019 10:39:30 GMT + url: https://example.com/webdav/.history/157/1576420562-69ba29c77659c2db + + name: 1576420572-b6a1862b0b1c04e6 + lastmodified: Sun, 15 Dec 2019 11:12:28 GMT + url: https://example.com/webdav/.history/157/1576420572-b6a1862b0b1c04e6 + + name: 1576420613-8b1260a7a6943580 + lastmodified: Sun, 15 Dec 2019 15:33:06 GMT + url: https://example.com/webdav/.history/157/1576420613-8b1260a7a6943580 + +The name of a version can be used to restore a previous file version with the [dav-sync restore][1] command. + +**`-s `** SyncDirectory for this file + +[1]: ./restore.html