Skip to content
Permalink
Browse files

Merge pull request #152 from recena/JENKINS-16711-PART2

[JENKINS-16711] SVNPath must be built from a decoded path
  • Loading branch information...
recena committed Dec 30, 2015
2 parents dd63407 + 2b160a1 commit 94b8c22306c77acf7fd7c386d8bc708c350faba7
@@ -3092,8 +3092,8 @@ 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).toString();
String repoPath = repo.getLocation().toString().substring(repoRoot.length());
String repoRoot = repo.getRepositoryRoot(false).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());
if (svnNodeKind != SVNNodeKind.DIR) {
@@ -242,7 +242,7 @@ protected SCMRevision retrieve(@NonNull SCMHead head, @NonNull TaskListener list
throws IOException {
SVNRepositoryView repository = null;
try {
listener.getLogger().println("Opening conection to " + remoteBase);
listener.getLogger().println("Opening connection to " + remoteBase);
SVNURL repoURL = SVNURL.parseURIEncoded(remoteBase);
repository = openSession(repoURL);
String repoPath = SubversionSCM.DescriptorImpl.getRelativePath(repoURL, repository.getRepository());

0 comments on commit 94b8c22

Please sign in to comment.
You can’t perform that action at this time.