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
- CommandLineException
protected Commandline getCommandline()
public void reset()
AccuRev
public boolean mkws(String basisStream, String workspaceName, File basedir) throws AccuRevException
mkws
in interface AccuRev
AccuRevException
public List<File> update(File baseDir, String transactionId) throws AccuRevException
update
in interface AccuRev
AccuRevException
public List<File> add(File basedir, List<File> elements, 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 List<File> defunct(File basedir, List<File> files, String message) throws AccuRevException
AccuRev
defunct
in interface AccuRev
AccuRevException
public List<File> promote(File basedir, List<File> files, String message) throws AccuRevException
promote
in interface AccuRev
AccuRevException
public String getCommandLines()
AccuRev
getCommandLines
in interface AccuRev
public String getErrorOutput()
AccuRev
getErrorOutput
in interface AccuRev
public boolean mkdepot(String depotName) throws AccuRevException
AccuRevException
public boolean mkstream(String backingStream, String newStreamName) throws AccuRevException
AccuRevException
public boolean promoteStream(String subStream, String commitMessage, List<File> promotedFiles) throws AccuRevException
AccuRevException
public List<File> promoteAll(File baseDir, String commitMessage) throws AccuRevException
promoteAll
in interface AccuRev
baseDir
- - location of the workspace to act onAccuRevException
public AccuRevInfo info(File basedir) throws AccuRevException
AccuRev
info
in interface AccuRev
AccuRevException
public boolean reactivate(String workSpaceName) throws AccuRevException
AccuRev
reactivate
in interface AccuRev
workSpaceName
- full name of the workspace, including the user suffixAccuRevException
public boolean rmws(String workSpaceName) throws AccuRevException
AccuRev
rmws
in interface AccuRev
workSpaceName
- full name of the workspace, including the user suffixAccuRevException
public String stat(File element) throws AccuRevException
AccuRev
stat
in interface AccuRev
AccuRevException
public boolean chws(File basedir, String workSpaceName, String newBasisStream) throws AccuRevException
AccuRev
chws
in interface AccuRev
workSpaceName
- (full workspacename including user)AccuRevException
public boolean mksnap(String snapShotName, String basisStream) throws AccuRevException
mksnap
in interface AccuRev
AccuRevException
public List<File> statTag(String streamName) throws AccuRevException
statTag
in interface AccuRev
AccuRevException
public List<File> stat(File basedir, Collection<File> elements, AccuRevStat statType) throws AccuRevException
stat
in interface AccuRev
elements
- list of elements to stat, relative to basedirAccuRevException
public List<File> pop(File basedir, Collection<File> elements) throws AccuRevException
AccuRev
pop
in interface AccuRev
AccuRevException
public 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 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(File basedir, Collection<File> elements) throws AccuRevException
AccuRev
statBackingStream
in interface AccuRev
AccuRevException
public List<Transaction> history(String baseStream, String fromTimeSpec, String toTimeSpec, int count, boolean depotHistory, boolean transactionsOnly) throws AccuRevException
history
in interface AccuRev
AccuRevException
public List<FileDifference> diff(String baseStream, String fromTimeSpec, String toTimeSpec) throws AccuRevException
AccuRev
diff
in interface AccuRev
AccuRevException
public boolean login(String user, String password) throws AccuRevException
AccuRev
login
in interface AccuRev
AccuRevException
public boolean logout() throws AccuRevException
AccuRevException
public List<BlameLine> annotate(File basedir, File file) throws AccuRevException
AccuRev
annotate
in interface AccuRev
AccuRevException
public Map<String,WorkSpace> showRefTrees() throws AccuRevException
showRefTrees
in interface AccuRev
AccuRevException
public Map<String,WorkSpace> showWorkSpaces() throws AccuRevException
showWorkSpaces
in interface AccuRev
AccuRevException
public Stream showStream(String stream) throws AccuRevException
showStream
in interface AccuRev
AccuRevException
public String getExecutable()
getExecutable
in interface AccuRev
public String getClientVersion() throws AccuRevException
getClientVersion
in interface AccuRev
AccuRevException
public boolean syncReplica() throws AccuRevException
syncReplica
in interface AccuRev
AccuRevException
Copyright © 2003–2015 The Apache Software Foundation. All rights reserved.