# eric4.VCS.ProjectHelper

Module implementing the base class of the VCS project helper.

### Classes

VcsProjectHelper | Class implementing the base class of the VCS project helper.

### Functions

None

## VcsProjectHelper

Class implementing the base class of the VCS project helper.

#### Signals

vcsStatusMonitorData(QStringList)
  emitted to update the VCS status
vcsStatusMonitorStatus(QString, QString)
  emitted to signal the status of the monitoring thread (ok, nok, op, off) and a status message

### Derived from

QObject

### Methods

VcsProjectHelper | Constructor
__cvsLogin | Private slot used to login to a remote repository.
__cvsLogout | Private slot used to logout from a remote repository.
__statusMonitorData | Private method to receive the status monitor status.
__statusMonitorStatus | Private method to receive the status monitor status.
_createStatusMonitorThread | Protected method to create an instance of the VCS status monitor thread.
_vcsCheckout | Protected slot used to create a local project from the repository.
_vcsCleanup | Protected slot used to cleanup the local project.
_vcsCommand | Protected slot used to execute an arbitrary vcs command.
_vcsCommandOptions | Protected slot to edit the VCS command options.
_vcsCommit | Protected slot used to commit changes to the local project to the repository.
_vcsDiff | Protected slot used to show the difference of the local project to the repository.
_vcsExport | Protected slot used to export a project from the repository.
_vcsImport | Protected slot used to import the local project into the repository.
_vcsInfoDisplay | Protected slot called to show some vcs information.
_vcsLog | Protected slot used to show the log of the local project.
_vcsMerge | Protected slot used to merge changes of a tag/revision into the local project.
_vcsRemove | Protected slot used to remove the local project from the repository.
_vcsRevert | Protected slot used to revert changes made to the local project.
_vcsStatus | Protected slot used to show the status of the local project.
_vcsSwitch | Protected slot used to switch the local project to another tag/branch.
_vcsTag | Protected slot used to tag the local project in the repository.
_vcsUpdate | Protected slot used to update the local project from the repository.
checkVCSStatus | Public method to wake up the VCS status monitor thread.
clearStatusMonitorCachedState | Public method to clear the cached VCS state of a file/directory.
getStatusMonitorInterval | Public method to get the monitor interval.
initActions | Public method to generate the action objects.
initMenu | Public method to generate the VCS menu.
setStatusMonitorInterval | Public method to change the monitor interval.
showMenu | Public slot called before the vcs menu is shown.
startStatusMonitor | Public method to start the VCS status monitor thread.
stopStatusMonitor | Public method to stop the VCS status monitor thread.

#### VcsProjectHelper (Constructor)

VcsProjectHelper(vcsObject, projectObject, parent = None, name = None)

Constructor

vcsObject
  reference to the vcs object
projectObject
  reference to the project object
parent
  parent widget (QWidget)
name
  name of this object (string or QString)

#### VcsProjectHelper.__cvsLogin

__cvsLogin()

Private slot used to login to a remote repository.

#### VcsProjectHelper.__cvsLogout

__cvsLogout()

Private slot used to logout from a remote repository.

#### VcsProjectHelper.__statusMonitorData

__statusMonitorData(statusList)

Private method to receive the status monitor status.

It simply reemits the received status list.

statusList
  list of status records(QStringList)

#### VcsProjectHelper.__statusMonitorStatus

__statusMonitorStatus(status, statusMsg)

Private method to receive the status monitor status.

It simply reemits the received status.

status
  status of the monitoring thread (QString, ok, nok or off)
statusMsg
  explanotory text for the signaled status (QString)

#### VcsProjectHelper._createStatusMonitorThread

_createStatusMonitorThread(interval)

Protected method to create an instance of the VCS status monitor thread.

Note: This method should be overwritten in subclasses in order to support VCS status monitoring.

interval
  check interval for the monitor thread in seconds (integer)

Returns:
  reference to the monitor thread (QThread)

#### VcsProjectHelper._vcsCheckout

_vcsCheckout(export = False)

Protected slot used to create a local project from the repository.

export
  flag indicating whether an export or a checkout should be performed

#### VcsProjectHelper._vcsCleanup

_vcsCleanup()

Protected slot used to cleanup the local project.

#### VcsProjectHelper._vcsCommand

_vcsCommand()

Protected slot used to execute an arbitrary vcs command.

#### VcsProjectHelper._vcsCommandOptions

_vcsCommandOptions()

Protected slot to edit the VCS command options.

#### VcsProjectHelper._vcsCommit

_vcsCommit()

Protected slot used to commit changes to the local project to the repository.

#### VcsProjectHelper._vcsDiff

_vcsDiff()

Protected slot used to show the difference of the local project to the repository.

#### VcsProjectHelper._vcsExport

_vcsExport()

Protected slot used to export a project from the repository.

#### VcsProjectHelper._vcsImport

_vcsImport()

Protected slot used to import the local project into the repository.

NOTE: This does not necvessarily make the local project a vcs controlled project. You may have to checkout the project from the repository in order to accomplish that.

#### VcsProjectHelper._vcsInfoDisplay

_vcsInfoDisplay()

Protected slot called to show some vcs information.

#### VcsProjectHelper._vcsLog

_vcsLog()

Protected slot used to show the log of the local project.

#### VcsProjectHelper._vcsMerge

_vcsMerge()

Protected slot used to merge changes of a tag/revision into the local project.

#### VcsProjectHelper._vcsRemove

_vcsRemove()

Protected slot used to remove the local project from the repository.

Depending on the parameters set in the vcs object the project may be removed from the local disk as well.

#### VcsProjectHelper._vcsRevert

_vcsRevert()

Protected slot used to revert changes made to the local project.

#### VcsProjectHelper._vcsStatus

_vcsStatus()

Protected slot used to show the status of the local project.

#### VcsProjectHelper._vcsSwitch

_vcsSwitch()

Protected slot used to switch the local project to another tag/branch.

#### VcsProjectHelper._vcsTag

_vcsTag()

Protected slot used to tag the local project in the repository.

#### VcsProjectHelper._vcsUpdate

_vcsUpdate()

Protected slot used to update the local project from the repository.

#### VcsProjectHelper.checkVCSStatus

checkVCSStatus()

Public method to wake up the VCS status monitor thread.

#### VcsProjectHelper.clearStatusMonitorCachedState

clearStatusMonitorCachedState(name)

Public method to clear the cached VCS state of a file/directory.

name
  name of the entry to be cleared (QString or string)

#### VcsProjectHelper.getStatusMonitorInterval

getStatusMonitorInterval()

Public method to get the monitor interval.

Returns:
  interval in seconds (integer)

#### VcsProjectHelper.initActions

initActions()

Public method to generate the action objects.

#### VcsProjectHelper.initMenu

initMenu(menu)

Public method to generate the VCS menu.

menu
  reference to the menu to be populated (QMenu)

#### VcsProjectHelper.setStatusMonitorInterval

setStatusMonitorInterval(interval)

Public method to change the monitor interval.

interval
  new interval in seconds (integer)

#### VcsProjectHelper.showMenu

showMenu()

Public slot called before the vcs menu is shown.

#### VcsProjectHelper.startStatusMonitor

startStatusMonitor()

Public method to start the VCS status monitor thread.

Returns:
  reference to the monitor thread (QThread)

#### VcsProjectHelper.stopStatusMonitor

stopStatusMonitor()

Public method to stop the VCS status monitor thread.

Up