Skip to content

Commit

Permalink
[FIXED JENKINS-9525] svn revision number returns an error.
Browse files Browse the repository at this point in the history
  • Loading branch information
sogabe committed Apr 30, 2011
1 parent daec16a commit adf6db9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/hudson/scm/SubversionSCM.java
Expand Up @@ -2270,7 +2270,8 @@ private static Map describeBean(Object o) throws InvocationTargetException, NoSu
private static String getUrlWithoutRevision(
String remoteUrlPossiblyWithRevision) {
int idx = remoteUrlPossiblyWithRevision.lastIndexOf('@');
if (idx > 0) {
int slashIdx = remoteUrlPossiblyWithRevision.lastIndexOf('/');
if (idx > 0 && idx > slashIdx) {
String n = remoteUrlPossiblyWithRevision.substring(idx + 1);
SVNRevision r = SVNRevision.parse(n);
if ((r != null) && (r.isValid())) {
Expand All @@ -2288,7 +2289,8 @@ private static String getUrlWithoutRevision(
private static SVNRevision getRevisionFromRemoteUrl(
String remoteUrlPossiblyWithRevision) {
int idx = remoteUrlPossiblyWithRevision.lastIndexOf('@');
if (idx > 0) {
int slashIdx = remoteUrlPossiblyWithRevision.lastIndexOf('/');
if (idx > 0 && idx > slashIdx) {
String n = remoteUrlPossiblyWithRevision.substring(idx + 1);
return SVNRevision.parse(n);
}
Expand Down

0 comments on commit adf6db9

Please sign in to comment.