Groovy Documentation

java.gate.versioning.cmdline
Class CvsRepository

java.lang.Object
  java.gate.versioning.cmdline.AbstractRepository
      java.gate.versioning.cmdline.CvsRepository

class CvsRepository
extends AbstractRepository

CVS repository implementation. The public API of this class is documented on the Repository interface.

see:
gate.versioning.cmdline.Repository


Field Summary
 
Fields inherited from class AbstractRepository
DEBUG, commandOutput, nl, root, stderrOutput, stdoutOutput, workingDir
 
Constructor Summary
CvsRepository()

 
Method Summary
boolean create(String dirName)

Create a new repository filetree (i.e. not a new object but a new database/filesystem on disk).

boolean exists(String moduleName)

Check for the existence of a module (i.e. top-level directory).

String getCommandName()

Returns "cvs".

protected List getPostCommand(String fileName, boolean noRoot)

Get the post-subcommand elements of the command (e.g. root).

protected List getPreCommand()

Get the pre-subcommand elements of the command (e.g.

boolean importDir(String dirName)

Import a directory.

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.

 
Methods inherited from class AbstractRepository
add, buildCommandArray, buildCommandArray, checkin, checkin, checkout, delete, diff, getCommandName, getCommandOutput, getCommandStderr, getCommandStdout, getPostCommand, getPreCommand, getRepository, getRoot, init, runCommand, runCommand, setRoot, setWorkingDir, status, update
 

Constructor Detail

CvsRepository

CvsRepository()


 
Method Detail

create

public boolean create(String dirName)
Create a new repository filetree (i.e. not a new object but a new database/filesystem on disk). This method can be called before #init (so that we can create repositories without having an existing one).
param:
dirName the directory to work on, which will be created (should be an absolute path).
return:
boolean representing success or failure.


exists

public boolean exists(String moduleName)
Check for the existence of a module (i.e. top-level directory).
param:
moduleName directory to look for.
return:
boolean giving status indication.


getCommandName

public String getCommandName()
Returns "cvs".


getPostCommand

protected List getPostCommand(String fileName, boolean noRoot)
Get the post-subcommand elements of the command (e.g. root).


getPreCommand

protected List getPreCommand()
Get the pre-subcommand elements of the command (e.g. -d root).


importDir

public boolean importDir(String dirName)
Import a directory.
param:
dirName the directory to import (this must exist).
return:
boolean representing success or failure.
throws:
GateException when the directory doesn't exist.


isModified

public boolean isModified(String fileName)
Use the repository's status command to figure out if the file has been locally modified.
param:
fileName the file or directory to work on (should be relative to the repository's working directory, and use "/" as a path separator).
return:
boolean giving status indication.


isOutOfDate

public boolean isOutOfDate(String fileName)
Use the repository's status command to figure out if the file is out-of-date.
param:
fileName the file or directory to work on (should be relative to the repository's working directory, and use "/" as a path separator).
return:
boolean giving status indication.


isUnknown

public boolean isUnknown(String fileName)
Use the repository's status command to figure out if the file is unknown.
param:
fileName the file or directory to work on (should be relative to the repository's working directory, and use "/" as a path separator).
return:
boolean giving status indication.


 

Groovy Documentation