Skip to content
Permalink
Browse files
[JENKINS-13835]
If we couldn't find any matching factory for the designated format, fall back to the known version to keep going.
This won't help with rolling back to 1.39, but it will help in the future if Subversion 1.8 will introduce yet another workspace format.
  • Loading branch information
kohsuke committed Jun 23, 2012
1 parent 92e1798 commit 6ccdb797100cfde195e67fb30886fe0dcd91568d
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/main/java/hudson/scm/SubversionWorkspaceSelector.java
@@ -73,12 +73,18 @@ public Collection getEnabledFactories(File path, Collection factories, boolean w
if(!writeAccess) // for reading, use all our available factories
return factories;

// for writing, use 1.4
// for writing, use the version the user has selected
Collection<SVNAdminAreaFactory> enabledFactories = new ArrayList<SVNAdminAreaFactory>();
for (SVNAdminAreaFactory factory : (Collection<SVNAdminAreaFactory>)factories)
if (factory.getSupportedVersion() == workspaceFormat)
enabledFactories.add(factory);

if (enabledFactories.isEmpty() && workspaceFormat!=SVNAdminArea14.WC_FORMAT) {
// if the workspaceFormat value is invalid, fall back to 1.4
workspaceFormat = SVNAdminArea14.WC_FORMAT;
return getEnabledFactories(path,factories,writeAccess);
}

return enabledFactories;
}

0 comments on commit 6ccdb79

Please sign in to comment.