From f49c16993a822c3c9e74f4d25d33711db67a590a Mon Sep 17 00:00:00 2001 From: neoramon Date: Thu, 9 Jun 2016 20:36:24 -0300 Subject: [PATCH] https://github.com/sbt/sbt-release/issues/155 java.lang.IllegalArgumentException: requirement failed: No /trunk, /branches or /tags part found in svn url #155 --- src/main/scala/Vcs.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/scala/Vcs.scala b/src/main/scala/Vcs.scala index 2d6f312..319efa1 100644 --- a/src/main/scala/Vcs.scala +++ b/src/main/scala/Vcs.scala @@ -208,10 +208,10 @@ class Subversion(val baseDir: File) extends Vcs { override def status: ProcessBuilder = cmd("status", "-q") lazy val workingDirSvnUrl:String = { - val svnInfo = cmd("info").!! val svnInfoUrlKey = "URL: " + val svnInfo: String = cmd("info").lines.mkString("\n") val urlStartIdx = svnInfo.indexOf(svnInfoUrlKey) + svnInfoUrlKey.length - svnInfo.substring(urlStartIdx, svnInfo.indexOf('\n', urlStartIdx)-1) + svnInfo.substring(urlStartIdx, svnInfo.indexOf('\n', urlStartIdx)).trim } lazy val repoRoot:String = { @@ -220,7 +220,7 @@ class Subversion(val baseDir: File) extends Vcs { workingDirSvnUrl.indexOf("/branches"), workingDirSvnUrl.indexOf("/tags") ).filter(_ >= 0) - require(!svnBaseUrlEndIdxOptions.isEmpty, "No /trunk, /branches or /tags part found in svn url. Base url cannot be extracted.") + require(!svnBaseUrlEndIdxOptions.isEmpty, "No /trunk, /branches or /tags part found in svn url. Base url cannot be extracted. Url: " + workingDirSvnUrl) val svnBaseUrlEndIdx = svnBaseUrlEndIdxOptions.head workingDirSvnUrl.substring(0, svnBaseUrlEndIdx + 1) }