more robust;
authorwenzelm
Sun, 16 Oct 2016 17:10:24 +0200
changeset 64255 a9f540881611
parent 64254 b1aef25ce8df
child 64256 c3197aeae90b
more robust;
src/Pure/General/mercurial.scala
--- a/src/Pure/General/mercurial.scala	Sun Oct 16 16:58:09 2016 +0200
+++ b/src/Pure/General/mercurial.scala	Sun Oct 16 17:10:24 2016 +0200
@@ -35,6 +35,10 @@
     source: String, root: Path, options: String = "", ssh: Option[SSH.Session] = None): Repository =
   {
     val hg = new Repository(root, ssh)
+    ssh match {
+      case None => Isabelle_System.mkdirs(hg.root.dir)
+      case Some(session) => using(session.sftp())(_.mkdirs(hg.root.dir))
+    }
     hg.command("clone", File.bash_string(source) + " " + File.bash_path(hg.root), options).check
     hg
   }