Package org.tmatesoft.svn.cli.svn
Class SVNCommandEnvironment
- java.lang.Object
-
- org.tmatesoft.svn.cli.AbstractSVNCommandEnvironment
-
- org.tmatesoft.svn.cli.svn.SVNCommandEnvironment
-
- All Implemented Interfaces:
ISVNCanceller,ISVNCommitHandler
public class SVNCommandEnvironment extends AbstractSVNCommandEnvironment implements ISVNCommitHandler
- Version:
- 1.3
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringDEFAULT_LOG_MESSAGE_HEADERprivate java.lang.StringmyAuthorOfInterestprivate java.lang.StringmyChangelistprivate java.util.CollectionmyChangelistsprivate java.lang.StringmyConfigDirprivate java.util.MapmyConfigOptionsprivate SVNConflictStatsmyConflictStatsprivate SVNDepthmyDepthprivate java.lang.StringmyDiffCommandprivate java.lang.StringmyEditorCommandprivate java.lang.StringmyEncodingprivate SVNRevisionmyEndRevisionprivate java.util.CollectionmyExtensionsprivate byte[]myFileDataprivate java.lang.StringmyFilePathprivate booleanmyIsAllowMixedRevisionsprivate booleanmyIsAutoPropsprivate booleanmyIsChangeOptionUsedprivate booleanmyIsDescendprivate booleanmyIsDryRunprivate booleanmyIsForceprivate booleanmyIsForceInteractiveprivate booleanmyIsForceLogprivate booleanmyIsGitDiffFormatprivate booleanmyIsHelpprivate booleanmyIsIgnoreAncestryprivate booleanmyIsIgnoreExternalsprivate booleanmyIsIgnoreKeywordsprivate booleanmyIsIgnorePropertiesprivate booleanmyIsIgnoreWhitespaceprivate booleanmyIsIncludeExternalsprivate booleanmyIsIncrementalprivate booleanmyIsKeepChangelistprivate booleanmyIsKeepLocalprivate booleanmyIsNoAuthCacheprivate booleanmyIsNoAutoPropsprivate booleanmyIsNoDiffAddedprivate booleanmyIsNoDiffDeletedprivate booleanmyIsNoIgnoreprivate booleanmyIsNoNewLineprivate booleanmyIsNonInteractiveprivate booleanmyIsNoticeAncestryprivate booleanmyIsNoUnlockprivate booleanmyIsParentsprivate booleanmyIsPinExternalsprivate booleanmyIsPropertiesOnlyprivate booleanmyIsQuietprivate booleanmyIsRecordOnlyprivate booleanmyIsReIntegrateprivate booleanmyIsRelocateprivate booleanmyIsRemoveprivate booleanmyIsRemoveIgnoredprivate booleanmyIsRemoveUnversionedprivate booleanmyIsReverseDiffprivate booleanmyIsRevisionOptionUsedprivate booleanmyIsRevpropprivate booleanmyIsShowCopiesAsAddsprivate booleanmyIsShowDiffprivate booleanmyIsShowInhertiedPropsprivate booleanmyIsStopOnCopyprivate booleanmyIsStrictprivate booleanmyIsSummarizeprivate booleanmyIsTrustServerCertificateprivate java.util.EnumSet<SVNCertificateFailureKind>myIsTrustServerCertificateFailuresprivate booleanmyIsUpdateprivate booleanmyIsUseMergeHistoryprivate booleanmyIsVerboseprivate booleanmyIsVersionprivate booleanmyIsWithAllRevpropsprivate booleanmyIsXMLprivate longmyLimitprivate java.lang.StringmyMessageprivate java.lang.StringmyNativeEOLprivate java.lang.StringmyNewTargetprivate java.lang.StringmyOldTargetprivate java.lang.StringmyPasswordprivate java.lang.StringmyRegularExpressionprivate SVNConflictAcceptPolicymyResolveAcceptprivate SVNPropertiesmyRevisionPropertiesprivate java.util.ListmyRevisionRangesprivate java.util.MapmyServersOptionsprivate SVNDepthmySetDepthprivate java.lang.StringmyShowItemprivate SVNShowRevisionTypemyShowRevsTypeprivate SVNRevisionmyStartRevisionprivate intmyStripCountprivate java.util.ListmyTargetsprivate java.lang.StringmyUserName-
Fields inherited from interface org.tmatesoft.svn.core.ISVNCanceller
NULL
-
-
Constructor Summary
Constructors Constructor Description SVNCommandEnvironment(java.lang.String programName, java.io.PrintStream out, java.io.PrintStream err, java.io.InputStream in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ISVNAuthenticationManagercreateClientAuthenticationManager()protected DefaultSVNOptionscreateClientOptions()private java.lang.StringcreateCommitMessageTemplate(SVNCommitItem[] items)java.lang.StringgetAuthorOfInterest()java.lang.StringgetChangelist()java.lang.String[]getChangelists()java.util.CollectiongetChangelistsCollection()protected java.lang.StringgetCommandLineClientName()java.lang.StringgetCommitMessage(java.lang.String message, SVNCommitItem[] commitables)Handles the incoming initial log message and items intended for a commit and returns a new commit log message.SVNConflictStatsgetConflictStats()SVNDepthgetDepth()java.lang.StringgetDiffCommand()SVNDiffOptionsgetDiffOptions()java.lang.StringgetEditorCommand()java.lang.StringgetEncoding()SVNRevisiongetEndRevision()java.util.CollectiongetExtensions()byte[]getFileData()longgetLimit()java.lang.StringgetMessage()java.lang.StringgetNativeEOL()java.lang.StringgetNewTarget()java.lang.StringgetOldTarget()java.lang.StringgetRegularExpression()SVNConflictAcceptPolicygetResolveAccept()SVNPropertiesgetRevisionProperties()SVNPropertiesgetRevisionProperties(java.lang.String message, SVNCommitItem[] commitables, SVNProperties revisionProperties)Handles the incoming revision properties and returns filtered revision properties given the paths (represented bycommitables) collected for committing and the commit log message.java.util.ListgetRevisionRanges()SVNDepthgetSetDepth()java.lang.StringgetShowItem()SVNShowRevisionTypegetShowRevisionType()SVNRevisiongetStartRevision()intgetStripCount()protected SVNCommandgetSVNCommand()java.util.ListgetTargets()voidinitClientManager()protected voidinitOption(SVNOptionValue optionValue)protected voidinitOptions(SVNCommandLine commandLine)booleanisAllowMixedRevisions()booleanisAllRevisionProperties()booleanisChangeOptionUsed()booleanisDryRun()booleanisForce()booleanisForceLog()booleanisGitDiffFormat()booleanisIgnoreAncestry()booleanisIgnoreKeywords()booleanisIgnoreProperties()booleanisIgnoreWhitespace()booleanisIncludeExternals()booleanisIncremental()booleanisKeepChangelist()booleanisKeepLocal()booleanisNoAutoProps()booleanisNoDiffAdded()booleanisNoDiffDeleted()booleanisNoIgnore()booleanisNoNewLine()booleanisNoticeAncestry()booleanisNoUnlock()booleanisParents()booleanisPinExternals()booleanisPropertiesOnly()booleanisQuiet()booleanisRecordOnly()booleanisReIntegrate()booleanisRelocate()booleanisRemove()booleanisRemoveIgnored()booleanisRemoveUnversioned()booleanisReverseDiff()booleanisRevisionOptionUsed()booleanisRevprop()booleanisShowCopiesAsAdds()booleanisShowDiff()booleanisShowInheritedProps()booleanisStopOnCopy()booleanisStrict()booleanisSummarize()booleanisUpdate()booleanisUseMergeHistory()booleanisVerbose()booleanisVersion()booleanisXML()private voidparseRevisionProperty(SVNOptionValue optionValue)protected java.lang.StringrefineCommandName(java.lang.String commandName, SVNCommandLine commandLine)protected voidvalidateOptions(SVNCommandLine commandLine)-
Methods inherited from class org.tmatesoft.svn.cli.AbstractSVNCommandEnvironment
checkCancelled, combineTargets, createClientManager, dispose, getArguments, getClientManager, getCommand, getCommandName, getCommandName, getErr, getIn, getOptions, getOut, getProgramName, getRelativePath, getURLFromTarget, handleError, handleWarning, init, initCommand, isVersioned, parseRevision, popArgument, printCommitInfo, readFromFile, run, setArguments, setCancelled
-
-
-
-
Field Detail
-
DEFAULT_LOG_MESSAGE_HEADER
private static final java.lang.String DEFAULT_LOG_MESSAGE_HEADER
- See Also:
- Constant Field Values
-
myDepth
private SVNDepth myDepth
-
mySetDepth
private SVNDepth mySetDepth
-
myIsVerbose
private boolean myIsVerbose
-
myIsUpdate
private boolean myIsUpdate
-
myIsQuiet
private boolean myIsQuiet
-
myIsIncremental
private boolean myIsIncremental
-
myIsHelp
private boolean myIsHelp
-
myIsIgnoreExternals
private boolean myIsIgnoreExternals
-
myIsIgnoreKeywords
private boolean myIsIgnoreKeywords
-
myIsXML
private boolean myIsXML
-
myIsVersion
private boolean myIsVersion
-
myChangelist
private java.lang.String myChangelist
-
myIsNonInteractive
private boolean myIsNonInteractive
-
myIsForceInteractive
private boolean myIsForceInteractive
-
myIsNoAuthCache
private boolean myIsNoAuthCache
-
myUserName
private java.lang.String myUserName
-
myPassword
private java.lang.String myPassword
-
myConfigDir
private java.lang.String myConfigDir
-
myIsDescend
private boolean myIsDescend
-
myIsNoIgnore
private boolean myIsNoIgnore
-
myIsRevprop
private boolean myIsRevprop
-
myIsStrict
private boolean myIsStrict
-
myStartRevision
private SVNRevision myStartRevision
-
myEndRevision
private SVNRevision myEndRevision
-
myIsForce
private boolean myIsForce
-
myFilePath
private java.lang.String myFilePath
-
myFileData
private byte[] myFileData
-
myTargets
private java.util.List myTargets
-
myEncoding
private java.lang.String myEncoding
-
myMessage
private java.lang.String myMessage
-
myIsForceLog
private boolean myIsForceLog
-
myEditorCommand
private java.lang.String myEditorCommand
-
myDiffCommand
private java.lang.String myDiffCommand
-
myRevisionProperties
private SVNProperties myRevisionProperties
-
myIsNoUnlock
private boolean myIsNoUnlock
-
myIsDryRun
private boolean myIsDryRun
-
myIsRecordOnly
private boolean myIsRecordOnly
-
myIsUseMergeHistory
private boolean myIsUseMergeHistory
-
myExtensions
private java.util.Collection myExtensions
-
myIsIgnoreAncestry
private boolean myIsIgnoreAncestry
-
myIsShowCopiesAsAdds
private boolean myIsShowCopiesAsAdds
-
myNativeEOL
private java.lang.String myNativeEOL
-
myIsRelocate
private boolean myIsRelocate
-
myIsNoAutoProps
private boolean myIsNoAutoProps
-
myIsAutoProps
private boolean myIsAutoProps
-
myIsKeepChangelist
private boolean myIsKeepChangelist
-
myIsParents
private boolean myIsParents
-
myIsKeepLocal
private boolean myIsKeepLocal
-
myResolveAccept
private SVNConflictAcceptPolicy myResolveAccept
-
myIsRemove
private boolean myIsRemove
-
myNewTarget
private java.lang.String myNewTarget
-
myOldTarget
private java.lang.String myOldTarget
-
myIsNoticeAncestry
private boolean myIsNoticeAncestry
-
myIsSummarize
private boolean myIsSummarize
-
myIsNoDiffDeleted
private boolean myIsNoDiffDeleted
-
myIsNoDiffAdded
private boolean myIsNoDiffAdded
-
myLimit
private long myLimit
-
myIsStopOnCopy
private boolean myIsStopOnCopy
-
myIsChangeOptionUsed
private boolean myIsChangeOptionUsed
-
myIsRevisionOptionUsed
private boolean myIsRevisionOptionUsed
-
myIsWithAllRevprops
private boolean myIsWithAllRevprops
-
myIsReIntegrate
private boolean myIsReIntegrate
-
myIsTrustServerCertificate
private boolean myIsTrustServerCertificate
-
myIsTrustServerCertificateFailures
private java.util.EnumSet<SVNCertificateFailureKind> myIsTrustServerCertificateFailures
-
myIsAllowMixedRevisions
private boolean myIsAllowMixedRevisions
-
myRevisionRanges
private java.util.List myRevisionRanges
-
myShowRevsType
private SVNShowRevisionType myShowRevsType
-
myChangelists
private java.util.Collection myChangelists
-
myAuthorOfInterest
private java.lang.String myAuthorOfInterest
-
myRegularExpression
private java.lang.String myRegularExpression
-
myConfigOptions
private java.util.Map myConfigOptions
-
myServersOptions
private java.util.Map myServersOptions
-
myIsGitDiffFormat
private boolean myIsGitDiffFormat
-
myIsShowDiff
private boolean myIsShowDiff
-
myIsPropertiesOnly
private boolean myIsPropertiesOnly
-
myIsIgnoreProperties
private boolean myIsIgnoreProperties
-
myIsReverseDiff
private boolean myIsReverseDiff
-
myIsIgnoreWhitespace
private boolean myIsIgnoreWhitespace
-
myStripCount
private int myStripCount
-
myIsShowInhertiedProps
private boolean myIsShowInhertiedProps
-
myIsIncludeExternals
private boolean myIsIncludeExternals
-
myShowItem
private java.lang.String myShowItem
-
myIsNoNewLine
private boolean myIsNoNewLine
-
myIsPinExternals
private boolean myIsPinExternals
-
myIsRemoveUnversioned
private boolean myIsRemoveUnversioned
-
myIsRemoveIgnored
private boolean myIsRemoveIgnored
-
myConflictStats
private SVNConflictStats myConflictStats
-
-
Method Detail
-
initClientManager
public void initClientManager() throws SVNException- Overrides:
initClientManagerin classAbstractSVNCommandEnvironment- Throws:
SVNException
-
refineCommandName
protected java.lang.String refineCommandName(java.lang.String commandName, SVNCommandLine commandLine) throws SVNException- Specified by:
refineCommandNamein classAbstractSVNCommandEnvironment- Throws:
SVNException
-
createClientOptions
protected DefaultSVNOptions createClientOptions() throws SVNException
- Specified by:
createClientOptionsin classAbstractSVNCommandEnvironment- Throws:
SVNException
-
createClientAuthenticationManager
protected ISVNAuthenticationManager createClientAuthenticationManager()
- Specified by:
createClientAuthenticationManagerin classAbstractSVNCommandEnvironment
-
initOptions
protected void initOptions(SVNCommandLine commandLine) throws SVNException
- Overrides:
initOptionsin classAbstractSVNCommandEnvironment- Throws:
SVNException
-
initOption
protected void initOption(SVNOptionValue optionValue) throws SVNException
- Specified by:
initOptionin classAbstractSVNCommandEnvironment- Throws:
SVNException
-
getSVNCommand
protected SVNCommand getSVNCommand()
-
validateOptions
protected void validateOptions(SVNCommandLine commandLine) throws SVNException
- Overrides:
validateOptionsin classAbstractSVNCommandEnvironment- Throws:
SVNException
-
getCommandLineClientName
protected java.lang.String getCommandLineClientName()
- Specified by:
getCommandLineClientNamein classAbstractSVNCommandEnvironment
-
isReIntegrate
public boolean isReIntegrate()
-
getShowRevisionType
public SVNShowRevisionType getShowRevisionType()
-
isChangeOptionUsed
public boolean isChangeOptionUsed()
-
isRevisionOptionUsed
public boolean isRevisionOptionUsed()
-
getChangelist
public java.lang.String getChangelist()
-
getChangelists
public java.lang.String[] getChangelists()
-
getChangelistsCollection
public java.util.Collection getChangelistsCollection()
-
isIgnoreKeywords
public boolean isIgnoreKeywords()
-
getDepth
public SVNDepth getDepth()
-
getSetDepth
public SVNDepth getSetDepth()
-
isVerbose
public boolean isVerbose()
-
isNoIgnore
public boolean isNoIgnore()
-
isUpdate
public boolean isUpdate()
-
isQuiet
public boolean isQuiet()
-
isIncremental
public boolean isIncremental()
-
isRevprop
public boolean isRevprop()
-
isStrict
public boolean isStrict()
-
getRevisionRanges
public java.util.List getRevisionRanges()
-
getStartRevision
public SVNRevision getStartRevision()
-
getEndRevision
public SVNRevision getEndRevision()
-
isXML
public boolean isXML()
-
isVersion
public boolean isVersion()
-
isForce
public boolean isForce()
-
getEncoding
public java.lang.String getEncoding()
-
getFileData
public byte[] getFileData()
-
getTargets
public java.util.List getTargets()
-
isForceLog
public boolean isForceLog()
-
getEditorCommand
public java.lang.String getEditorCommand()
-
getDiffCommand
public java.lang.String getDiffCommand()
-
getMessage
public java.lang.String getMessage()
-
getRevisionProperties
public SVNProperties getRevisionProperties()
-
isDryRun
public boolean isDryRun()
-
isIgnoreAncestry
public boolean isIgnoreAncestry()
-
isShowCopiesAsAdds
public boolean isShowCopiesAsAdds()
-
isGitDiffFormat
public boolean isGitDiffFormat()
-
isPropertiesOnly
public boolean isPropertiesOnly()
-
isIgnoreProperties
public boolean isIgnoreProperties()
-
isReverseDiff
public boolean isReverseDiff()
-
isIgnoreWhitespace
public boolean isIgnoreWhitespace()
-
isShowDiff
public boolean isShowDiff()
-
isUseMergeHistory
public boolean isUseMergeHistory()
-
isRecordOnly
public boolean isRecordOnly()
-
getExtensions
public java.util.Collection getExtensions()
-
getNativeEOL
public java.lang.String getNativeEOL()
-
isRelocate
public boolean isRelocate()
-
isNoUnlock
public boolean isNoUnlock()
-
isKeepChangelist
public boolean isKeepChangelist()
-
isParents
public boolean isParents()
-
isKeepLocal
public boolean isKeepLocal()
-
getResolveAccept
public SVNConflictAcceptPolicy getResolveAccept()
-
isRemove
public boolean isRemove()
-
isSummarize
public boolean isSummarize()
-
isNoticeAncestry
public boolean isNoticeAncestry()
-
isNoDiffDeleted
public boolean isNoDiffDeleted()
-
isNoDiffAdded
public boolean isNoDiffAdded()
-
getOldTarget
public java.lang.String getOldTarget()
-
getNewTarget
public java.lang.String getNewTarget()
-
getAuthorOfInterest
public java.lang.String getAuthorOfInterest()
-
isNoAutoProps
public boolean isNoAutoProps()
-
getRegularExpression
public java.lang.String getRegularExpression()
-
getLimit
public long getLimit()
-
isStopOnCopy
public boolean isStopOnCopy()
-
isAllRevisionProperties
public boolean isAllRevisionProperties()
-
getStripCount
public int getStripCount()
-
getDiffOptions
public SVNDiffOptions getDiffOptions() throws SVNException
- Throws:
SVNException
-
isAllowMixedRevisions
public boolean isAllowMixedRevisions()
-
isShowInheritedProps
public boolean isShowInheritedProps()
-
getShowItem
public java.lang.String getShowItem()
-
isNoNewLine
public boolean isNoNewLine()
-
isPinExternals
public boolean isPinExternals()
-
isRemoveUnversioned
public boolean isRemoveUnversioned()
-
isRemoveIgnored
public boolean isRemoveIgnored()
-
isIncludeExternals
public boolean isIncludeExternals()
-
getConflictStats
public SVNConflictStats getConflictStats()
-
getRevisionProperties
public SVNProperties getRevisionProperties(java.lang.String message, SVNCommitItem[] commitables, SVNProperties revisionProperties) throws SVNException
Description copied from interface:ISVNCommitHandlerHandles the incoming revision properties and returns filtered revision properties given the paths (represented bycommitables) collected for committing and the commit log message.Only the returned filtered revision properties will be set on a new committed revision.
- Specified by:
getRevisionPropertiesin interfaceISVNCommitHandler- Parameters:
message- log message for commitcommitables- paths to commitrevisionProperties- initial revision properties- Returns:
- filtered revision properties
- Throws:
SVNException
-
getCommitMessage
public java.lang.String getCommitMessage(java.lang.String message, SVNCommitItem[] commitables) throws SVNExceptionDescription copied from interface:ISVNCommitHandlerHandles the incoming initial log message and items intended for a commit and returns a new commit log message.- Specified by:
getCommitMessagein interfaceISVNCommitHandler- Parameters:
message- an initial log messagecommitables- an array of items to be committed- Returns:
- a new log message string or NULL to cancel commit operation.
- Throws:
SVNException
-
parseRevisionProperty
private void parseRevisionProperty(SVNOptionValue optionValue) throws SVNException
- Throws:
SVNException
-
createCommitMessageTemplate
private java.lang.String createCommitMessageTemplate(SVNCommitItem[] items)
-
-