hudson.scm
Class SubversionWorkspaceSelector

java.lang.Object
  extended by hudson.scm.SubversionWorkspaceSelector
All Implemented Interfaces:
org.tmatesoft.svn.core.internal.wc.admin.ISVNAdminAreaFactorySelector

public class SubversionWorkspaceSelector
extends Object
implements org.tmatesoft.svn.core.internal.wc.admin.ISVNAdminAreaFactorySelector

ISVNAdminAreaFactorySelector that uses 1.4 compatible workspace for new check out, but still supports 1.5 workspace, if asked to work with it.

Since there are many tools out there that still don't support Subversion 1.5 (including all the major Unix distributions that haven't bundled Subversion 1.5), using 1.4 as the default would reduce the likelihood of the user running into "this SVN client can't work with this workspace version..." problem when using other SVN tools.

The primary scenario of this is the use of command-line SVN client, either from shell script, Ant, or Maven.

Working copy changes from Subversion 1.6 to 1.7 was so big that they introduced a separate SvnWcGeneration constant to represent that. So this class alone is no longer sufficient to make SVNKit sticks to the version we want it to use. See SvnClientManager that controls the other half of this.

Author:
Kohsuke Kawaguchi
See Also:
SvnClientManager

Field Summary
static int WC_FORMAT_17
          Constant for workspaceFormat that indicates we opt for 1.7 working copy.
static int workspaceFormat
          getEnabledFactories(File, Collection, boolean) method is called quite a few times during a Subversion operation, so consulting this value back with master each time is not practical performance wise.
 
Constructor Summary
SubversionWorkspaceSelector()
           
 
Method Summary
 Collection getEnabledFactories(File path, Collection factories, boolean writeAccess)
           
static void syncWorkspaceFormatFromMaster()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

workspaceFormat

public static volatile int workspaceFormat
getEnabledFactories(File, Collection, boolean) method is called quite a few times during a Subversion operation, so consulting this value back with master each time is not practical performance wise. Therefore, we have SubversionSCM set this value, even though it's error prone.

Internally in SVNKit, these constants go up only to 1.6. We use WC_FORMAT_17 to indicate 1.7 (but when that value is chosen, it is really SvnClientManager that does the work, not ISVNAdminAreaFactorySelector).


WC_FORMAT_17

public static final int WC_FORMAT_17
Constant for workspaceFormat that indicates we opt for 1.7 working copy.

See Also:
Constant Field Values
Constructor Detail

SubversionWorkspaceSelector

public SubversionWorkspaceSelector()
Method Detail

getEnabledFactories

public Collection getEnabledFactories(File path,
                                      Collection factories,
                                      boolean writeAccess)
                               throws org.tmatesoft.svn.core.SVNException
Specified by:
getEnabledFactories in interface org.tmatesoft.svn.core.internal.wc.admin.ISVNAdminAreaFactorySelector
Throws:
org.tmatesoft.svn.core.SVNException

syncWorkspaceFormatFromMaster

public static void syncWorkspaceFormatFromMaster()


Copyright © 2004-2013. All Rights Reserved.