Skip to content

Commit

Permalink
[FIXED JENKINS-19519] support overrideable workspace separator
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Petti committed Sep 9, 2013
1 parent bd98df5 commit 775ae4e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/hudson/plugins/perforce/PerforceSCM.java
Expand Up @@ -98,6 +98,8 @@ public class PerforceSCM extends SCM {

private static final int MAX_CHANGESETS_ON_FIRST_BUILD = 50;

private static final String WORKSPACE_COMBINATOR = System.getProperty(hudson.slaves.WorkspaceList.class.getName(),"@");

/**
* Name of the p4 tool installation
*/
Expand Down Expand Up @@ -1751,7 +1753,7 @@ public static String unescapeP4String(String string) {
private String getConcurrentClientName(FilePath workspace, String p4Client) {
if (workspace != null) {
// Match @ followed by an integer at the end of the workspace path
Pattern p = Pattern.compile(".*@(\\d+)$");
Pattern p = Pattern.compile(".*" + Pattern.quote(WORKSPACE_COMBINATOR) + "(\\d+)$");
Matcher matcher = p.matcher(workspace.getRemote());
if (matcher.find()) {
p4Client += "_" + matcher.group(1);
Expand Down

0 comments on commit 775ae4e

Please sign in to comment.