tuned signature;
authorwenzelm
Sun, 11 Dec 2022 11:47:28 +0100
changeset 76616 e6c11ef4fb51
parent 76615 b865959e2547
child 76617 d5adc9126ae8
tuned signature;
src/Pure/General/mercurial.scala
src/Pure/General/rsync.scala
--- a/src/Pure/General/mercurial.scala	Sat Dec 10 21:02:09 2022 +0100
+++ b/src/Pure/General/mercurial.scala	Sun Dec 11 11:47:28 2022 +0100
@@ -309,7 +309,7 @@
         Rsync.init(context0, target)
 
         val list =
-          Rsync.exec(context0, list = true, args = List("--", Rsync.terminate(target)))
+          Rsync.exec(context0, list = true, args = List("--", Rsync.direct(target)))
             .check.out_lines.filterNot(_.endsWith(" ."))
         if (list.nonEmpty && !list.exists(_.endsWith(Hg_Sync._NAME))) {
           error("No .hg_sync meta data in " + quote(target))
@@ -355,7 +355,7 @@
           prune_empty_dirs = true,
           filter = protect ::: filter,
           args = List("--exclude-from=" + exclude_path.implode, "--",
-            Rsync.terminate(source), target)
+            Rsync.direct(source), target)
         ).check
       }
     }
--- a/src/Pure/General/rsync.scala	Sat Dec 10 21:02:09 2022 +0100
+++ b/src/Pure/General/rsync.scala	Sun Dec 11 11:47:28 2022 +0100
@@ -59,12 +59,12 @@
             File.bash_path(init_dir) + "/.", target)).check
     }
 
-  def terminate(target: String): String =
-    if (target.endsWith(":") || target.endsWith("/")) target + "."
-    else if (target.endsWith(":.") || target.endsWith("/.")) target
-    else target + "/."
+  def direct(prefix: String): String =
+    if (prefix.endsWith(":") || prefix.endsWith("/")) prefix + "."
+    else if (prefix.endsWith(":.") || prefix.endsWith("/.")) prefix
+    else prefix + "/."
 
-  def append(target: String, rest: String): String =
-    if (target.endsWith(":") || target.endsWith("/")) target + rest
-    else target + "/" + rest
+  def append(prefix: String, suffix: String): String =
+    if (prefix.endsWith(":") || prefix.endsWith("/")) prefix + suffix
+    else prefix + "/" + suffix
 }