Modifier and Type | Field and Description |
---|---|
private java.lang.String[] |
authArgs |
private org.codehaus.plexus.util.cli.Commandline |
cl |
private java.lang.String |
clientVersion |
private java.lang.StringBuilder |
commandLines |
private static java.io.File |
CURRENT_DIR |
private static java.lang.String[] |
EMPTY_STRING_ARRAY |
private java.lang.StringBuilder |
errorOutput |
private java.lang.String |
executable |
private long |
executableModTime |
private java.lang.String[] |
hostArgs |
private ScmLogger |
logger |
private org.codehaus.plexus.util.cli.StreamConsumer |
systemErr |
ACCUREV_TIME_FORMAT_STRING, ACCUREV_TIME_SPEC, DEFAULT_ACCUREV_EXECUTABLE, DEFAULT_ADD_MESSAGE, DEFAULT_PORT, DEFAULT_PROMOTE_MESSAGE, DEFAULT_REMOVE_MESSAGE
Constructor and Description |
---|
AccuRevCommandLine() |
AccuRevCommandLine(java.lang.String host,
int port) |
Modifier and Type | Method and 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 element
|
boolean |
chws(java.io.File basedir,
java.lang.String workSpaceName,
java.lang.String newBasisStream)
Relocate/reparent a workspace
|
java.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 timespecs
|
protected int |
executeCommandLine(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 override
|
private boolean |
executeCommandLine(java.io.File basedir,
java.lang.String[] args,
java.lang.Iterable<java.io.File> elements,
java.util.regex.Pattern matchPattern,
java.util.List<java.io.File> matchedFiles) |
private boolean |
executeCommandLine(java.io.File basedir,
java.lang.String[] args,
java.lang.Iterable<java.io.File> elements,
org.codehaus.plexus.util.cli.StreamConsumer stdoutConsumer) |
private int |
executeCommandLine(java.io.InputStream stdin,
org.codehaus.plexus.util.cli.StreamConsumer stdout) |
private boolean |
executeCommandLine(java.lang.String[] args) |
private int |
executeCommandLine(java.lang.String[] args,
java.io.InputStream stdin,
org.codehaus.plexus.util.cli.StreamConsumer stdout) |
java.lang.String |
getClientVersion() |
protected org.codehaus.plexus.util.cli.Commandline |
getCommandline() |
java.lang.String |
getCommandLines()
The accurev command line strings since last reset(), separated by ";"
|
java.lang.String |
getErrorOutput()
Full output of accurev command line invocations since reset
|
java.lang.String |
getExecutable() |
ScmLogger |
getLogger() |
java.util.List<Transaction> |
history(java.lang.String baseStream,
java.lang.String fromTimeSpec,
java.lang.String toTimeSpec,
int count,
boolean depotHistory,
boolean transactionsOnly) |
AccuRevInfo |
info(java.io.File basedir)
Get info about the current logged in user for the current workspace.
|
boolean |
login(java.lang.String user,
java.lang.String password)
Logins in as the given user, retains authtoken for use with subsequent commands.
|
boolean |
logout() |
boolean |
mkdepot(java.lang.String depotName) |
boolean |
mksnap(java.lang.String snapShotName,
java.lang.String basisStream) |
boolean |
mkstream(java.lang.String backingStream,
java.lang.String newStreamName) |
boolean |
mkws(java.lang.String basisStream,
java.lang.String workspaceName,
java.io.File basedir)
Make workspace
|
java.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.
|
boolean |
promoteStream(java.lang.String subStream,
java.lang.String commitMessage,
java.util.List<java.io.File> promotedFiles) |
boolean |
reactivate(java.lang.String workSpaceName)
Reactivate a workspace
|
void |
reset()
Reset command process, clear command output accumulators
|
boolean |
rmws(java.lang.String workSpaceName)
Deactivate a workspace
|
private void |
setCommandLineArgs(java.lang.String[] args) |
void |
setExecutable(java.lang.String accuRevExe) |
void |
setLogger(ScmLogger logger) |
void |
setServer(java.lang.String host,
int port) |
private void |
setWorkingDirectory(java.io.File basedir) |
java.util.Map<java.lang.String,WorkSpace> |
showRefTrees() |
Stream |
showStream(java.lang.String stream) |
java.util.Map<java.lang.String,WorkSpace> |
showWorkSpaces() |
java.lang.String |
stat(java.io.File element)
Accurev status of an element
|
java.util.List<java.io.File> |
stat(java.io.File basedir,
java.util.Collection<java.io.File> elements,
AccuRevStat statType) |
CategorisedElements |
statBackingStream(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) |
boolean |
syncReplica() |
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
|
private static final java.lang.String[] EMPTY_STRING_ARRAY
private static final java.io.File CURRENT_DIR
private ScmLogger logger
private org.codehaus.plexus.util.cli.Commandline cl
private java.lang.StringBuilder commandLines
private java.lang.StringBuilder errorOutput
private org.codehaus.plexus.util.cli.StreamConsumer systemErr
private java.lang.String[] hostArgs
private java.lang.String[] authArgs
private java.lang.String executable
private long executableModTime
private java.lang.String clientVersion
public AccuRevCommandLine()
public AccuRevCommandLine(java.lang.String host, int port)
public void setServer(java.lang.String host, int port)
public void setExecutable(java.lang.String accuRevExe)
private boolean executeCommandLine(java.io.File basedir, java.lang.String[] args, java.lang.Iterable<java.io.File> elements, java.util.regex.Pattern matchPattern, java.util.List<java.io.File> matchedFiles) throws AccuRevException
AccuRevException
private boolean executeCommandLine(java.io.File basedir, java.lang.String[] args, java.lang.Iterable<java.io.File> elements, org.codehaus.plexus.util.cli.StreamConsumer stdoutConsumer) throws AccuRevException
AccuRevException
private void setCommandLineArgs(java.lang.String[] args)
private boolean executeCommandLine(java.lang.String[] args) throws AccuRevException
AccuRevException
private int executeCommandLine(java.lang.String[] args, java.io.InputStream stdin, org.codehaus.plexus.util.cli.StreamConsumer stdout) throws AccuRevException
AccuRevException
private int executeCommandLine(java.io.InputStream stdin, org.codehaus.plexus.util.cli.StreamConsumer stdout) throws AccuRevException
AccuRevException
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.CommandLineException
stdin
- stdout
- stderr
- org.codehaus.plexus.util.cli.CommandLineException
protected org.codehaus.plexus.util.cli.Commandline getCommandline()
public void reset()
AccuRev
public boolean mkws(java.lang.String basisStream, java.lang.String workspaceName, java.io.File basedir) throws AccuRevException
mkws
in interface AccuRev
AccuRevException
public java.util.List<java.io.File> update(java.io.File baseDir, java.lang.String transactionId) throws AccuRevException
update
in interface AccuRev
AccuRevException
public java.util.List<java.io.File> add(java.io.File basedir, java.util.List<java.io.File> elements, java.lang.String message) throws AccuRevException
add
in interface AccuRev
basedir
- base directory of the workspaceelements
- to add (relative to basedir, or absolute)message
- the commit messageAccuRevException
public java.util.List<java.io.File> defunct(java.io.File basedir, java.util.List<java.io.File> files, java.lang.String message) throws AccuRevException
AccuRev
defunct
in interface AccuRev
AccuRevException
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
promote
in interface AccuRev
AccuRevException
public java.lang.String getCommandLines()
AccuRev
getCommandLines
in interface AccuRev
public java.lang.String getErrorOutput()
AccuRev
getErrorOutput
in interface AccuRev
public void setLogger(ScmLogger logger)
public ScmLogger getLogger()
public boolean mkdepot(java.lang.String depotName) throws AccuRevException
AccuRevException
public boolean mkstream(java.lang.String backingStream, java.lang.String newStreamName) throws AccuRevException
AccuRevException
public boolean promoteStream(java.lang.String subStream, java.lang.String commitMessage, java.util.List<java.io.File> promotedFiles) throws AccuRevException
AccuRevException
public java.util.List<java.io.File> promoteAll(java.io.File baseDir, java.lang.String commitMessage) throws AccuRevException
promoteAll
in interface AccuRev
baseDir
- - location of the workspace to act onAccuRevException
public AccuRevInfo info(java.io.File basedir) throws AccuRevException
AccuRev
info
in interface AccuRev
AccuRevException
private void setWorkingDirectory(java.io.File basedir)
public boolean reactivate(java.lang.String workSpaceName) throws AccuRevException
AccuRev
reactivate
in interface AccuRev
workSpaceName
- full name of the workspace, including the user suffixAccuRevException
public boolean rmws(java.lang.String workSpaceName) throws AccuRevException
AccuRev
rmws
in interface AccuRev
workSpaceName
- full name of the workspace, including the user suffixAccuRevException
public java.lang.String stat(java.io.File element) throws AccuRevException
AccuRev
stat
in interface AccuRev
AccuRevException
public boolean chws(java.io.File basedir, java.lang.String workSpaceName, java.lang.String newBasisStream) throws AccuRevException
AccuRev
chws
in interface AccuRev
workSpaceName
- (full workspacename including user)AccuRevException
public boolean mksnap(java.lang.String snapShotName, java.lang.String basisStream) throws AccuRevException
mksnap
in interface AccuRev
AccuRevException
public java.util.List<java.io.File> statTag(java.lang.String streamName) throws AccuRevException
statTag
in interface AccuRev
AccuRevException
public java.util.List<java.io.File> stat(java.io.File basedir, java.util.Collection<java.io.File> elements, AccuRevStat statType) throws AccuRevException
stat
in interface AccuRev
elements
- list of elements to stat, relative to basedirAccuRevException
public java.util.List<java.io.File> pop(java.io.File basedir, java.util.Collection<java.io.File> elements) throws AccuRevException
AccuRev
pop
in interface AccuRev
AccuRevException
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 AccuRevException
AccuRev
You must check AccuRevCapability.POPULATE_TO_TRANSACTION
before passing a tranid/time
to this method. If not supported should pass "now","highest" or null for tranSpec
popExternal
in interface AccuRev
versionSpec
- stream to update totranSpec
- transaction to update to or "now" if not supported.elements
- (must be depot relative. if null "/./" root is used)AccuRevException
public CategorisedElements statBackingStream(java.io.File basedir, java.util.Collection<java.io.File> elements) throws AccuRevException
AccuRev
statBackingStream
in interface AccuRev
AccuRevException
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
history
in interface AccuRev
AccuRevException
public java.util.List<FileDifference> diff(java.lang.String baseStream, java.lang.String fromTimeSpec, java.lang.String toTimeSpec) throws AccuRevException
AccuRev
diff
in interface AccuRev
AccuRevException
public boolean login(java.lang.String user, java.lang.String password) throws AccuRevException
AccuRev
login
in interface AccuRev
AccuRevException
public boolean logout() throws AccuRevException
AccuRevException
public java.util.List<BlameLine> annotate(java.io.File basedir, java.io.File file) throws AccuRevException
AccuRev
annotate
in interface AccuRev
AccuRevException
public java.util.Map<java.lang.String,WorkSpace> showRefTrees() throws AccuRevException
showRefTrees
in interface AccuRev
AccuRevException
public java.util.Map<java.lang.String,WorkSpace> showWorkSpaces() throws AccuRevException
showWorkSpaces
in interface AccuRev
AccuRevException
public Stream showStream(java.lang.String stream) throws AccuRevException
showStream
in interface AccuRev
AccuRevException
public java.lang.String getExecutable()
getExecutable
in interface AccuRev
public java.lang.String getClientVersion() throws AccuRevException
getClientVersion
in interface AccuRev
AccuRevException
public boolean syncReplica() throws AccuRevException
syncReplica
in interface AccuRev
AccuRevException