renames dav-sync -D option to -R

Wed, 11 Jul 2018 17:07:01 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Wed, 11 Jul 2018 17:07:01 +0200
changeset 445
c525f049c8b7
parent 444
761dc4867208
child 446
cb61f2e1c25e

renames dav-sync -D option to -R

dav/sopt.c file | annotate | diff | comparison | revisions
dav/sync.c file | annotate | diff | comparison | revisions
--- a/dav/sopt.c	Wed Jul 11 16:40:07 2018 +0200
+++ b/dav/sopt.c	Wed Jul 11 17:07:01 2018 +0200
@@ -91,8 +91,8 @@
                         optchar = 't';
                         break;
                     }
-                    case 'D': {
-                        ucx_map_cstr_put(a->options, "restore-deleted", NOARG);
+                    case 'R': {
+                        ucx_map_cstr_put(a->options, "restore-removed", NOARG);
                         break;
                     }
                     case 'M': {
--- a/dav/sync.c	Wed Jul 11 16:40:07 2018 +0200
+++ b/dav/sync.c	Wed Jul 11 17:07:01 2018 +0200
@@ -171,8 +171,8 @@
     
     fprintf(stderr, "Commands:\n");
     fprintf(stderr, "        pull [-cldr] [-t <tags>] <directory>\n");
-    fprintf(stderr, "        push [-cldrDM] [-t <tags>] <directory>\n");
-    fprintf(stderr, "        archive [-cldDM] [-t <tags>] <directory>\n");
+    fprintf(stderr, "        push [-cldrRM] [-t <tags>] <directory>\n");
+    fprintf(stderr, "        archive [-cldRM] [-t <tags>] <directory>\n");
     fprintf(stderr, "        resolve-conflicts <directory>\n");
     fprintf(stderr, "        delete-conflicts <directory>\n");
     fprintf(stderr, "        trash-info <directory>\n");
@@ -1016,9 +1016,9 @@
         curl_easy_setopt(sn->handle, CURLOPT_STDERR, stderr);
     }
     
-    DavBool restore_deleted = cmd_getoption(a, "restore-deleted") ? 1 : 0;
+    DavBool restore_removed = cmd_getoption(a, "restore-removed") ? 1 : 0;
     DavBool restore_modified = cmd_getoption(a, "restore-modified") ? 1 : 0;
-    DavBool restore = restore_deleted || restore_modified;
+    DavBool restore = restore_removed || restore_modified;
     int depth = restore ? -1 : 0;
     
     DavResource *root = dav_query(sn, "select D:getetag,idav:status from / with depth = %d", depth);
@@ -1118,7 +1118,7 @@
                     db,
                     local_res,
                     svrres,
-                    restore_deleted,
+                    restore_removed,
                     restore_modified);
             if (is_changed || local_res->tags_updated) {
                 DavResource *res = dav_resource_new(sn, local_res->path);
@@ -1414,7 +1414,7 @@
         SyncDatabase *db,
         LocalResource *res,
         UcxMap *svrres,
-        DavBool restore_deleted,
+        DavBool restore_removed,
         DavBool restore_modified)
 {
     LocalResource *db_res = ucx_map_cstr_get(db->resources, res->path);
@@ -1422,7 +1422,7 @@
     if(db_res) {
         if(svrres) {
             DavResource *remote = ucx_map_cstr_get(svrres, res->path);
-            if(restore_deleted && !remote) {
+            if(restore_removed && !remote) {
                 return 1;
             }
             if(!res->isdirectory && restore_modified && remote) {

mercurial