start jobs even if repository is unreachable, e.g. due to high load;
authorFabian Huch <huch@in.tum.de>
Thu, 27 Mar 2025 10:45:33 +0100
changeset 82352 fedac12c7e0e
parent 82351 882b80bd10c8
child 82354 35a219e372b0
start jobs even if repository is unreachable, e.g. due to high load;
src/Pure/Build/build_manager.scala
--- a/src/Pure/Build/build_manager.scala	Wed Mar 26 21:11:04 2025 +0000
+++ b/src/Pure/Build/build_manager.scala	Thu Mar 27 10:45:33 2025 +0100
@@ -871,7 +871,10 @@
     val rsync_context = Rsync.Context()
 
     private def sync(repository: Mercurial.Repository, rev: String, target: Path): String = {
-      repository.pull()
+      val pull_result = Exn.capture(repository.pull())
+      if (Exn.is_exn(pull_result)) {
+        echo_error_message("Could not read from repository: " + Exn.the_exn(pull_result).getMessage)
+      }
 
       if (rev.nonEmpty) repository.sync(rsync_context, target, rev = rev)