Skip to content

Commit

Permalink
[JENKINS-32169] SVNRepository.getRepositoryRoot(false) can return nul…
Browse files Browse the repository at this point in the history
…l when one uses svn:// and file:// protocols
  • Loading branch information
recena committed Jan 4, 2016
1 parent 7304b13 commit 0880857
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/hudson/scm/SubversionSCM.java
Expand Up @@ -3092,7 +3092,7 @@ public FormValidation checkCredentialsId(StaplerRequest req, @Nonnull Item conte
StandardCredentials credentials = lookupCredentials(context, value, repoURL);
SVNRepository repo = descriptor().getRepository(context, repoURL, credentials, Collections
.<String, Credentials>emptyMap(), null);
String repoRoot = repo.getRepositoryRoot(false).toDecodedString();
String repoRoot = repo.getRepositoryRoot(true).toDecodedString();
String repoPath = repo.getLocation().toDecodedString().substring(repoRoot.length());
SVNPath path = new SVNPath(repoPath, true, true);
SVNNodeKind svnNodeKind = repo.checkPath(path.getTarget(), path.getPegRevision().getNumber());
Expand Down

0 comments on commit 0880857

Please sign in to comment.