equal
deleted
inserted
replaced
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 { |