Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
JENKINS-21797: commit client created per module location
  • Loading branch information
rinokadijk committed Mar 1, 2014
1 parent 93f5f7e commit 172d2ce
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions src/main/java/hudson/plugins/svn_tag/SvnTagPlugin.java
Expand Up @@ -100,19 +100,6 @@ public static boolean perform(AbstractBuild<?,?> abstractBuild,
return false;
}

ISVNAuthenticationProvider sap = scm.createAuthenticationProvider(rootProject, scm.getLocations()[0]);

if (sap == null) {
logger.println(Messages.NoSVNAuthProvider());
return false;
}

ISVNAuthenticationManager sam =
SVNWCUtil.createDefaultAuthenticationManager();
sam.setAuthenticationProvider(sap);

SVNCommitClient commitClient = new SVNCommitClient(sam, null);

for (SubversionSCM.ModuleLocation ml : scm.getLocations(envVars, rootBuild)) {
String mlUrl;
URI repoURI;
Expand Down Expand Up @@ -151,6 +138,18 @@ public static boolean perform(AbstractBuild<?,?> abstractBuild,
evaledTagBaseURLStr, e.getLocalizedMessage()));
}

ISVNAuthenticationProvider sap = scm.createAuthenticationProvider(rootProject, ml);

if (sap == null) {
logger.println(Messages.NoSVNAuthProvider());
return false;
}

ISVNAuthenticationManager sam =
SVNWCUtil.createDefaultAuthenticationManager();
sam.setAuthenticationProvider(sap);

SVNCommitClient commitClient = new SVNCommitClient(sam, null);
try {
String evalDeleteComment = evalGroovyExpression(
envVars, tagDeleteComment, locationPathElements);
Expand Down

0 comments on commit 172d2ce

Please sign in to comment.