Commits

Stefan Saasen committed c7399f3 Merge

Merged in atlassian/svn-migration-scripts/authors-command-support-svn-schema (pull request #28)

  • Participants
  • Parent commits 1034fe4, 70736b9

Comments (0)

Files changed (2)

src/main/scala/Authors.scala

   private[svn2git] def svnCommandLineOptions(url: String, credentials: Option[(String, String)]): List[String] = {
     val commonOptions = List("--xml", "--non-interactive", "-q")
     val Remote = """^(https?://.*)""".r
-    val Local = """^(file://.*)""".r
+    val Local = """^((?:svn|file)://.*)""".r
     url match {
       case Remote(_) => List("svn", "log", "--trust-server-cert", "--no-auth-cache") ++ commonOptions
         .++(credentials match {

src/test/scala/AuthorsTest.scala

     Authors.processUsername("") must beNone
   }
 
-  "test svn command line for http://" >> {
+  "test svn command line for http:// schema" >> {
     val url = "http://pug.jira.com/svn"
     Authors.svnCommandLineOptions(url, None) must be equalTo List("svn", "log", "--trust-server-cert", "--no-auth-cache", "--xml", "--non-interactive", "-q", url)
   }
 
-  "test svn command line for https://" >> {
+  "test svn command line for https:// schema" >> {
     val url = "https://pug.jira.com/svn"
     Authors.svnCommandLineOptions(url, None) must be equalTo List("svn", "log", "--trust-server-cert", "--no-auth-cache", "--xml", "--non-interactive", "-q", url)
   }
 
-  "test svn command line for file://" >> {
+  "test svn command line for file:// schema" >> {
     val url = "file:///Users/stefan/dev/svn2git/repos/a"
     Authors.svnCommandLineOptions(url, None) must be equalTo List("svn", "log", "--xml", "--non-interactive", "-q", url)
   }
 
+  "test svn command line for svn:// schema" >> {
+    val url = "svn://localhost"
+    Authors.svnCommandLineOptions(url, None) must be equalTo List("svn", "log", "--xml", "--non-interactive", "-q", url)
+  }
+
   "test svn command line for a local directory" >> {
     val url = "."
     new java.io.File(url).isDirectory must beTrue