diff options
author | Paul Phillips <paulp@improving.org> | 2011-12-08 16:52:53 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-12-08 16:56:06 -0800 |
commit | 8e709180304327fd07c741f9817bbc74adca584e (patch) | |
tree | 01f757f6b1366f4cbade455af02a7d3c6176a685 /project/build/SVN.scala | |
parent | a8da940cb62d7a57ef4d405a176223c02479c779 (diff) | |
download | scala-8e709180304327fd07c741f9817bbc74adca584e.tar.gz scala-8e709180304327fd07c741f9817bbc74adca584e.tar.bz2 scala-8e709180304327fd07c741f9817bbc74adca584e.zip |
Deleted the sbt 0.7 project.
Pretty sure nobody's using this? Let's make some space
for our upcoming friend the 0.11 project.
Diffstat (limited to 'project/build/SVN.scala')
-rw-r--r-- | project/build/SVN.scala | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/project/build/SVN.scala b/project/build/SVN.scala deleted file mode 100644 index 427469eb64..0000000000 --- a/project/build/SVN.scala +++ /dev/null @@ -1,36 +0,0 @@ -import sbt._ - -/** - * @param root the root of an svn repository - * @author Moix Grégory - */ -class SVN(root: Path) { - /** Location of tool which parses svn revision in git-svn repository. */ - val GitSvnRevTool = root / "tools" / "get-scala-revision" - val GitSvnRegex = """^Revision:\s*(\d+).*""".r - - /** - * Gets the revision number of the repository given through the constructor of the class - * It assumes that svn or git is installed on the running computer. Return 0 if it was not - * able to found the revision number - */ - def getRevisionNumber: Int = getSvn orElse getGit getOrElse 0 - def getSvn: Option[Int] = { - /** Doing this the hard way trying to suppress the svn error message - * on stderr. Could not figure out how to do it simply in sbt. - */ - val pb = new java.lang.ProcessBuilder("svn", "info") - pb directory root.asFile - pb redirectErrorStream true - - Process(pb).lines_! foreach { - case GitSvnRegex(rev) => return Some(rev.toInt) - case _ => () - } - None - } - - def getGit: Option[Int] = - try { Some(Process(GitSvnRevTool.toString, root).!!.trim.toInt) } - catch { case _: Exception => None } -} |