Class DefaultSVNOptions
- All Implemented Interfaces:
ISVNTunnelProvider
,ISVNMergerFactory
,ISVNOptions
- Version:
- 1.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
private static final String
private static final String
private static final String
private static final String[]
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private File
private SVNCompositeConfigFile
private Map
private ISVNConflictHandler
private boolean
private SimpleDateFormat
private String
private String
private ISVNMergerFactory
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addIgnorePattern
(String pattern) Adds a new particular ignore pattern to global ignore patterns.applyAutoProperties
(File file, Map target) Collects and puts into aMap
all autoproperties specified for the file name pattern matched by the target file name.private static Pattern
compileNamePatter
(String wildcard) createMerger
(byte[] conflictStart, byte[] conflictSeparator, byte[] conflictEnd) Creates a new merger driver.Returns a tunnel comand line matching the given subprotocol name.void
deleteAutoProperty
(String pattern) Removes a particular autoproperty by specifying a file name pattern.void
deleteIgnorePattern
(String pattern) Removes a particular global ignore pattern.Returns autoproperties as aMap
where each key is a file name pattern and the corresponding value is a string in the form of"propName=propValue"
.static boolean
getBooleanValue
(String value, boolean defaultValue) private SVNCompositeConfigFile
private static File
private String
private String
getDefaultSSHOptionValue
(String optionName, String systemProperty, String fallbackSystemProperty) int
Returns a hash holding file extensions to MIME types mappings.String[]
Returns all the global ignore patterns.Returns the date format used to format datestamps.static long
getLongValue
(String value, long defaultValue) Returns a factory object which is responsible for creating merger drivers.Returns the native charset name.byte[]
Returns the native EOL marker bytes.private static String
getOptionValue
(String commandLine, String optionName) String[]
String[]
Returns an array of path extensions which the user wants to preserve when conflict files are made.getPropertyValue
(String propertyName) Returns the value of a property from the [svnkit] section of the config file.boolean
Says to a merge driver whether to allow all forward merges or not.boolean
Determines if the authentication storage is enabled.static boolean
isIgnored
(ISVNOptions options, String name) boolean
boolean
boolean
Determines if the autoproperties option is enabled.boolean
Determines if the commit-times option is enabled.static boolean
void
setAuthStorageEnabled
(boolean storeAuth) Enables or disables the authentication storage.void
setAutoProperties
(Map autoProperties) Sets autoproperties that will be automatically put on all files that will be added or imported.void
setAutoProperty
(String pattern, String properties) Sets an autoproperty - binds a file name pattern with a string in the form of"propName=propValue"
.void
setConflictHandler
(ISVNConflictHandler resolver) void
setDiffCommand
(String diffCmd) void
setGlobalCharset
(String charset) void
setIgnorePatterns
(String[] patterns) Sets global ignore patterns.void
setInMemoryConfigOptions
(Map configOptions) void
setInteractiveConflictResolution
(boolean interactive) void
setKeepLocks
(boolean keep) void
setMergerFactory
(ISVNMergerFactory mergerFactory) Sets a factory object which is responsible for creating merger drivers.void
setPropertyValue
(String propertyName, String propertyValue) Sets the value of a property from the [svnkit] section of the config file.void
setUseAutoProperties
(boolean useAutoProperties) Enables or disables the autoproperties option.void
setUseCommitTimes
(boolean useCommitTimes) Enables or disables the commit-times option.private static Locale
-
Field Details
-
MISCELLANY_GROUP
- See Also:
-
AUTH_GROUP
- See Also:
-
AUTOPROPS_GROUP
- See Also:
-
SVNKIT_GROUP
- See Also:
-
OLD_SVNKIT_GROUP
- See Also:
-
HELPERS_GROUP
- See Also:
-
HTTP_SPOOL_DIRECTORY
- See Also:
-
USE_COMMIT_TIMES
- See Also:
-
GLOBAL_IGNORES
- See Also:
-
ENABLE_AUTO_PROPS
- See Also:
-
STORE_AUTH_CREDS
- See Also:
-
KEYWORD_TIMEZONE
- See Also:
-
KEYWORD_LOCALE
- See Also:
-
EDITOR_CMD
- See Also:
-
DIFF_CMD
- See Also:
-
MERGE_TOOL_CMD
- See Also:
-
NO_UNLOCK
- See Also:
-
LOG_ENCODING
- See Also:
-
PRESERVED_CONFLICT_FILE_EXTENSIONS
- See Also:
-
INTERACTIVE_COFLICTS
- See Also:
-
MIME_TYPES_FILE
- See Also:
-
GLOBAL_CHARSET
- See Also:
-
PASSWORD_STORES
- See Also:
-
DEFAULT_IGNORES
- See Also:
-
YES
- See Also:
-
NO
- See Also:
-
DEFAULT_LOCALE
-
DEFAULT_TIMEZONE
-
DEFAULT_PASSWORD_STORE_TYPES
-
myIsReadonly
private boolean myIsReadonly -
myConfigDirectory
-
myConfigFile
-
myMergerFactory
-
myConflictResolver
-
myKeywordLocale
-
myKeywordTimezone
-
myKeywordDateFormat
-
myConfigOptions
-
-
Constructor Details
-
DefaultSVNOptions
public DefaultSVNOptions() -
DefaultSVNOptions
-
-
Method Details
-
isUseCommitTimes
public boolean isUseCommitTimes()Description copied from interface:ISVNOptions
Determines if the commit-times option is enabled.The commit-times option makes checkout/update/switch/revert operations put last-committed timestamps on every file they touch.
This option corresponds to the 'use-commit-times' option that can be found in the SVN's config file under the [miscellany] section.
- Specified by:
isUseCommitTimes
in interfaceISVNOptions
- Returns:
- true if commit-times are enabled, otherwise false
-
setInMemoryConfigOptions
-
setUseCommitTimes
public void setUseCommitTimes(boolean useCommitTimes) Enables or disables the commit-times option.The commit-times option makes checkout/update/switch/revert operations put last-committed timestamps on every file they touch.
This option corresponds to the 'use-commit-times' option that can be found in the SVN's config file under the [miscellany] section.
- Parameters:
useCommitTimes
- true to enable commit-times, false to disable- See Also:
-
isUseAutoProperties
public boolean isUseAutoProperties()Determines if the autoproperties option is enabled.Autoproperties are the properties that are automatically set on files when they are added or imported.
This option corresponds to the 'enable-auto-props' option that can be found in the SVN's config file under the [miscellany] section.
- Returns:
- true if autoproperties are enabled, otherwise false
-
setUseAutoProperties
public void setUseAutoProperties(boolean useAutoProperties) Enables or disables the autoproperties option.Autoproperties are the properties that are automatically set on files when they are added or imported.
This option corresponds to the 'enable-auto-props' option that can be found in the SVN's config file under the [miscellany] section.
- Parameters:
useAutoProperties
- true to enable autoproperties, false to disable- See Also:
-
isAuthStorageEnabled
public boolean isAuthStorageEnabled()Determines if the authentication storage is enabled.The auth storage is used for disk-caching of all authentication information: usernames, passwords, server certificates, and any other types of cacheable credentials.
This option corresponds to the 'store-auth-creds' option that can be found in the SVN's config file under the [auth] section.
- Returns:
- true if auth storage is enabled, otherwise false
-
isKeepLocks
public boolean isKeepLocks() -
setAuthStorageEnabled
public void setAuthStorageEnabled(boolean storeAuth) Enables or disables the authentication storage.The auth storage is used for disk-caching of all authentication information: usernames, passwords, server certificates, and any other types of cacheable credentials.
This option corresponds to the 'store-auth-creds' option that can be found in the SVN's config file under the [auth] section.
- Parameters:
storeAuth
- true to enable the auth storage, false to disable- See Also:
-
setKeepLocks
public void setKeepLocks(boolean keep) -
isIgnored
-
getIgnorePatterns
Description copied from interface:ISVNOptions
Returns all the global ignore patterns.The global ignore patterns describe the names of files and directories that SVNKit should ignore during status, add and import operations. Similar to the 'global-ignores' option that can be found in the SVN's config file under the [miscellany] section.
- Specified by:
getIgnorePatterns
in interfaceISVNOptions
- Returns:
- an array of patterns (that usually contain wildcards) that specify file and directory names to be ignored until they are versioned
-
setIgnorePatterns
Sets global ignore patterns.The global ignore patterns describe the names of files and directories that SVNKit should ignore during status, add and import operations. Similar to the 'global-ignores' option that can be found in the SVN's config file under the [miscellany] section.
For example, to set all
.exe
files to be ignored include"*.exe"
pattern intopatterns
.If
patterns
is null or empty then all the patterns will be removed.- Parameters:
patterns
- an array of patterns (that usually contain wildcards) that specify file and directory names to be ignored until they are versioned- See Also:
-
deleteIgnorePattern
Removes a particular global ignore pattern.- Parameters:
pattern
- a patterna to be removed- See Also:
-
addIgnorePattern
Adds a new particular ignore pattern to global ignore patterns.- Parameters:
pattern
- an ignore pattern to be added- See Also:
-
getAutoProperties
Returns autoproperties as aMap
where each key is a file name pattern and the corresponding value is a string in the form of"propName=propValue"
.- Returns:
- a
Map
containing autoproperties
-
setAutoProperties
Sets autoproperties that will be automatically put on all files that will be added or imported.There can be several properties specified for one file pattern - they should be delimited by ";".
- Parameters:
autoProperties
- aMap
which keys are file name patterns and their values are strings in the form of"propName=propValue"
- See Also:
-
getEditor
-
getMergeTool
-
deleteAutoProperty
Removes a particular autoproperty by specifying a file name pattern.- Parameters:
pattern
- a file name pattern- See Also:
-
setAutoProperty
Sets an autoproperty - binds a file name pattern with a string in the form of"propName=propValue"
.- Parameters:
pattern
- a file name pattern (usually containing wildcards)properties
- a property forpattern
-
isInteractiveConflictResolution
public boolean isInteractiveConflictResolution() -
setInteractiveConflictResolution
public void setInteractiveConflictResolution(boolean interactive) -
applyAutoProperties
Description copied from interface:ISVNOptions
Collects and puts into aMap
all autoproperties specified for the file name pattern matched by the target file name.If
fileName
matches any known file name pattern then all properties set for that pattern will be collected and placed intotarget
.For one file name pattern there can be several autoproperties set, delimited by ";".
- Specified by:
applyAutoProperties
in interfaceISVNOptions
- Parameters:
file
- a target filetarget
- aMap
that will receive autoproperties- Returns:
target
itself
-
getMergerFactory
Description copied from interface:ISVNOptions
Returns a factory object which is responsible for creating merger drivers.- Specified by:
getMergerFactory
in interfaceISVNOptions
- Returns:
- a factory that produces merger drivers for merge operations
-
setMergerFactory
Sets a factory object which is responsible for creating merger drivers.- Parameters:
mergerFactory
- a factory that produces merger drivers for merge operations- See Also:
-
getPropertyValue
Returns the value of a property from the [svnkit] section of the config file.- Parameters:
propertyName
- a SVNKit specific config property name- Returns:
- the value of the property
-
getHttpSpoolDirectory
-
setPropertyValue
Sets the value of a property from the [svnkit] section of the config file.- Parameters:
propertyName
- a SVNKit specific config property namepropertyValue
- a new value for the property; if null the property is removed
-
setConflictHandler
-
getConflictResolver
- Specified by:
getConflictResolver
in interfaceISVNOptions
-
matches
-
createMerger
Description copied from interface:ISVNMergerFactory
Creates a new merger driver.If a merger driver can not cleanly apply delta to a file (in case of a conflict state) then for each conflicting contents fragment the driver puts local data between the specified
conflictStart
andconflictSeparator
bytes, and the newcomer data between the specifiedconflictSeparator
andconflictEnd
ones. And all these bytes are then written to the file in the place of a conflict.- Specified by:
createMerger
in interfaceISVNMergerFactory
- Parameters:
conflictStart
- bytes that come in the very beginning of a conflictconflictSeparator
- bytes that are used to separate two conflicting fragments - local data and the newcomer oneconflictEnd
- bytes that come in the very end of a conflict- Returns:
- a merger driver
-
createTunnelConnector
Description copied from interface:ISVNTunnelProvider
Returns a tunnel comand line matching the given subprotocol name.- Specified by:
createTunnelConnector
in interfaceISVNTunnelProvider
- Returns:
- a tunnel command line
-
getKeywordDateFormat
Description copied from interface:ISVNOptions
Returns the date format used to format datestamps.- Specified by:
getKeywordDateFormat
in interfaceISVNOptions
- Returns:
- date format
-
getPreservedConflictFileExtensions
Description copied from interface:ISVNOptions
Returns an array of path extensions which the user wants to preserve when conflict files are made. If the extension of a conflicted path does not match any of the returned by this method or if this method returns null, the extension (if any) of the conflicted file will be cut off.- Specified by:
getPreservedConflictFileExtensions
in interfaceISVNOptions
- Returns:
- array of preserved file extensions
-
isAllowAllForwardMergesFromSelf
public boolean isAllowAllForwardMergesFromSelf()Description copied from interface:ISVNOptions
Says to a merge driver whether to allow all forward merges or not. If this returns true, we allow all forward-merges not already found in recorded mergeinfo, and thus we destroy the ability to, say, merge the whole of a branch to the trunk while automatically ignoring the revisions common to both. If this returns false, we allow only forward-merges not found in either recorded mergeinfo or implicit mergeinfo (natural history), then the previous scenario works great, but we can't reverse-merge a previous change made to our line of history and then remake it (because the reverse-merge will leave no mergeinfo trace, and the remake-it attempt will still find the original change in natural mergeinfo.- Specified by:
isAllowAllForwardMergesFromSelf
in interfaceISVNOptions
- Returns:
- true to allow all forward-merges; otherwise false
-
getLogEncoding
-
getGlobalCharset
-
setGlobalCharset
-
getNativeCharset
Description copied from interface:ISVNOptions
Returns the native charset name. See alsoSVNProperty.NATIVE
.- Specified by:
getNativeCharset
in interfaceISVNOptions
- Returns:
- native charset name
-
getNativeEOL
public byte[] getNativeEOL()Description copied from interface:ISVNOptions
Returns the native EOL marker bytes.- Specified by:
getNativeEOL
in interfaceISVNOptions
- Returns:
- native EOL bytes
-
getFileExtensionsToMimeTypes
Description copied from interface:ISVNOptions
Returns a hash holding file extensions to MIME types mappings. Extensions must not include the leading dot in their names.- Specified by:
getFileExtensionsToMimeTypes
in interfaceISVNOptions
- Returns:
- map which keys are
String
file extensions, and values areString
MIME types
-
getDiffCommand
-
setDiffCommand
-
getPasswordStorageTypes
-
getDefaultSSHCommandLine
-
getDefaultSSHOptionValue
-
getDefaultSSHPortNumber
public int getDefaultSSHPortNumber() -
getDefaultSSHUserName
-
getDefaultSSHPassword
-
getDefaultSSHKeyFile
-
getDefaultSSHPassphrase
-
getConfigFile
-
getOptionValue
-
compileNamePatter
-
toLocale
-
getDefaultConfigDir
-
getBooleanValue
-
getLongValue
-