From dd69d68810fcf7ef7d81c9392a03e2ef4dbf7bf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=B5ivo=20Leedj=C3=A4rv?= Date: Mon, 21 Oct 2024 09:54:41 +0200 Subject: [PATCH 1/2] Deprecate the external copy mechanism (copyprog) This code is not being maintained by anyone and there is a profound lack of evidence supporting any need/benefit for this feature (which is not meant to say there couldn't be _any_ benefit to it). --- src/copy.ml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/copy.ml b/src/copy.ml index 9ab9314eb..e463fea51 100644 --- a/src/copy.ml +++ b/src/copy.ml @@ -878,6 +878,7 @@ let rec registerFileTransfer pathTo fp f = let copyprog = Prefs.createString "copyprog" "rsync --partial --inplace --compress" ~category:(`Advanced `General) + ~deprecated:true "external program for copying large files" ("A string giving the name of an " ^ "external program that can be used to copy large files efficiently " @@ -889,6 +890,7 @@ let copyprogrest = Prefs.createString "copyprogrest" "rsync --partial --append-verify --compress" ~category:(`Advanced `General) + ~deprecated:true "variant of copyprog for resuming partial transfers" ("A variant of {\\tt copyprog} that names an external program " ^ "that should be used to continue the transfer of a large file " @@ -901,6 +903,7 @@ let copyprogrest = let copythreshold = Prefs.createInt "copythreshold" (-1) ~category:(`Advanced `General) + ~deprecated:true "use copyprog on files bigger than this (if >=0, in Kb)" ("A number indicating above what filesize (in kilobytes) Unison should " ^ "use the external " @@ -917,6 +920,7 @@ let () = Prefs.markRemoved "copyquoterem" let copymax = Prefs.createInt "copymax" 1 ~category:(`Advanced `General) + ~deprecated:true "maximum number of simultaneous copyprog transfers" ("A number indicating how many instances of the external copying utility \ Unison is allowed to run simultaneously (default to 1).") From 46ab00c8e69f3357abfb94938bd9b863798292a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=B5ivo=20Leedj=C3=A4rv?= Date: Mon, 21 Oct 2024 10:07:57 +0200 Subject: [PATCH 2/2] Regen strings.ml --- src/strings.ml | 50 +++++++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/src/strings.ml b/src/strings.ml index bf80bf920..250a1a5d9 100644 --- a/src/strings.ml +++ b/src/strings.ml @@ -1190,10 +1190,13 @@ let docs = \032 Other:\n\ \032 -addprefsto xxx file to add new prefs to\n\ \032 -contactquietly suppress the 'contacting server' message during startup\n\ - \032 -copymax n maximum number of simultaneous copyprog transfers\n\ - \032 -copyprog xxx external program for copying large files\n\ - \032 -copyprogrest xxx variant of copyprog for resuming partial transfers\n\ - \032 -copythreshold n use copyprog on files bigger than this (if >=0, in Kb)\n\ + \032 -copymax n (deprecated) maximum number of simultaneous copyprog\n\ + \032 transfers\n\ + \032 -copyprog xxx (deprecated) external program for copying large files\n\ + \032 -copyprogrest xxx (deprecated) variant of copyprog for resuming partial\n\ + \032 transfers\n\ + \032 -copythreshold n (deprecated) use copyprog on files bigger than this (if\n\ + \032 >=0, in Kb)\n\ \032 -diff xxx set command for showing differences between files\n\ \032 -ignorelocks ignore locks left over from previous run (dangerous!)\n\ \032 -include xxx include a profile's preferences\n\ @@ -1382,8 +1385,9 @@ let docs = \032 server\226\128\153 message (which some users find annoying) during startup.\n\ \n\ \032 copymax n\n\ - \032 A number indicating how many instances of the external copying\n\ - \032 utility Unison is allowed to run simultaneously (default to 1).\n\ + \032 (Deprecated) A number indicating how many instances of the\n\ + \032 external copying utility Unison is allowed to run simultaneously\n\ + \032 (default to 1).\n\ \n\ \032 copyonconflict\n\ \032 When this flag is set, Unison will make a copy of files that\n\ @@ -1395,27 +1399,27 @@ let docs = \032 preferences.\n\ \n\ \032 copyprog xxx\n\ - \032 A string giving the name of an external program that can be used\n\ - \032 to copy large files efficiently (plus command-line switches\n\ - \032 telling it to copy files in-place). The default setting invokes\n\ - \032 rsync with appropriate options\226\128\148most users should not need to\n\ - \032 change it.\n\ + \032 (Deprecated) A string giving the name of an external program\n\ + \032 that can be used to copy large files efficiently (plus\n\ + \032 command-line switches telling it to copy files in-place). The\n\ + \032 default setting invokes rsync with appropriate options\226\128\148most\n\ + \032 users should not need to change it.\n\ \n\ \032 copyprogrest xxx\n\ - \032 A variant of copyprog that names an external program that should\n\ - \032 be used to continue the transfer of a large file that has\n\ - \032 already been partially transferred. Typically, copyprogrest will\n\ - \032 just be copyprog with one extra option (e.g., --partial, for\n\ - \032 rsync). The default setting invokes rsync with appropriate\n\ - \032 options\226\128\148most users should not need to change it.\n\ + \032 (Deprecated) A variant of copyprog that names an external\n\ + \032 program that should be used to continue the transfer of a large\n\ + \032 file that has already been partially transferred. Typically,\n\ + \032 copyprogrest will just be copyprog with one extra option (e.g.,\n\ + \032 --partial, for rsync). The default setting invokes rsync with\n\ + \032 appropriate options\226\128\148most users should not need to change it.\n\ \n\ \032 copythreshold n\n\ - \032 A number indicating above what filesize (in kilobytes) Unison\n\ - \032 should use the external copying utility specified by copyprog.\n\ - \032 Specifying 0 will cause all copies to use the external program;\n\ - \032 a negative number will prevent any files from using it. The\n\ - \032 default is -1. See the section \226\128\156Making Unison Faster on Large\n\ - \032 Files\226\128\157 for more information.\n\ + \032 (Deprecated) A number indicating above what filesize (in\n\ + \032 kilobytes) Unison should use the external copying utility\n\ + \032 specified by copyprog. Specifying 0 will cause all copies to use\n\ + \032 the external program; a negative number will prevent any files\n\ + \032 from using it. The default is -1. See the section \226\128\156Making Unison\n\ + \032 Faster on Large Files\226\128\157 for more information.\n\ \n\ \032 debug xxx\n\ \032 This preference is used to make Unison print various sorts of\n\