prefer explicit progress channel;
authorwenzelm
Sun, 14 May 2017 17:19:22 +0200
changeset 65830 064925cb656f
parent 65829 07e86b942a84
child 65831 3b197547c1d4
prefer explicit progress channel;
src/Pure/Tools/imports.scala
--- a/src/Pure/Tools/imports.scala	Sun May 14 17:08:12 2017 +0200
+++ b/src/Pure/Tools/imports.scala	Sun May 14 17:19:22 2017 +0200
@@ -14,10 +14,11 @@
 {
   /* repository files */
 
-  def repository_files(start: Path, pred: JFile => Boolean = _ => true): List[JFile] =
+  def repository_files(progress: Progress, start: Path, pred: JFile => Boolean = _ => true)
+      : List[JFile] =
     Mercurial.find_repository(start) match {
       case None =>
-        Output.warning("Ignoring directory " + start + " (no Mercurial repository)")
+        progress.echo_warning("Ignoring directory " + start + " (no Mercurial repository)")
         Nil
       case Some(hg) =>
         val start_path = start.file.getCanonicalFile.toPath
@@ -121,7 +122,7 @@
       val unused_files =
         for {
           (_, dir) <- Sessions.directories(dirs, select_dirs)
-          file <- repository_files(dir, file => file.getName.endsWith(".thy"))
+          file <- repository_files(progress, dir, file => file.getName.endsWith(".thy"))
           if deps.all_known.get_file(file).isEmpty
         } yield file
       unused_files.foreach(file => progress.echo("unused file " + quote(file.toString)))