tuned;
authorwenzelm
Thu, 13 Oct 2016 15:44:24 +0200
changeset 64192 4c0d19b3a882
parent 64191 1dcb5acd9a71
child 64193 7a7e370e2523
tuned;
src/Pure/Admin/isabelle_cronjob.scala
--- a/src/Pure/Admin/isabelle_cronjob.scala	Thu Oct 13 15:41:30 2016 +0200
+++ b/src/Pure/Admin/isabelle_cronjob.scala	Thu Oct 13 15:44:24 2016 +0200
@@ -23,7 +23,40 @@
   val main_log = log_dir + Path.explode("main.log")  // owned by log service
 
 
-  /* task logging */
+
+  /** particular tasks **/
+
+  /* identify repository snapshots */
+
+  val isabelle_repos = main_dir + Path.explode("isabelle-build_history")
+  val afp_repos = main_dir + Path.explode("AFP-build_history")
+
+  val isabelle_identify =
+    Logger_Task("isabelle_identify", logger =>
+      {
+        def pull_repos(root: Path): String =
+        {
+          val hg = Mercurial.repository(root)
+          hg.pull(options = "-q")
+          hg.identify("tip", options = "-i")
+        }
+
+        val isabelle_id = pull_repos(isabelle_repos)
+        val afp_id = pull_repos(afp_repos)
+
+        val log_path = log_dir + Build_Log.log_path("isabelle_identify", logger.start_date)
+        Isabelle_System.mkdirs(log_path.dir)
+        File.write(log_path,
+          terminate_lines(
+            List("isabelle_identify: " + Build_Log.print_date(logger.start_date),
+              "",
+              "Isabelle version: " + isabelle_id,
+              "AFP version: " + afp_id)))
+      })
+
+
+
+  /** task logging **/
 
   sealed case class Logger_Task(name: String, body: Logger => Unit)
 
@@ -91,38 +124,6 @@
 
 
 
-  /** particular tasks **/
-
-  /* identify repository snapshots */
-
-  val isabelle_repos = main_dir + Path.explode("isabelle-build_history")
-  val afp_repos = main_dir + Path.explode("AFP-build_history")
-
-  val isabelle_identify =
-    Logger_Task("isabelle_identify", logger =>
-      {
-        def pull_repos(root: Path): String =
-        {
-          val hg = Mercurial.repository(root)
-          hg.pull(options = "-q")
-          hg.identify("tip", options = "-i")
-        }
-
-        val isabelle_id = pull_repos(isabelle_repos)
-        val afp_id = pull_repos(afp_repos)
-
-        val log_path = log_dir + Build_Log.log_path("isabelle_identify", logger.start_date)
-        Isabelle_System.mkdirs(log_path.dir)
-        File.write(log_path,
-          terminate_lines(
-            List("isabelle_identify: " + Build_Log.print_date(logger.start_date),
-              "",
-              "Isabelle version: " + isabelle_id,
-              "AFP version: " + afp_id)))
-      })
-
-
-
   /** cronjob **/
 
   def init_options(): Options = Options.load(Path.explode("~~/Admin/cronjob/cronjob.options"))