# eric3.VCS.cvsPackage.cvs

Module implementing the version control systems interface to CVS.

### Classes

Cvs | Class implementing the version control systems interface to CVS.

### Functions

None

## Cvs

Class implementing the version control systems interface to CVS.

### Derived from

VersionControl

### Methods

Cvs | Constructor
__stripped | Private method to give item without the common prefix.
cvsEdit | Public method used to edit a file under cvs control.
cvsLogin | Public method used to login to the CVS repository.
cvsLogout | Public method used to logout from the remote repository.
cvsUnedit | Public method used to unedit a file under cvs control.
vcsAdd | Public method used to add a file/directory to the cvs repository.
vcsAddBinary | Public method used to add a file/directory in binary mode to the cvs repository.
vcsAddTree | Public method to add a directory tree rooted at path to the cvs repository.
vcsAllRegisteredStates | Public method used to get the registered states of a number of files in the vcs.
vcsCheckout | Public method used to check the project out of the cvs repository.
vcsCleanup | Public method used to cleanup the local copy.
vcsCommandLine | Public method used to execute arbitrary cvs commands.
vcsCommit | Public method used to make the change of a file/directory permanent in the cvs repository.
vcsConvertProject | Public method to convert an uncontrolled project to a version controlled project.
vcsDiff | Public method used to view the difference of a file/directory to the cvs repository.
vcsExists | Public method used to test for the presence of the cvs executable.
vcsExport | Public method used to export a directory from the cvs repository.
vcsGetProjectBrowserHelper | Public method to instanciate a helper object for the different project browsers.
vcsGetProjectHelper | Public method to instanciate a helper object for the project.
vcsHistory | Public method used to view the history of a file/directory in the cvs repository.
vcsImport | Public method used to import the project into the cvs repository.
vcsInit | Public method used to initialize the cvs repository.
vcsLog | Public method used to view the log of a file/directory from the cvs repository.
vcsMerge | Public method used to merge a tag/branch into the local project.
vcsName | Public method returning the name of the vcs.
vcsNewProjectOptionsDialog | Public method to get a dialog to enter repository info for getting a new project.
vcsOptionsDialog | Public method to get a dialog to enter repository info.
vcsRegisteredState | Public method used to get the registered state of a file in the vcs.
vcsRemove | Public method used to remove a file/directory from the cvs repository.
vcsRepositoryInfos | Public method to retrieve information about the repository.
vcsRevert | Public method used to revert changes made to a file/directory.
vcsStatus | Public method used to view the status of a file in the cvs repository.
vcsSwitch | Public method used to switch a directory to a different tag/branch.
vcsTag | Public method used to set the tag of a file/directory in the cvs repository.
vcsUpdate | Public method used to update a file/directory with the cvs repository.

### Cvs (Constructor)

Cvs(parent=None, name=None)

Constructor

parent
  parent widget (QWidget)
name
  name of this object (string or QString)

### Cvs.__stripped

__stripped(item, wdir)

Private method to give item without the common prefix.

item
  the path to make relative (string)
wdir
  the working directory (string)

Returns:
  a path relative to wdir (string)

### Cvs.cvsEdit

cvsEdit(name)

Public method used to edit a file under cvs control.

A list of filenames can be passed in as well. In this case it is assumed, that all files are located in the same directory.

name
  file name(s) to be edited (string or list of strings)

### Cvs.cvsLogin

cvsLogin()

Public method used to login to the CVS repository.

### Cvs.cvsLogout

cvsLogout()

Public method used to logout from the remote repository.

### Cvs.cvsUnedit

cvsUnedit(name)

Public method used to unedit a file under cvs control.

A list of filenames can be passed in as well. In this case it is assumed, that all files are located in the same directory.

name
  file name(s) to be unedited (string or list of strings)

### Cvs.vcsAdd

vcsAdd(name, isDir=0, binary=0)

Public method used to add a file/directory to the cvs repository.

name
  file/directory name to be added (string)
isDir
  flag indicating name is a directory (boolean)
binary
  flag indicating a binary add (boolean)

### Cvs.vcsAddBinary

vcsAddBinary(name, isDir=0)

Public method used to add a file/directory in binary mode to the cvs repository.

name
  file/directory name to be added (string)
isDir
  flag indicating name is a directory (boolean)

### Cvs.vcsAddTree

vcsAddTree(path)

Public method to add a directory tree rooted at path to the cvs repository.

path
  root directory of the tree to be added (string)

### Cvs.vcsAllRegisteredStates

vcsAllRegisteredStates(names, dname)

Public method used to get the registered states of a number of files in the vcs.

names
  dictionary with all filenames to be checked as keys
dname
  directory to check in (string)

Returns:
  the received dictionary completed with a combination of canBeCommited and canBeAdded or None in order to signal an error

### Cvs.vcsCheckout

vcsCheckout(vcsDataDict, projectDir, noDialog=0)

Public method used to check the project out of the cvs repository.

vcsDataDict
  dictionary of data required for the checkout
projectDir
  project directory to create (string)
noDialog
  flag indicating quiet operations

Returns:
  flag indicating an execution without errors (boolean)

### Cvs.vcsCleanup

vcsCleanup(name)

Public method used to cleanup the local copy.

name
  directory name to be cleaned up (string)

