Class AccuRevCommandLine
java.lang.Object
org.apache.maven.scm.provider.accurev.cli.AccuRevCommandLine
- All Implemented Interfaces:
AccuRev
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String[]private org.codehaus.plexus.util.cli.Commandlineprivate Stringprivate StringBuilderprivate static final Fileprivate static final String[]private StringBuilderprivate Stringprivate longprivate String[]private ScmLoggerprivate org.codehaus.plexus.util.cli.StreamConsumerFields inherited from interface org.apache.maven.scm.provider.accurev.AccuRev
ACCUREV_TIME_FORMAT_STRING, ACCUREV_TIME_SPEC, DEFAULT_ACCUREV_EXECUTABLE, DEFAULT_ADD_MESSAGE, DEFAULT_PORT, DEFAULT_PROMOTE_MESSAGE, DEFAULT_REMOVE_MESSAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd the file to the repository.AccuRev annotate an elementbooleanRelocate/reparent a workspaceRemove the file from the repository.AccuRev differences of a stream between to timespecsprivate booleanexecuteCommandLine(File basedir, String[] args, Iterable<File> elements, Pattern matchPattern, List<File> matchedFiles) private booleanexecuteCommandLine(File basedir, String[] args, Iterable<File> elements, org.codehaus.plexus.util.cli.StreamConsumer stdoutConsumer) private intexecuteCommandLine(InputStream stdin, org.codehaus.plexus.util.cli.StreamConsumer stdout) private booleanexecuteCommandLine(String[] args) private intexecuteCommandLine(String[] args, InputStream stdin, org.codehaus.plexus.util.cli.StreamConsumer stdout) protected intexecuteCommandLine(org.codehaus.plexus.util.cli.Commandline cl, InputStream stdin, CommandOutputConsumer stdout, org.codehaus.plexus.util.cli.StreamConsumer stderr) Extracted so test class can overrideprotected org.codehaus.plexus.util.cli.CommandlineThe accurev command line strings since last reset(), separated by ";"Full output of accurev command line invocations since resethistory(String baseStream, String fromTimeSpec, String toTimeSpec, int count, boolean depotHistory, boolean transactionsOnly) Get info about the current logged in user for the current workspace.booleanLogins in as the given user, retains authtoken for use with subsequent commands.booleanlogout()booleanbooleanbooleanbooleanMake workspacepop(File basedir, Collection<File> elements) Re populate missing files to existing workspace.popExternal(File basedir, String versionSpec, String tranSpec, Collection<File> elements) Populate external to a workspace a (stream) and transactionId/time, to a specific location.promoteAll(File baseDir, String commitMessage) Any elements that have been kept previously or are currently modified will be promoted.booleanpromoteStream(String subStream, String commitMessage, List<File> promotedFiles) booleanreactivate(String workSpaceName) Reactivate a workspacevoidreset()Reset command process, clear command output accumulatorsbooleanDeactivate a workspaceprivate voidsetCommandLineArgs(String[] args) voidsetExecutable(String accuRevExe) voidvoidprivate voidsetWorkingDirectory(File basedir) showStream(String stream) Accurev status of an elementstat(File basedir, Collection<File> elements, AccuRevStat statType) statBackingStream(File basedir, Collection<File> elements) Sorts list of elements by whether they exist in the backing stream or not.booleanUpdate a workspace or reftree, to a particular transaction id
-
Field Details
-
EMPTY_STRING_ARRAY
-
CURRENT_DIR
-
logger
-
cl
private org.codehaus.plexus.util.cli.Commandline cl -
commandLines
-
errorOutput
-
systemErr
private org.codehaus.plexus.util.cli.StreamConsumer systemErr -
hostArgs
-
authArgs
-
executable
-
executableModTime
private long executableModTime -
clientVersion
-
-
Constructor Details
-
AccuRevCommandLine
public AccuRevCommandLine() -
AccuRevCommandLine
-
-
Method Details
-
setServer
-
setExecutable
-
executeCommandLine
private boolean executeCommandLine(File basedir, String[] args, Iterable<File> elements, Pattern matchPattern, List<File> matchedFiles) throws AccuRevException - Throws:
AccuRevException
-
executeCommandLine
private boolean executeCommandLine(File basedir, String[] args, Iterable<File> elements, org.codehaus.plexus.util.cli.StreamConsumer stdoutConsumer) throws AccuRevException - Throws:
AccuRevException
-
setCommandLineArgs
-
executeCommandLine
- Throws:
AccuRevException
-
executeCommandLine
private int executeCommandLine(String[] args, InputStream stdin, org.codehaus.plexus.util.cli.StreamConsumer stdout) throws AccuRevException - Throws:
AccuRevException
-
executeCommandLine
private int executeCommandLine(InputStream stdin, org.codehaus.plexus.util.cli.StreamConsumer stdout) throws AccuRevException - Throws:
AccuRevException
-
executeCommandLine
protected int executeCommandLine(org.codehaus.plexus.util.cli.Commandline cl, InputStream stdin, CommandOutputConsumer stdout, org.codehaus.plexus.util.cli.StreamConsumer stderr) throws org.codehaus.plexus.util.cli.CommandLineException Extracted so test class can override- Parameters:
stdin-stdout-stderr-- Returns:
- Throws:
org.codehaus.plexus.util.cli.CommandLineException
-
getCommandline
protected org.codehaus.plexus.util.cli.Commandline getCommandline() -
reset
public void reset()Description copied from interface:AccuRevReset command process, clear command output accumulators -
mkws
Make workspace- Specified by:
mkwsin interfaceAccuRev- Parameters:
basisStream-workspaceName-basedir-- Returns:
- Throws:
AccuRevException
-
update
Update a workspace or reftree, to a particular transaction id- Specified by:
updatein interfaceAccuRev- Parameters:
baseDir-transactionId-- Returns:
- Throws:
AccuRevException
-
add
Add the file to the repository. File must be within a workspace- Specified by:
addin interfaceAccuRev- Parameters:
basedir- base directory of the workspaceelements- to add (relative to basedir, or absolute)message- the commit message- Throws:
AccuRevException
-
defunct
Description copied from interface:AccuRevRemove the file from the repository. Files must be within a workspace- Specified by:
defunctin interfaceAccuRev- Parameters:
basedir-files-message-- Returns:
- Throws:
AccuRevException
-
promote
- Specified by:
promotein interfaceAccuRev- Throws:
AccuRevException
-
getCommandLines
Description copied from interface:AccuRevThe accurev command line strings since last reset(), separated by ";"- Specified by:
getCommandLinesin interfaceAccuRev- Returns:
-
getErrorOutput
Description copied from interface:AccuRevFull output of accurev command line invocations since reset- Specified by:
getErrorOutputin interfaceAccuRev- Returns:
-
setLogger
-
getLogger
-
mkdepot
- Throws:
AccuRevException
-
mkstream
- Throws:
AccuRevException
-
promoteStream
public boolean promoteStream(String subStream, String commitMessage, List<File> promotedFiles) throws AccuRevException - Throws:
AccuRevException
-
promoteAll
Any elements that have been kept previously or are currently modified will be promoted.- Specified by:
promoteAllin interfaceAccuRev- Parameters:
baseDir- - location of the workspace to act oncommitMessage-- Returns:
- Throws:
AccuRevException
-
info
Description copied from interface:AccuRevGet info about the current logged in user for the current workspace.- Specified by:
infoin interfaceAccuRev- Parameters:
basedir-- Returns:
- Throws:
AccuRevException
-
setWorkingDirectory
-
reactivate
Description copied from interface:AccuRevReactivate a workspace- Specified by:
reactivatein interfaceAccuRev- Parameters:
workSpaceName- full name of the workspace, including the user suffix- Returns:
- Throws:
AccuRevException
-
rmws
Description copied from interface:AccuRevDeactivate a workspace- Specified by:
rmwsin interfaceAccuRev- Parameters:
workSpaceName- full name of the workspace, including the user suffix- Returns:
- Throws:
AccuRevException
-
stat
Description copied from interface:AccuRevAccurev status of an element- Specified by:
statin interfaceAccuRev- Parameters:
element-- Returns:
- null if ignored or not in workspace
- Throws:
AccuRevException
-
chws
public boolean chws(File basedir, String workSpaceName, String newBasisStream) throws AccuRevException Description copied from interface:AccuRevRelocate/reparent a workspace- Specified by:
chwsin interfaceAccuRev- Parameters:
basedir-workSpaceName- (full workspacename including user)newBasisStream-- Returns:
- Throws:
AccuRevException
-
mksnap
- Specified by:
mksnapin interfaceAccuRev- Throws:
AccuRevException
-
statTag
- Specified by:
statTagin interfaceAccuRev- Throws:
AccuRevException
-
stat
public List<File> stat(File basedir, Collection<File> elements, AccuRevStat statType) throws AccuRevException - Specified by:
statin interfaceAccuRev- Parameters:
basedir-elements- list of elements to stat, relative to basedirstatType-- Returns:
- Throws:
AccuRevException
-
pop
Description copied from interface:AccuRevRe populate missing files to existing workspace.- Specified by:
popin interfaceAccuRev- Parameters:
basedir-elements-- Returns:
- Throws:
AccuRevException
-
popExternal
public List<File> popExternal(File basedir, String versionSpec, String tranSpec, Collection<File> elements) throws AccuRevException Description copied from interface:AccuRevPopulate external to a workspace a (stream) and transactionId/time, to a specific location.You must check
AccuRevCapability.POPULATE_TO_TRANSACTIONbefore passing a tranid/time to this method. If not supported should pass "now","highest" or null for tranSpec- Specified by:
popExternalin interfaceAccuRev- Parameters:
basedir-versionSpec- stream to update totranSpec- transaction to update to or "now" if not supported.elements- (must be depot relative. if null "/./" root is used)- Returns:
- Throws:
AccuRevException
-
statBackingStream
public CategorisedElements statBackingStream(File basedir, Collection<File> elements) throws AccuRevException Description copied from interface:AccuRevSorts list of elements by whether they exist in the backing stream or not.- Specified by:
statBackingStreamin interfaceAccuRev- Parameters:
basedir-elements-- Returns:
- Throws:
AccuRevException
-
history
public List<Transaction> history(String baseStream, String fromTimeSpec, String toTimeSpec, int count, boolean depotHistory, boolean transactionsOnly) throws AccuRevException - Specified by:
historyin interfaceAccuRev- Throws:
AccuRevException
-
diff
public List<FileDifference> diff(String baseStream, String fromTimeSpec, String toTimeSpec) throws AccuRevException Description copied from interface:AccuRevAccuRev differences of a stream between to timespecs- Specified by:
diffin interfaceAccuRev- Parameters:
baseStream-fromTimeSpec-toTimeSpec-- Returns:
- Throws:
AccuRevException
-
login
Description copied from interface:AccuRevLogins in as the given user, retains authtoken for use with subsequent commands.- Specified by:
loginin interfaceAccuRev- Parameters:
user-password-- Returns:
- Throws:
AccuRevException
-
logout
- Throws:
AccuRevException
-
annotate
Description copied from interface:AccuRevAccuRev annotate an element- Specified by:
annotatein interfaceAccuRev- Parameters:
file-- Returns:
- Throws:
AccuRevException
-
showRefTrees
- Specified by:
showRefTreesin interfaceAccuRev- Throws:
AccuRevException
-
showWorkSpaces
- Specified by:
showWorkSpacesin interfaceAccuRev- Throws:
AccuRevException
-
showStream
- Specified by:
showStreamin interfaceAccuRev- Throws:
AccuRevException
-
getExecutable
- Specified by:
getExecutablein interfaceAccuRev
-
getClientVersion
- Specified by:
getClientVersionin interfaceAccuRev- Throws:
AccuRevException
-
syncReplica
- Specified by:
syncReplicain interfaceAccuRev- Throws:
AccuRevException
-