clarified command-line;
authorwenzelm
Tue, 13 Sep 2022 10:34:52 +0200
changeset 76134 c6e0a51f2a93
parent 76133 c5fd7947f585
child 76135 a144603170b4
clarified command-line;
src/Pure/General/mercurial.scala
src/Pure/Tools/sync.scala
--- a/src/Pure/General/mercurial.scala	Tue Sep 13 10:14:44 2022 +0200
+++ b/src/Pure/General/mercurial.scala	Tue Sep 13 10:34:52 2022 +0200
@@ -561,8 +561,8 @@
     Isabelle_Tool("hg_sync", "synchronize Mercurial repository with target directory",
       Scala_Project.here, { args =>
         var filter: List[String] = Nil
+        var protect_args = false
         var root: Option[Path] = None
-        var protect_args = false
         var thorough = false
         var dry_run = false
         var rev = ""
@@ -575,10 +575,9 @@
   Options are:
     -F RULE      add rsync filter RULE
                  (e.g. "protect /foo" to avoid deletion)
+    -P           protect spaces in target file names: more robust, less portable
     -R ROOT      explicit repository root directory
                  (default: implicit from current directory)
-    -S           robust (but less portable) treatment of spaces in
-                 file and directory names on the target
     -T           thorough treatment of file content and directory times
     -n           no changes: dry-run
     -r REV       explicit revision (default: state of working directory)
@@ -589,8 +588,8 @@
   which can be local or remote (using notation of rsync).
 """,
           "F:" -> (arg => filter = filter ::: List(arg)),
+          "P" -> (_ => protect_args = true),
           "R:" -> (arg => root = Some(Path.explode(arg))),
-          "S" -> (_ => protect_args = true),
           "T" -> (_ => thorough = true),
           "n" -> (_ => dry_run = true),
           "r:" -> (arg => rev = arg),
--- a/src/Pure/Tools/sync.scala	Tue Sep 13 10:14:44 2022 +0200
+++ b/src/Pure/Tools/sync.scala	Tue Sep 13 10:34:52 2022 +0200
@@ -101,8 +101,7 @@
     -I NAME      include session heap image and build database
                  (based on accidental local state)
     -J           preserve *.jar files
-    -S           robust (but less portable) treatment of spaces in
-                 file and directory names on the target
+    -P           protect spaces in target file names: more robust, less portable
     -T           thorough treatment of file content and directory times
     -a REV       explicit AFP revision (default: state of working directory)
     -n           no changes: dry-run
@@ -116,7 +115,7 @@
           "H" -> (_ => purge_heaps = true),
           "I:" -> (arg => session_images = session_images ::: List(arg)),
           "J" -> (_ => preserve_jars = true),
-          "S" -> (_ => protect_args = true),
+          "P" -> (_ => protect_args = true),
           "T" -> (_ => thorough = true),
           "a:" -> (arg => afp_rev = arg),
           "n" -> (_ => dry_run = true),