src/Pure/General/ssh.scala
changeset 71562 794c8b0ad8f1
parent 71549 319599ba28cf
child 71564 03133befa33b
equal deleted inserted replaced
71561:1d8b6c2253e6 71562:794c8b0ad8f1
   315     def host: String = if (session.getHost == null) "" else session.getHost
   315     def host: String = if (session.getHost == null) "" else session.getHost
   316 
   316 
   317     override def hg_url: String =
   317     override def hg_url: String =
   318       "ssh://" + user_prefix(nominal_user) + nominal_host + "/"
   318       "ssh://" + user_prefix(nominal_user) + nominal_host + "/"
   319 
   319 
   320     override def prefix: String =
       
   321       user_prefix(session.getUserName) + host + port_suffix(session.getPort) + ":"
       
   322 
       
   323     override def toString: String =
   320     override def toString: String =
   324       user_prefix(session.getUserName) + host + port_suffix(session.getPort) +
   321       user_prefix(session.getUserName) + host + port_suffix(session.getPort) +
   325       (if (session.isConnected) "" else " (disconnected)")
   322       (if (session.isConnected) "" else " (disconnected)")
   326 
   323 
   327 
   324 
   478   /* system operations */
   475   /* system operations */
   479 
   476 
   480   trait System
   477   trait System
   481   {
   478   {
   482     def hg_url: String = ""
   479     def hg_url: String = ""
   483     def prefix: String = ""
       
   484 
   480 
   485     def expand_path(path: Path): Path = path.expand
   481     def expand_path(path: Path): Path = path.expand
   486     def bash_path(path: Path): String = File.bash_path(path)
   482     def bash_path(path: Path): String = File.bash_path(path)
   487     def is_dir(path: Path): Boolean = path.is_dir
   483     def is_dir(path: Path): Boolean = path.is_dir
   488     def is_file(path: Path): Boolean = path.is_file
   484     def is_file(path: Path): Boolean = path.is_file