Class AccuRevCommandLine
- java.lang.Object
-
- org.apache.maven.scm.provider.accurev.cli.AccuRevCommandLine
-
-
Field Summary
-
Fields 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 Constructor Description AccuRevCommandLine()AccuRevCommandLine(java.lang.String host, int port)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.io.File>add(java.io.File basedir, java.util.List<java.io.File> elements, java.lang.String message)Add the file to the repository.java.util.List<BlameLine>annotate(java.io.File basedir, java.io.File file)AccuRev annotate an elementbooleanchws(java.io.File basedir, java.lang.String workSpaceName, java.lang.String newBasisStream)Relocate/reparent a workspacejava.util.List<java.io.File>defunct(java.io.File basedir, java.util.List<java.io.File> files, java.lang.String message)Remove the file from the repository.java.util.List<FileDifference>diff(java.lang.String baseStream, java.lang.String fromTimeSpec, java.lang.String toTimeSpec)AccuRev differences of a stream between to timespecsprotected intexecuteCommandLine(org.codehaus.plexus.util.cli.Commandline cl, java.io.InputStream stdin, CommandOutputConsumer stdout, org.codehaus.plexus.util.cli.StreamConsumer stderr)Extracted so test class can overridejava.lang.StringgetClientVersion()protected org.codehaus.plexus.util.cli.CommandlinegetCommandline()java.lang.StringgetCommandLines()The accurev command line strings since last reset(), separated by ";"java.lang.StringgetErrorOutput()Full output of accurev command line invocations since resetjava.lang.StringgetExecutable()ScmLoggergetLogger()java.util.List<Transaction>history(java.lang.String baseStream, java.lang.String fromTimeSpec, java.lang.String toTimeSpec, int count, boolean depotHistory, boolean transactionsOnly)AccuRevInfoinfo(java.io.File basedir)Get info about the current logged in user for the current workspace.booleanlogin(java.lang.String user, java.lang.String password)Logins in as the given user, retains authtoken for use with subsequent commands.booleanlogout()booleanmkdepot(java.lang.String depotName)booleanmksnap(java.lang.String snapShotName, java.lang.String basisStream)booleanmkstream(java.lang.String backingStream, java.lang.String newStreamName)booleanmkws(java.lang.String basisStream, java.lang.String workspaceName, java.io.File basedir)Make workspacejava.util.List<java.io.File>pop(java.io.File basedir, java.util.Collection<java.io.File> elements)Re populate missing files to existing workspace.java.util.List<java.io.File>popExternal(java.io.File basedir, java.lang.String versionSpec, java.lang.String tranSpec, java.util.Collection<java.io.File> elements)Populate external to a workspace a (stream) and transactionId/time, to a specific location.java.util.List<java.io.File>promote(java.io.File basedir, java.util.List<java.io.File> files, java.lang.String message)java.util.List<java.io.File>promoteAll(java.io.File baseDir, java.lang.String commitMessage)Any elements that have been kept previously or are currently modified will be promoted.booleanpromoteStream(java.lang.String subStream, java.lang.String commitMessage, java.util.List<java.io.File> promotedFiles)booleanreactivate(java.lang.String workSpaceName)Reactivate a workspacevoidreset()Reset command process, clear command output accumulatorsbooleanrmws(java.lang.String workSpaceName)Deactivate a workspacevoidsetExecutable(java.lang.String accuRevExe)voidsetLogger(ScmLogger logger)voidsetServer(java.lang.String host, int port)java.util.Map<java.lang.String,WorkSpace>showRefTrees()StreamshowStream(java.lang.String stream)java.util.Map<java.lang.String,WorkSpace>showWorkSpaces()java.lang.Stringstat(java.io.File element)Accurev status of an elementjava.util.List<java.io.File>stat(java.io.File basedir, java.util.Collection<java.io.File> elements, AccuRevStat statType)CategorisedElementsstatBackingStream(java.io.File basedir, java.util.Collection<java.io.File> elements)Sorts list of elements by whether they exist in the backing stream or not.java.util.List<java.io.File>statTag(java.lang.String streamName)booleansyncReplica()java.util.List<java.io.File>update(java.io.File baseDir, java.lang.String transactionId)Update a workspace or reftree, to a particular transaction id
-
-
-
Method Detail
-
setServer
public void setServer(java.lang.String host, int port)
-
setExecutable
public void setExecutable(java.lang.String accuRevExe)
-
executeCommandLine
protected int executeCommandLine(org.codehaus.plexus.util.cli.Commandline cl, java.io.InputStream stdin, CommandOutputConsumer stdout, org.codehaus.plexus.util.cli.StreamConsumer stderr) throws org.codehaus.plexus.util.cli.CommandLineExceptionExtracted 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
public boolean mkws(java.lang.String basisStream, java.lang.String workspaceName, java.io.File basedir) throws AccuRevExceptionMake workspace- Specified by:
mkwsin interfaceAccuRev- Returns:
- Throws:
AccuRevException
-
update
public java.util.List<java.io.File> update(java.io.File baseDir, java.lang.String transactionId) throws AccuRevExceptionUpdate a workspace or reftree, to a particular transaction id- Specified by:
updatein interfaceAccuRev- Returns:
- Throws:
AccuRevException
-
add
public java.util.List<java.io.File> add(java.io.File basedir, java.util.List<java.io.File> elements, java.lang.String message) throws AccuRevExceptionAdd 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
public java.util.List<java.io.File> defunct(java.io.File basedir, java.util.List<java.io.File> files, java.lang.String message) throws AccuRevExceptionDescription copied from interface:AccuRevRemove the file from the repository. Files must be within a workspace- Specified by:
defunctin interfaceAccuRev- Returns:
- Throws:
AccuRevException
-
promote
public java.util.List<java.io.File> promote(java.io.File basedir, java.util.List<java.io.File> files, java.lang.String message) throws AccuRevException- Specified by:
promotein interfaceAccuRev- Throws:
AccuRevException
-
getCommandLines
public java.lang.String getCommandLines()
Description copied from interface:AccuRevThe accurev command line strings since last reset(), separated by ";"- Specified by:
getCommandLinesin interfaceAccuRev- Returns:
-
getErrorOutput
public java.lang.String getErrorOutput()
Description copied from interface:AccuRevFull output of accurev command line invocations since reset- Specified by:
getErrorOutputin interfaceAccuRev- Returns:
-
setLogger
public void setLogger(ScmLogger logger)
-
getLogger
public ScmLogger getLogger()
-
mkdepot
public boolean mkdepot(java.lang.String depotName) throws AccuRevException- Throws:
AccuRevException
-
mkstream
public boolean mkstream(java.lang.String backingStream, java.lang.String newStreamName) throws AccuRevException- Throws:
AccuRevException
-
promoteStream
public boolean promoteStream(java.lang.String subStream, java.lang.String commitMessage, java.util.List<java.io.File> promotedFiles) throws AccuRevException- Throws:
AccuRevException
-
promoteAll
public java.util.List<java.io.File> promoteAll(java.io.File baseDir, java.lang.String commitMessage) throws AccuRevExceptionAny 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 on- Returns:
- Throws:
AccuRevException
-
info
public AccuRevInfo info(java.io.File basedir) throws AccuRevException
Description copied from interface:AccuRevGet info about the current logged in user for the current workspace.- Specified by:
infoin interfaceAccuRev- Returns:
- Throws:
AccuRevException
-
reactivate
public boolean reactivate(java.lang.String workSpaceName) throws AccuRevExceptionDescription 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
public boolean rmws(java.lang.String workSpaceName) throws AccuRevExceptionDescription 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
public java.lang.String stat(java.io.File element) throws AccuRevExceptionDescription copied from interface:AccuRevAccurev status of an element- Specified by:
statin interfaceAccuRev- Returns:
- null if ignored or not in workspace
- Throws:
AccuRevException
-
chws
public boolean chws(java.io.File basedir, java.lang.String workSpaceName, java.lang.String newBasisStream) throws AccuRevExceptionDescription copied from interface:AccuRevRelocate/reparent a workspace- Specified by:
chwsin interfaceAccuRevworkSpaceName- (full workspacename including user)- Returns:
- Throws:
AccuRevException
-
mksnap
public boolean mksnap(java.lang.String snapShotName, java.lang.String basisStream) throws AccuRevException- Specified by:
mksnapin interfaceAccuRev- Throws:
AccuRevException
-
statTag
public java.util.List<java.io.File> statTag(java.lang.String streamName) throws AccuRevException- Specified by:
statTagin interfaceAccuRev- Throws:
AccuRevException
-
stat
public java.util.List<java.io.File> stat(java.io.File basedir, java.util.Collection<java.io.File> elements, AccuRevStat statType) throws AccuRevException- Specified by:
statin interfaceAccuRevelements- list of elements to stat, relative to basedir- Returns:
- Throws:
AccuRevException
-
pop
public java.util.List<java.io.File> pop(java.io.File basedir, java.util.Collection<java.io.File> elements) throws AccuRevExceptionDescription copied from interface:AccuRevRe populate missing files to existing workspace.- Specified by:
popin interfaceAccuRev- Returns:
- Throws:
AccuRevException
-
popExternal
public java.util.List<java.io.File> popExternal(java.io.File basedir, java.lang.String versionSpec, java.lang.String tranSpec, java.util.Collection<java.io.File> elements) throws AccuRevExceptionDescription 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 interfaceAccuRevversionSpec- 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(java.io.File basedir, java.util.Collection<java.io.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- Returns:
- Throws:
AccuRevException
-
history
public java.util.List<Transaction> history(java.lang.String baseStream, java.lang.String fromTimeSpec, java.lang.String toTimeSpec, int count, boolean depotHistory, boolean transactionsOnly) throws AccuRevException
- Specified by:
historyin interfaceAccuRev- Throws:
AccuRevException
-
diff
public java.util.List<FileDifference> diff(java.lang.String baseStream, java.lang.String fromTimeSpec, java.lang.String toTimeSpec) throws AccuRevException
Description copied from interface:AccuRevAccuRev differences of a stream between to timespecs- Specified by:
diffin interfaceAccuRev- Returns:
- Throws:
AccuRevException
-
login
public boolean login(java.lang.String user, java.lang.String password) throws AccuRevExceptionDescription copied from interface:AccuRevLogins in as the given user, retains authtoken for use with subsequent commands.- Specified by:
loginin interfaceAccuRev- Returns:
- Throws:
AccuRevException
-
logout
public boolean logout() throws AccuRevException- Throws:
AccuRevException
-
annotate
public java.util.List<BlameLine> annotate(java.io.File basedir, java.io.File file) throws AccuRevException
Description copied from interface:AccuRevAccuRev annotate an element- Specified by:
annotatein interfaceAccuRev- Returns:
- Throws:
AccuRevException
-
showRefTrees
public java.util.Map<java.lang.String,WorkSpace> showRefTrees() throws AccuRevException
- Specified by:
showRefTreesin interfaceAccuRev- Throws:
AccuRevException
-
showWorkSpaces
public java.util.Map<java.lang.String,WorkSpace> showWorkSpaces() throws AccuRevException
- Specified by:
showWorkSpacesin interfaceAccuRev- Throws:
AccuRevException
-
showStream
public Stream showStream(java.lang.String stream) throws AccuRevException
- Specified by:
showStreamin interfaceAccuRev- Throws:
AccuRevException
-
getExecutable
public java.lang.String getExecutable()
- Specified by:
getExecutablein interfaceAccuRev
-
getClientVersion
public java.lang.String getClientVersion() throws AccuRevException- Specified by:
getClientVersionin interfaceAccuRev- Throws:
AccuRevException
-
syncReplica
public boolean syncReplica() throws AccuRevException- Specified by:
syncReplicain interfaceAccuRev- Throws:
AccuRevException
-
-