finish documentation of new dav-sync commands and options

Sun, 15 Dec 2019 16:22:08 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sun, 15 Dec 2019 16:22:08 +0100
changeset 702
444aa8fe133f
parent 701
0a48f17c729d
child 703
2e3a24b9896a

finish documentation of new dav-sync commands and options

dav/sync.c file | annotate | diff | comparison | revisions
docs/src/archive.md file | annotate | diff | comparison | revisions
docs/src/push.md file | annotate | diff | comparison | revisions
docs/src/repository-url.md file | annotate | diff | comparison | revisions
docs/src/restore.md file | annotate | diff | comparison | revisions
docs/src/sync-list-versions.md file | annotate | diff | comparison | revisions
--- 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 <directory>\n");
     fprintf(stderr, "        trash-info <directory>\n");
     fprintf(stderr, "        empty-trash <directory>\n");
+    fprintf(stderr, "        list-versions [-s <syncdir>] <file>\n");
     fprintf(stderr, "        add-tag [-s <syncdir>] <file> <tag>\n");
     fprintf(stderr, "        remove-tag [-s <syncdir>] <file> <tag>\n");
     fprintf(stderr, "        set-tags [-s <syncdir>] <file> [tags]\n");
--- 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 <tags>] <directory>`**
+**`dav-sync archive [-cldSRM] [-t <tags>] <directory>`**
 
 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 <tags>`** 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
--- 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 <tags>] <directory>`**
+**`dav-sync push [-cldrSRM] [-t <tags>] <directory>`**
 
 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 <tags>`** 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
--- 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] <name>`**
+
+**`-p`** don't include user and password in the url
+
+**Command alias:** repo-url
--- 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 <version>] [-s <directory>] [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 <version>`** Restore a specific file version. *version* must be the version name listed by [dav-sync list-versions][1]
+
+[1]: ./list-versions.html
+
+
--- /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 <syncdir>] <file>`**
+
+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 <syncdir>`** SyncDirectory for this file
+
+[1]: ./restore.html

mercurial