|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD |
interface Repository
This is the main entry point for the version control package. See also the gate.versioning.cmdline package overview. The name of this interface is a little misleading: it doesn't really model version control repositories, but version control commands. In a perfect world it would be renamed.
Version control repository interface. Implementors are intended to use bean-type parameterisation and initialisation. The lifecycle is:
Implementors are expected to execute the command-line repository program to do the work specified by this API. The anticipated uses are with CVS and SVN. The API is kept close to the underlying version control systems, so, for example, to delete a file first delete the actual file from disk, then call #delete, then call #checkin to commit the deletion. A Repository object may also be obtained from AbstractRepository#getRepository(java.lang.String).
Method Summary | |
---|---|
boolean
|
add(String fileName)
Add to the repository. |
boolean
|
checkin(String fileName)
Commit changes. |
boolean
|
checkin(String fileName, String message)
Commit changes. |
boolean
|
checkout(String fileName)
Check out a file, directory or module. |
boolean
|
create(String dirName)
Create a new repository filetree (i.e. not a new object but a new database/filesystem on disk). |
boolean
|
delete(String fileName)
Delete from the repository. |
String
|
diff(String fileName)
Get the difference with the repository version. |
boolean
|
exists(String moduleName)
Check for the existence of a module (i.e. top-level directory). |
String
|
getCommandName()
Name of the repository command to execute (e.g. cvs, svn). |
String
|
getCommandOutput()
Get a string containing the stdout and stderr from the command execution. |
String
|
getCommandStderr()
Get a string containing the stderr from the command execution. |
String
|
getCommandStdout()
Get a string containing the stdout from the command execution. |
String
|
getRoot()
The root / URL of the repository |
boolean
|
importDir(String dirName)
Import a directory. |
void
|
init()
Validate parameters. |
boolean
|
isModified(String fileName)
Use the repository's status command to figure out if the file has been locally modified. |
boolean
|
isOutOfDate(String fileName)
Use the repository's status command to figure out if the file is out-of-date. |
boolean
|
isUnknown(String fileName)
Use the repository's status command to figure out if the file is unknown. |
void
|
setRoot(String root)
The root / URL of the repository |
void
|
setWorkingDir(File workingDir)
The working directory for repository actions |
String
|
status(String fileName)
Status. |
boolean
|
update(String fileName)
Update. |
Method Detail |
---|
public boolean add(String fileName)
public boolean checkin(String fileName)
public boolean checkin(String fileName, String message)
public boolean checkout(String fileName)
public boolean create(String dirName)
public boolean delete(String fileName)
public String diff(String fileName)
public boolean exists(String moduleName)
public String getCommandName()
public String getCommandOutput()
public String getCommandStderr()
public String getCommandStdout()
public String getRoot()
public boolean importDir(String dirName)
public void init()
public boolean isModified(String fileName)
public boolean isOutOfDate(String fileName)
public boolean isUnknown(String fileName)
public void setRoot(String root)
public void setWorkingDir(File workingDir)
public String status(String fileName)
public boolean update(String fileName)
Groovy Documentation