### Cvs.vcsCommandLine

vcsCommandLine(name)

Public method used to execute arbitrary cvs commands.

name
  directory name of the working directory (string)

### Cvs.vcsCommit

vcsCommit(name, message, noDialog=0)

Public method used to make the change of a file/directory permanent in the cvs repository.

name
  file/directory name to be committed (string)
message
  message for this operation (string)
noDialog
  flag indicating quiet operations

Returns:
  flag indicating an execution without errors (boolean)

### Cvs.vcsConvertProject

vcsConvertProject(vcsDataDict, project)

Public method to convert an uncontrolled project to a version controlled project.

vcsDataDict
  dictionary of data required for the conversion
project
  reference to the project object

### Cvs.vcsDiff

vcsDiff(name)

Public method used to view the difference of a file/directory to the cvs repository.

If name is a directory and is the project directory, all project files are save first. If name is a file, which is being edited and has unsaved modification, they can be saved or the operation may be aborted.

name
  file/directory name to be diffed (string)

### Cvs.vcsExists

vcsExists()

Public method used to test for the presence of the cvs executable.

Returns:
  flag indicating the existance (boolean)

### Cvs.vcsExport

vcsExport(vcsDataDict, projectDir)

Public method used to export a directory from the cvs repository.

vcsDataDict
  dictionary of data required for the checkout
project
  name of the archive (string)
projectDir
  project directory to create (string)

Returns:
  flag indicating an execution without errors (boolean)

### Cvs.vcsGetProjectBrowserHelper

vcsGetProjectBrowserHelper(browser, project, isTranslationsBrowser=0)

Public method to instanciate a helper object for the different project browsers.

browser
  reference to the project browser object
project
  reference to the project object
isTranslationsBrowser
  flag indicating, the helper is requested for the translations browser (this needs some special treatment)

Returns:
  the project browser helper object

### Cvs.vcsGetProjectHelper

vcsGetProjectHelper(project)

Public method to instanciate a helper object for the project.

project
  reference to the project object

Returns:
  the project helper object

### Cvs.vcsHistory

vcsHistory(name)

Public method used to view the history of a file/directory in the cvs repository.

name
  file/directory name to show the history for (string)

### Cvs.vcsImport

vcsImport(vcsDataDict, projectDir, noDialog=0)

Public method used to import the project into the cvs repository.

vcsDataDict
  dictionary of data required for the import
projectDir
  project directory to create (string)
noDialog
  flag indicating quiet operations

Returns:
  flag indicating an execution without errors (boolean)

### Cvs.vcsInit

vcsInit(vcsDir, noDialog=0)

Public method used to initialize the cvs repository.

vcsDir
  name of the VCS directory (string)
noDialog
  flag indicating quiet operations (boolean)

Returns:
  flag indicating an execution without errors (boolean)

### Cvs.vcsLog

vcsLog(name)

Public method used to view the log of a file/directory from the cvs repository.

name
  file/directory name to show the log for (string)

### Cvs.vcsMerge

vcsMerge(name)

Public method used to merge a tag/branch into the local project.

name
  file/directory name to be merged (string)

### Cvs.vcsName

vcsName()

Public method returning the name of the vcs.

Returns:
  always 'CVS' (string)

### Cvs.vcsNewProjectOptionsDialog

vcsNewProjectOptionsDialog(parent = None)

Public method to get a dialog to enter repository info for getting a new project.

parent
  parent widget (QWidget)

### Cvs.vcsOptionsDialog

vcsOptionsDialog(project, archive, editable=0, parent=None)

Public method to get a dialog to enter repository info.

project
  reference to the project object
archive
  name of the project in the repository (string)
editable
  flag indicating that the project name is editable (boolean)
parent
  parent widget (QWidget)

### Cvs.vcsRegisteredState

vcsRegisteredState(name)

Public method used to get the registered state of a file in the vcs.

name
  filename to check (string)

Returns:
  a combination of canBeCommited and canBeAdded or 0 in order to signal an error

### Cvs.vcsRemove

vcsRemove(name, project=0)

Public method used to remove a file/directory from the cvs repository.

The default operation is to remove the local copy as well.

name
  file/directory name to be removed (string)
project
  flag indicating deletion of a project tree (boolean)

Returns:
  flag indicating successfull operation (boolean)

### Cvs.vcsRepositoryInfos

vcsRepositoryInfos(ppath)

Public method to retrieve information about the repository.

ppath
  local path to get the repository infos (string)

Returns:
  string with ready formated info for display (QString)

### Cvs.vcsRevert

vcsRevert(name)

Public method used to revert changes made to a file/directory.

name
  file/directory name to be reverted (string)

### Cvs.vcsStatus

vcsStatus(name)

Public method used to view the status of a file in the cvs repository.

name
  file/directory name to show the status for (string)

### Cvs.vcsSwitch

vcsSwitch(name)

Public method used to switch a directory to a different tag/branch.

name
  directory name to be switched (string)

### Cvs.vcsTag

vcsTag(name)

Public method used to set the tag of a file/directory in the cvs repository.

name
  file/directory name to be tagged (string)

### Cvs.vcsUpdate

vcsUpdate(name)

Public method used to update a file/directory with the cvs repository.

name
  file/directory name to be updated (string)

Up