Package org.tmatesoft.svn.cli
Class AbstractSVNCommandEnvironment
java.lang.Object
org.tmatesoft.svn.cli.AbstractSVNCommandEnvironment
- All Implemented Interfaces:
ISVNCanceller
- Direct Known Subclasses:
SVNAdminCommandEnvironment
,SVNCommandEnvironment
,SVNDumpFilterCommandEnvironment
,SVNLookCommandEnvironment
,SVNSyncCommandEnvironment
,SVNVersionCommandEnvironment
- Version:
- 1.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate List
private SVNClientManager
private AbstractSVNCommand
private String
private PrintStream
private InputStream
private DefaultSVNOptions
private PrintStream
private String
private boolean
Fields inherited from interface org.tmatesoft.svn.core.ISVNCanceller
NULL
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractSVNCommandEnvironment
(String programName, PrintStream out, PrintStream err, InputStream in) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Checks if the current operation is cancelled (somehow interrupted) and should throw an SVNCancelException or notify the handler if exists.private SVNURL
checkRootURLOfTarget
(SVNURL rootURL, String target) combineTargets
(Collection targets, boolean warnReserved) protected abstract ISVNAuthenticationManager
protected abstract DefaultSVNOptions
void
dispose()
private static boolean
protected abstract String
protected String
getCommandName
(SVNCommandLine commandLine) private static String
getCommonAncestor
(String p1, String p2) getErr()
getIn()
getOut()
getRelativePath
(File file) getURLFromTarget
(String target) void
boolean
handleWarning
(SVNErrorMessage err, SVNErrorCode[] warningCodes, boolean quiet) void
init
(SVNCommandLine commandLine) void
protected void
initCommand
(SVNCommandLine commandLine) protected abstract void
initOption
(SVNOptionValue optionValue) protected void
initOptions
(SVNCommandLine commandLine) private static boolean
isReposRelative
(String path) boolean
isVersioned
(String target) parseRevision
(String revStr) void
printCommitInfo
(SVNCommitInfo info) byte[]
readFromFile
(File file) protected abstract String
refineCommandName
(String commandName, SVNCommandLine commandLine) private SVNURL
resolveRepositoryRelativeURL
(SVNURL rootURL, String relativeURL) boolean
run()
protected void
setArguments
(List newArguments) void
private static boolean
startsWith
(String p1, String p2) protected void
validateOptions
(SVNCommandLine commandLine)
-
Field Details
-
ourIsCancelled
private boolean ourIsCancelled -
myIn
-
myErr
-
myOut
-
myClientManager
-
myOptions
-
myArguments
-
myProgramName
-
myCommand
-
myCommandName
-
-
Constructor Details
-
AbstractSVNCommandEnvironment
protected AbstractSVNCommandEnvironment(String programName, PrintStream out, PrintStream err, InputStream in)
-
-
Method Details
-
getProgramName
-
getOut
-
getErr
-
getIn
-
getClientManager
-
getOptions
-
getArguments
-
getCommand
-
getCommandName
-
popArgument
-
setArguments
-
init
- Throws:
SVNException
-
run
public boolean run() -
initOptions
- Throws:
SVNException
-
initOption
- Throws:
SVNException
-
validateOptions
- Throws:
SVNException
-
initCommand
- Throws:
SVNException
-
getCommandName
- Throws:
SVNException
-
refineCommandName
protected abstract String refineCommandName(String commandName, SVNCommandLine commandLine) throws SVNException - Throws:
SVNException
-
createClientOptions
- Throws:
SVNException
-
createClientAuthenticationManager
-
getCommandLineClientName
-
initClientManager
- Throws:
SVNException
-
dispose
public void dispose() -
combineTargets
- Throws:
SVNException
-
parseRevision
-
readFromFile
- Throws:
SVNException
-
handleError
-
handleWarning
public boolean handleWarning(SVNErrorMessage err, SVNErrorCode[] warningCodes, boolean quiet) throws SVNException - Throws:
SVNException
-
getRelativePath
-
getURLFromTarget
- Throws:
SVNException
-
isVersioned
- Throws:
SVNException
-
printCommitInfo
-
resolveRepositoryRelativeURL
- Throws:
SVNException
-
checkRootURLOfTarget
- Throws:
SVNException
-
isReposRelative
-
startsWith
-
equals
-
getCommonAncestor
-
checkCancelled
Description copied from interface:ISVNCanceller
Checks if the current operation is cancelled (somehow interrupted) and should throw an SVNCancelException or notify the handler if exists. This method is often called during iterations when processing trees of versioned items. This way the entire operation may be interrupted without waiting till the iteration run out.- Specified by:
checkCancelled
in interfaceISVNCanceller
- Throws:
SVNCancelException
-
setCancelled
public void setCancelled() -
createClientManager
-