Interface AccuRev
-
- All Known Implementing Classes:
AccuRevCommandLine
public interface AccuRevRepresents the AccuRev CLI interface- Author:
- ggardner
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringACCUREV_TIME_FORMAT_STRINGstatic java.text.DateFormatACCUREV_TIME_SPECstatic java.lang.StringDEFAULT_ACCUREV_EXECUTABLEstatic java.lang.StringDEFAULT_ADD_MESSAGEstatic intDEFAULT_PORTstatic java.lang.StringDEFAULT_PROMOTE_MESSAGEstatic java.lang.StringDEFAULT_REMOVE_MESSAGE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<java.io.File>add(java.io.File basedir, java.util.List<java.io.File> files, 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 timespecsjava.lang.StringgetClientVersion()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()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.booleanmksnap(java.lang.String snapShotName, java.lang.String basisStream)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 stream, 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 message)Any elements that have been kept previously or are currently modified will be promoted.booleanreactivate(java.lang.String workSpaceName)Reactivate a workspacevoidreset()Reset command process, clear command output accumulatorsbooleanrmws(java.lang.String workSpaceName)Deactivate a workspacejava.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
-
-
-
Field Detail
-
DEFAULT_ACCUREV_EXECUTABLE
static final java.lang.String DEFAULT_ACCUREV_EXECUTABLE
- See Also:
- Constant Field Values
-
DEFAULT_PORT
static final int DEFAULT_PORT
- See Also:
- Constant Field Values
-
ACCUREV_TIME_FORMAT_STRING
static final java.lang.String ACCUREV_TIME_FORMAT_STRING
- See Also:
- Constant Field Values
-
ACCUREV_TIME_SPEC
static final java.text.DateFormat ACCUREV_TIME_SPEC
-
DEFAULT_REMOVE_MESSAGE
static final java.lang.String DEFAULT_REMOVE_MESSAGE
- See Also:
- Constant Field Values
-
DEFAULT_ADD_MESSAGE
static final java.lang.String DEFAULT_ADD_MESSAGE
- See Also:
- Constant Field Values
-
DEFAULT_PROMOTE_MESSAGE
static final java.lang.String DEFAULT_PROMOTE_MESSAGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
reset
void reset()
Reset command process, clear command output accumulators
-
popExternal
java.util.List<java.io.File> popExternal(java.io.File basedir, java.lang.String stream, java.lang.String tranSpec, java.util.Collection<java.io.File> elements) throws AccuRevExceptionPopulate 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- Parameters:
basedir-stream- 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
-
pop
java.util.List<java.io.File> pop(java.io.File basedir, java.util.Collection<java.io.File> elements) throws AccuRevExceptionRe populate missing files to existing workspace.- Parameters:
basedir-elements-- Returns:
- Throws:
AccuRevException
-
mkws
boolean mkws(java.lang.String basisStream, java.lang.String workspaceName, java.io.File basedir) throws AccuRevExceptionMake workspace- Parameters:
basisStream-workspaceName-basedir-- Returns:
- Throws:
AccuRevException
-
update
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- Parameters:
basedir-transactionId-- Returns:
- Throws:
AccuRevException
-
info
AccuRevInfo info(java.io.File basedir) throws AccuRevException
Get info about the current logged in user for the current workspace.- Parameters:
basedir-- Returns:
- Throws:
AccuRevException
-
rmws
boolean rmws(java.lang.String workSpaceName) throws AccuRevExceptionDeactivate a workspace- Parameters:
workSpaceName- full name of the workspace, including the user suffix- Returns:
- Throws:
AccuRevException
-
reactivate
boolean reactivate(java.lang.String workSpaceName) throws AccuRevExceptionReactivate a workspace- Parameters:
workSpaceName- full name of the workspace, including the user suffix- Returns:
- Throws:
AccuRevException
-
getCommandLines
java.lang.String getCommandLines()
The accurev command line strings since last reset(), separated by ";"- Returns:
-
getErrorOutput
java.lang.String getErrorOutput()
Full output of accurev command line invocations since reset- Returns:
-
add
java.util.List<java.io.File> add(java.io.File basedir, java.util.List<java.io.File> files, java.lang.String message) throws AccuRevExceptionAdd the file to the repository. File must be within a workspace- Parameters:
basedir- base directory of the workspacefiles- to add (relative to basedir, or absolute)message- the commit message- Throws:
AccuRevException
-
defunct
java.util.List<java.io.File> defunct(java.io.File basedir, java.util.List<java.io.File> files, java.lang.String message) throws AccuRevExceptionRemove the file from the repository. Files must be within a workspace- Parameters:
basedir-files-message-- Returns:
- Throws:
AccuRevException
-
promoteAll
java.util.List<java.io.File> promoteAll(java.io.File basedir, java.lang.String message) throws AccuRevExceptionAny elements that have been kept previously or are currently modified will be promoted.- Parameters:
basedir- - location of the workspace to act onmessage-- Returns:
- Throws:
AccuRevException
-
promote
java.util.List<java.io.File> promote(java.io.File basedir, java.util.List<java.io.File> files, java.lang.String message) throws AccuRevException- Throws:
AccuRevException
-
chws
boolean chws(java.io.File basedir, java.lang.String workSpaceName, java.lang.String newBasisStream) throws AccuRevExceptionRelocate/reparent a workspace- Parameters:
basedir-workSpaceName- (full workspacename including user)newBasisStream-- Returns:
- Throws:
AccuRevException
-
mksnap
boolean mksnap(java.lang.String snapShotName, java.lang.String basisStream) throws AccuRevException- Throws:
AccuRevException
-
statTag
java.util.List<java.io.File> statTag(java.lang.String streamName) throws AccuRevException- Throws:
AccuRevException
-
statBackingStream
CategorisedElements statBackingStream(java.io.File basedir, java.util.Collection<java.io.File> elements) throws AccuRevException
Sorts list of elements by whether they exist in the backing stream or not.- Parameters:
basedir-elements-- Returns:
- Throws:
AccuRevException
-
stat
java.util.List<java.io.File> stat(java.io.File basedir, java.util.Collection<java.io.File> elements, AccuRevStat statType) throws AccuRevException- Parameters:
basedir-elements- list of elements to stat, relative to basedirstatType-- Returns:
- Throws:
AccuRevException
-
stat
java.lang.String stat(java.io.File element) throws AccuRevExceptionAccurev status of an element- Parameters:
element-- Returns:
- null if ignored or not in workspace
- Throws:
AccuRevException
-
history
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
- Throws:
AccuRevException
-
diff
java.util.List<FileDifference> diff(java.lang.String baseStream, java.lang.String fromTimeSpec, java.lang.String toTimeSpec) throws AccuRevException
AccuRev differences of a stream between to timespecs- Parameters:
baseStream-fromTimeSpec-toTimeSpec-- Returns:
- Throws:
AccuRevException
-
annotate
java.util.List<BlameLine> annotate(java.io.File baseDir, java.io.File file) throws AccuRevException
AccuRev annotate an element- Parameters:
file-- Returns:
- Throws:
AccuRevException
-
login
boolean login(java.lang.String user, java.lang.String password) throws AccuRevExceptionLogins in as the given user, retains authtoken for use with subsequent commands.- Parameters:
user-password-- Returns:
- Throws:
AccuRevException
-
showWorkSpaces
java.util.Map<java.lang.String,WorkSpace> showWorkSpaces() throws AccuRevException
- Throws:
AccuRevException
-
showRefTrees
java.util.Map<java.lang.String,WorkSpace> showRefTrees() throws AccuRevException
- Throws:
AccuRevException
-
showStream
Stream showStream(java.lang.String stream) throws AccuRevException
- Throws:
AccuRevException
-
getExecutable
java.lang.String getExecutable()
-
getClientVersion
java.lang.String getClientVersion() throws AccuRevException- Throws:
AccuRevException
-
syncReplica
boolean syncReplica() throws AccuRevException- Throws:
AccuRevException
-
-