avoid noise via context.progress (amending 68162e4f60a7);
authorwenzelm
Tue, 07 Jun 2022 19:23:31 +0200
changeset 75537 fbe27a50706b
parent 75536 7cdeed5dc96d
child 75538 675acdaca65c
avoid noise via context.progress (amending 68162e4f60a7);
src/Pure/General/mercurial.scala
--- a/src/Pure/General/mercurial.scala	Tue Jun 07 19:15:08 2022 +0200
+++ b/src/Pure/General/mercurial.scala	Tue Jun 07 19:23:31 2022 +0200
@@ -304,10 +304,12 @@
       require(ssh == SSH.Local, "local repository required")
 
       Isabelle_System.with_tmp_dir("sync") { tmp_dir =>
-        Rsync.init(context, target)
+        val context0 = context.copy(progress = new Progress)
+
+        Rsync.init(context0, target)
 
         val list =
-          Rsync.exec(context, list = true, args = List("--", Rsync.terminate(target)))
+          Rsync.exec(context0, list = true, args = List("--", Rsync.terminate(target)))
             .check.out_lines.filterNot(_.endsWith(" ."))
         if (list.nonEmpty && !list.exists(_.endsWith(Hg_Sync._NAME))) {
           error("No .hg_sync meta data in " + quote(target))
@@ -319,7 +321,7 @@
         val diff_content = if (is_changed) diff(rev = rev, options = "--git") else ""
         val stat_content = if (is_changed) diff(rev = rev, options = "--stat") else ""
 
-        Rsync.init(context, target,
+        Rsync.init(context0, target,
           contents =
             File.Content(Hg_Sync.PATH_ID, id_content) ::
             File.Content(Hg_Sync.PATH_LOG, log_content) ::