public class AccuRevCommandLine extends Object implements AccuRev
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(String host,
int port) |
| Modifier and Type | Method and Description |
|---|---|
List<File> |
add(File basedir,
List<File> elements,
String message)
Add the file to the repository.
|
List<BlameLine> |
annotate(File basedir,
File file)
AccuRev annotate an element
|
boolean |
chws(File basedir,
String workSpaceName,
String newBasisStream)
Relocate/reparent a workspace
|
List<File> |
defunct(File basedir,
List<File> files,
String message)
Remove the file from the repository.
|
List<FileDifference> |
diff(String baseStream,
String fromTimeSpec,
String toTimeSpec)
AccuRev differences of a stream between to timespecs
|
protected int |
executeCommandLine(Commandline cl,
InputStream stdin,
CommandOutputConsumer stdout,
StreamConsumer stderr)
Extracted so test class can override
|
String |
getClientVersion() |
protected Commandline |
getCommandline() |
String |
getCommandLines()
The accurev command line strings since last reset(), separated by ";"
|
String |
getErrorOutput()
Full output of accurev command line invocations since reset
|
String |
getExecutable() |
ScmLogger |
getLogger() |
List<Transaction> |
history(String baseStream,
String fromTimeSpec,
String toTimeSpec,
int count,
boolean depotHistory,
boolean transactionsOnly) |
AccuRevInfo |
info(File basedir)
Get info about the current logged in user for the current workspace.
|
boolean |
login(String user,
String password)
Logins in as the given user, retains authtoken for use with subsequent commands.
|
boolean |
logout() |
boolean |
mkdepot(String depotName) |
boolean |
mksnap(String snapShotName,
String basisStream) |
boolean |
mkstream(String backingStream,
String newStreamName) |
boolean |
mkws(String basisStream,
String workspaceName,
File basedir)
Make workspace
|
List<File> |
pop(File basedir,
Collection<File> elements)
Re populate missing files to existing workspace.
|
List<File> |
popExternal(File basedir,
String versionSpec,
String tranSpec,
Collection<File> elements)
Populate external to a workspace a (stream) and transactionId/time, to a specific location.
|
List<File> |
promote(File basedir,
List<File> files,
String message) |
List<File> |
promoteAll(File baseDir,
String commitMessage)
Any elements that have been kept previously or are currently modified will be promoted.
|
boolean |
promoteStream(String subStream,
String commitMessage,
List<File> promotedFiles) |
boolean |
reactivate(String workSpaceName)
Reactivate a workspace
|
void |
reset()
Reset command process, clear command output accumulators
|
boolean |
rmws(String workSpaceName)
Deactivate a workspace
|
void |
setExecutable(String accuRevExe) |
void |
setLogger(ScmLogger logger) |
void |
setServer(String host,
int port) |
Map<String,WorkSpace> |
showRefTrees() |
Stream |
showStream(String stream) |
Map<String,WorkSpace> |
showWorkSpaces() |
String |
stat(File element)
Accurev status of an element
|
List<File> |
stat(File basedir,
Collection<File> elements,
AccuRevStat statType) |
CategorisedElements |
statBackingStream(File basedir,
Collection<File> elements)
Sorts list of elements by whether they exist in the backing stream or not.
|
List<File> |
statTag(String streamName) |
boolean |
syncReplica() |
List<File> |
update(File baseDir,
String transactionId)
Update a workspace or reftree, to a particular transaction id
|
public AccuRevCommandLine()
public AccuRevCommandLine(String host, int port)
public void setExecutable(String accuRevExe)
protected int executeCommandLine(Commandline cl, InputStream stdin, CommandOutputConsumer stdout, StreamConsumer stderr) throws CommandLineException
stdin - stdout - stderr - CommandLineExceptionprotected Commandline getCommandline()
public void reset()
AccuRevpublic boolean mkws(String basisStream, String workspaceName, File basedir) throws AccuRevException
mkws in interface AccuRevAccuRevExceptionpublic List<File> update(File baseDir, String transactionId) throws AccuRevException
update in interface AccuRevAccuRevExceptionpublic List<File> add(File basedir, List<File> elements, String message) throws AccuRevException
add in interface AccuRevbasedir - base directory of the workspaceelements - to add (relative to basedir, or absolute)message - the commit messageAccuRevExceptionpublic List<File> defunct(File basedir, List<File> files, String message) throws AccuRevException
AccuRevdefunct in interface AccuRevAccuRevExceptionpublic List<File> promote(File basedir, List<File> files, String message) throws AccuRevException
promote in interface AccuRevAccuRevExceptionpublic String getCommandLines()
AccuRevgetCommandLines in interface AccuRevpublic String getErrorOutput()
AccuRevgetErrorOutput in interface AccuRevpublic boolean mkdepot(String depotName) throws AccuRevException
AccuRevExceptionpublic boolean mkstream(String backingStream, String newStreamName) throws AccuRevException
AccuRevExceptionpublic boolean promoteStream(String subStream, String commitMessage, List<File> promotedFiles) throws AccuRevException
AccuRevExceptionpublic List<File> promoteAll(File baseDir, String commitMessage) throws AccuRevException
promoteAll in interface AccuRevbaseDir - - location of the workspace to act onAccuRevExceptionpublic AccuRevInfo info(File basedir) throws AccuRevException
AccuRevinfo in interface AccuRevAccuRevExceptionpublic boolean reactivate(String workSpaceName) throws AccuRevException
AccuRevreactivate in interface AccuRevworkSpaceName - full name of the workspace, including the user suffixAccuRevExceptionpublic boolean rmws(String workSpaceName) throws AccuRevException
AccuRevrmws in interface AccuRevworkSpaceName - full name of the workspace, including the user suffixAccuRevExceptionpublic String stat(File element) throws AccuRevException
AccuRevstat in interface AccuRevAccuRevExceptionpublic boolean chws(File basedir, String workSpaceName, String newBasisStream) throws AccuRevException
AccuRevchws in interface AccuRevworkSpaceName - (full workspacename including user)AccuRevExceptionpublic boolean mksnap(String snapShotName, String basisStream) throws AccuRevException
mksnap in interface AccuRevAccuRevExceptionpublic List<File> statTag(String streamName) throws AccuRevException
statTag in interface AccuRevAccuRevExceptionpublic List<File> stat(File basedir, Collection<File> elements, AccuRevStat statType) throws AccuRevException
stat in interface AccuRevelements - list of elements to stat, relative to basedirAccuRevExceptionpublic List<File> pop(File basedir, Collection<File> elements) throws AccuRevException
AccuRevpop in interface AccuRevAccuRevExceptionpublic List<File> popExternal(File basedir, String versionSpec, String tranSpec, Collection<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 AccuRevversionSpec - stream to update totranSpec - transaction to update to or "now" if not supported.elements - (must be depot relative. if null "/./" root is used)AccuRevExceptionpublic CategorisedElements statBackingStream(File basedir, Collection<File> elements) throws AccuRevException
AccuRevstatBackingStream in interface AccuRevAccuRevExceptionpublic List<Transaction> history(String baseStream, String fromTimeSpec, String toTimeSpec, int count, boolean depotHistory, boolean transactionsOnly) throws AccuRevException
history in interface AccuRevAccuRevExceptionpublic List<FileDifference> diff(String baseStream, String fromTimeSpec, String toTimeSpec) throws AccuRevException
AccuRevdiff in interface AccuRevAccuRevExceptionpublic boolean login(String user, String password) throws AccuRevException
AccuRevlogin in interface AccuRevAccuRevExceptionpublic boolean logout() throws AccuRevException
AccuRevExceptionpublic List<BlameLine> annotate(File basedir, File file) throws AccuRevException
AccuRevannotate in interface AccuRevAccuRevExceptionpublic Map<String,WorkSpace> showRefTrees() throws AccuRevException
showRefTrees in interface AccuRevAccuRevExceptionpublic Map<String,WorkSpace> showWorkSpaces() throws AccuRevException
showWorkSpaces in interface AccuRevAccuRevExceptionpublic Stream showStream(String stream) throws AccuRevException
showStream in interface AccuRevAccuRevExceptionpublic String getExecutable()
getExecutable in interface AccuRevpublic String getClientVersion() throws AccuRevException
getClientVersion in interface AccuRevAccuRevExceptionpublic boolean syncReplica() throws AccuRevException
syncReplica in interface AccuRevAccuRevExceptionCopyright © 2003–2018 The Apache Software Foundation. All rights reserved.