src/Pure/General/mercurial.scala
changeset 64233 ef6f7e8a018c
parent 64232 367d83d6030e
child 64252 e84cba30d7ff
equal deleted inserted replaced
64232:367d83d6030e 64233:ef6f7e8a018c
    42   def setup_repository(source: String, root: Path, ssh: Option[SSH.Session] = None): Repository =
    42   def setup_repository(source: String, root: Path, ssh: Option[SSH.Session] = None): Repository =
    43     ssh match {
    43     ssh match {
    44       case None => if (root.is_dir) repository(root) else clone_repository(source, root)
    44       case None => if (root.is_dir) repository(root) else clone_repository(source, root)
    45       case Some(session) =>
    45       case Some(session) =>
    46         using(session.sftp())(sftp =>
    46         using(session.sftp())(sftp =>
    47           if (sftp.is_dir(sftp.path(root))) repository(root, ssh = ssh)
    47           if (sftp.is_dir(root)) repository(root, ssh = ssh)
    48           else clone_repository(source, root, ssh = ssh))
    48           else clone_repository(source, root, ssh = ssh))
    49     }
    49     }
    50 
    50 
    51   class Repository private[Mercurial](root_path: Path, ssh: Option[SSH.Session])
    51   class Repository private[Mercurial](root_path: Path, ssh: Option[SSH.Session])
    52   {
    52   {