summaryrefslogtreecommitdiff
path: root/project/build/SVN.scala
diff options
context:
space:
mode:
authormoix <moix@epfl.ch>2010-09-07 09:38:32 +0000
committermoix <moix@epfl.ch>2010-09-07 09:38:32 +0000
commit4dcc11418333491b4cb2ed8429e723c42034699d (patch)
treed8c37411a391b5045b36ad2be2ae86e0929c3551 /project/build/SVN.scala
parent441956b5230a8e9389cdc4a78362c842ba9731ea (diff)
downloadscala-4dcc11418333491b4cb2ed8429e723c42034699d.tar.gz
scala-4dcc11418333491b4cb2ed8429e723c42034699d.tar.bz2
scala-4dcc11418333491b4cb2ed8429e723c42034699d.zip
Stability testing task added.
Diffstat (limited to 'project/build/SVN.scala')
-rw-r--r--project/build/SVN.scala9
1 files changed, 3 insertions, 6 deletions
diff --git a/project/build/SVN.scala b/project/build/SVN.scala
index e05c949587..2d9fb9259b 100644
--- a/project/build/SVN.scala
+++ b/project/build/SVN.scala
@@ -12,11 +12,10 @@ class SVN(root: Path) {
/**
* Gets the revision number of the repository given through the constructor of the class
- * It assumes that svn is installed on the running computer.
+ * 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 {
- throw new UnableToGetRevisionNumberException
- }
+ def getRevisionNumber: Int = getSvn orElse getGit getOrElse 0
def getSvn: Option[Int] = {
val svnInfo = Process("svn info", root)
val out = new ByteArrayOutputStream
@@ -36,5 +35,3 @@ class SVN(root: Path) {
try { Some(Process(GitSvnRevTool.toString, root).!!.trim.toInt) }
catch { case _: Exception => None }
}
-
-class UnableToGetRevisionNumberException extends RuntimeException \ No newline at end of file