Fix resolving SVN URI with revision

This commit is contained in:
Sanjin Sehic 2012-02-07 11:06:09 +01:00 committed by Mark Harrah
parent 837d973fd3
commit 5232dd941e
1 changed files with 4 additions and 2 deletions

View File

@ -35,18 +35,20 @@ object Resolvers
val uri = info.uri.withoutMarkerScheme
val localCopy = uniqueSubdirectoryFor(normalized(uri), in = info.staging)
val from = uri.withoutFragment.toASCIIString
val to = localCopy.getAbsolutePath
if (uri.hasFragment) {
val revision = uri.getFragment
Some {
() => creates(localCopy) {
run("svn", "checkout", "-r", revision, uri.toASCIIString, localCopy.getAbsolutePath)
run("svn", "checkout", "-r", revision, from, to)
}
}
} else
Some {
() => creates(localCopy) {
run("svn", "checkout", uri.toASCIIString, localCopy.getAbsolutePath)
run("svn", "checkout", from, to)
}
}
}