eric3.VCS.VersionControl
Module implementing an abstract base class to be subclassed by all specific VCS interfaces.
Classes
VersionControl |
Class implementing an abstract base class to be subclassed by all specific VCS interfaces. |
Functions
VersionControl
Class implementing an abstract base class to be subclassed by all specific VCS interfaces.
It defines the vcs interface to be implemented by subclasses
and the common methods.
Derived from
QObject
Methods
VersionControl |
Constructor |
addArguments |
Protected method to add an argument list to the process proc. |
clearStatusCache |
Public method to clear the status cache. |
splitPath |
Protected method splitting name into a directory part and a file part. |
splitPathList |
Protected method splitting the list of names into a common directory part and a file list. |
startSynchronizedProcess |
Private method to start a synchroneous process |
vcsAdd |
Public method used to add a file/directory in the vcs. |
vcsAddBinary |
Public method used to add a file/directory in binary mode in the vcs. |
vcsAddTree |
Public method to add a directory tree rooted at path in the vcs. |
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 vcs. |
vcsCleanup |
Public method used to cleanup the local copy. |
vcsCommandLine |
Public method used to execute arbitrary vcs commands. |
vcsCommit |
Public method used to make the change of a file/directory permanent in the vcs. |
vcsConvertProject |
Public method to convert an uncontrolled project to a version controlled project. |
vcsDefaultOptions |
Public method used to retrieve the default options for the vcs. |
vcsDiff |
Public method used to view the diff of a file/directory in the vcs. |
vcsExists |
Public method used to test for the presence of the vcs. |
vcsExport |
Public method used to export a directory from the vcs. |
vcsGetOptions |
Public method used to retrieve the options of the vcs. |
vcsGetOtherData |
Public method used to retrieve vcs specific data. |
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 vcs. |
vcsImport |
Public method used to import the project into the vcs. |
vcsInit |
Public method used to initialize the vcs. |
vcsLog |
Public method used to view the log of a file/directory in the vcs. |
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 add a file/directory in the vcs. |
vcsRepositoryInfos |
Public method to retrieve information about the repository. |
vcsRevert |
Public method used to revert changes made to a file/directory. |
vcsSetData |
Public method used to set an entry in the otherData dictionary. |
vcsSetDataFromDict |
Public method used to set entries in the otherData dictionary. |
vcsSetOptions |
Public method used to set the options for the vcs. |
vcsSetOtherData |
Public method used to set vcs specific data. |
vcsStatus |
Public method used to view the status of a file/directory in the vcs. |
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 vcs. |
vcsUpdate |
Public method used to update a file/directory in the vcs. |
VersionControl (Constructor)
VersionControl(parent=None, name=None)
Constructor
- parent
-
parent widget (QWidget)
- name
-
name of this object (string or QString)
VersionControl.addArguments
addArguments(proc, arglist)
Protected method to add an argument list to the process proc.
- proc
-
the process object (QProcess)
- arglist
-
list of arguments (list of strings or QStrings or a QStringList)
VersionControl.clearStatusCache
clearStatusCache()
Public method to clear the status cache.
VersionControl.splitPath
splitPath(name)
Protected method splitting name into a directory part and a file part.
- name
-
path name (string)
- Returns:
-
a tuple of 2 strings (dirname, filename).
VersionControl.splitPathList
splitPathList(names)
Protected method splitting the list of names into a common directory part and a file list.
- names
-
list of paths (list of strings)
- Returns:
-
a tuple of string and list of strings (dirname, filenamelist)
VersionControl.startSynchronizedProcess
startSynchronizedProcess(proc, timeout = 0)
Private method to start a synchroneous process
This method starts a process and waits
for its end while still serving the Qt event loop.
- proc
-
process to start (QProcess)
- timeout
-
timeout in milliseconds (integer)
- Returns:
-
flag indicating successful execution of the process (boolean)
VersionControl.vcsAdd
vcsAdd(name, isDir=0)
Public method used to add a file/directory in the vcs.
It must not return anything.
- name
-
file/directory name to be added (string)
- isDir
-
flag indicating name is a directory (boolean)
- Raises RuntimeError:
-
not implemented
VersionControl.vcsAddBinary
vcsAddBinary(name, isDir=0)
Public method used to add a file/directory in binary mode in the vcs.
It must not return anything.
- name
-
file/directory name to be added (string)
- isDir
-
flag indicating name is a directory (boolean)
- Raises RuntimeError:
-
not implemented
VersionControl.vcsAddTree
vcsAddTree(path)
Public method to add a directory tree rooted at path in the vcs.
It must not return anything.
- path
-
root directory of the tree to be added (string)
- Raises RuntimeError:
-
not implemented
VersionControl.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
- Raises RuntimeError:
-
not implemented
VersionControl.vcsCheckout
vcsCheckout(vcsDataDict, projectDir, noDialog=0)
Public method used to check the project out of the vcs.
- 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)
- Raises RuntimeError:
-
not implemented
VersionControl.vcsCleanup
vcsCleanup(name)
Public method used to cleanup the local copy.
- name
-
directory name to be cleaned up (string)
- Raises RuntimeError:
-
not implemented
VersionControl.vcsCommandLine
vcsCommandLine(name)
Public method used to execute arbitrary vcs commands.
- name
-
directory name of the working directory (string)
- Raises RuntimeError:
-
not implemented
VersionControl.vcsCommit
vcsCommit(name, message, noDialog=0)
Public method used to make the change of a file/directory permanent in the vcs.
It must return a boolean to indicate an execution without errors.
- name
-
file/directory name to be committed (string)
- message
-
message for this operation (string)
- noDialog
-
flag indicating quiet operations
- Raises RuntimeError:
-
not implemented
VersionControl.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
- Raises RuntimeError:
-
not implemented
VersionControl.vcsDefaultOptions
vcsDefaultOptions()
Public method used to retrieve the default options for the vcs.
- Returns:
-
a dictionary with the vcs operations as key and
the respective options as values. The key 'global' must contain
the global options. The other keys must be 'commit', 'update',
'add', 'remove', 'diff', 'log', 'history', 'tag', 'status' and 'export'.
VersionControl.vcsDiff
vcsDiff(name)
Public method used to view the diff of a file/directory in the vcs.
It must not return anything.
- name
-
file/directory name to be diffed (string)
- Raises RuntimeError:
-
not implemented
VersionControl.vcsExists
vcsExists()
Public method used to test for the presence of the vcs.
It must return a bool to indicate the existance.
- Raises RuntimeError:
-
not implemented
VersionControl.vcsExport
vcsExport(vcsDataDict, projectDir)
Public method used to export a directory from the vcs.
It must return a boolean to indicate an execution without errors.
- vcsDataDict
-
dictionary of data required for the export
- projectDir
-
project directory to create (string)
- Returns:
-
flag indicating an execution without errors (boolean)
- Raises RuntimeError:
-
not implemented
VersionControl.vcsGetOptions
vcsGetOptions()
Public method used to retrieve the options of the vcs.
- Returns:
-
a dictionary of option strings that can be passed to
vcsSetOptions.
VersionControl.vcsGetOtherData
vcsGetOtherData()
Public method used to retrieve vcs specific data.
- Returns:
-
a dictionary of vcs specific data
VersionControl.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
VersionControl.vcsGetProjectHelper
vcsGetProjectHelper(project)
Public method to instanciate a helper object for the project.
- project
-
reference to the project object
- Returns:
-
the project helper object
VersionControl.vcsHistory
vcsHistory(name)
Public method used to view the history of a file/directory in the vcs.
It must not return anything.
- name
-
file/directory name to show the history for (string)
- Raises RuntimeError:
-
not implemented
VersionControl.vcsImport
vcsImport(vcsDataDict, projectDir, noDialog=0)
Public method used to import the project into the vcs.
- vcsDataDict
-
dictionary of data required for the import
- projectDir
-
project directory (string)
- noDialog
-
flag indicating quiet operations
- Returns:
-
flag indicating an execution without errors (boolean)
- Raises RuntimeError:
-
not implemented
VersionControl.vcsInit
vcsInit(vcsDir, noDialog=0)
Public method used to initialize the vcs.
It must return a boolean to indicate an execution without errors.
- vcsDir
-
name of the VCS directory (string)
- noDialog
-
flag indicating quiet operations (boolean)
- Raises RuntimeError:
-
not implemented
VersionControl.vcsLog
vcsLog(name)
Public method used to view the log of a file/directory in the vcs.
It must not return anything.
- name
-
file/directory name to show the log for (string)
- Raises RuntimeError:
-
not implemented
VersionControl.vcsMerge
vcsMerge(name)
Public method used to merge a tag/branch into the local project.
It must not return anything.
- name
-
file/directory name to be merged (string)
- Raises RuntimeError:
-
not implemented
VersionControl.vcsName
vcsName()
Public method returning the name of the vcs.
- Returns:
-
name of the vcs (string)
- Raises RuntimeError:
-
not implemented
VersionControl.vcsNewProjectOptionsDialog
vcsNewProjectOptionsDialog(parent = None)
Public method to get a dialog to enter repository info for getting a new project.
- parent
-
parent widget (QWidget)
VersionControl.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)
VersionControl.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
- Raises RuntimeError:
-
not implemented
VersionControl.vcsRemove
vcsRemove(name, project=0)
Public method used to add a file/directory in the vcs.
It must return a flag indicating successfull operation
- name
-
file/directory name to be removed (string)
- project
-
flag indicating deletion of a project tree (boolean)
- Raises RuntimeError:
-
not implemented
VersionControl.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)
VersionControl.vcsRevert
vcsRevert(name)
Public method used to revert changes made to a file/directory.
It must not return anything.
- name
-
file/directory name to be reverted (string)
- Raises RuntimeError:
-
not implemented
VersionControl.vcsSetData
vcsSetData(key, value)
Public method used to set an entry in the otherData dictionary.
- key
-
the key of the data (string)
- value
-
the value of the data
VersionControl.vcsSetDataFromDict
vcsSetDataFromDict(dict)
Public method used to set entries in the otherData dictionary.
- dict
-
dictionary to pick entries from
VersionControl.vcsSetOptions
vcsSetOptions(options)
Public method used to set the options for the vcs.
- options
-
a dictionary of option strings with keys as
defined by the default options
VersionControl.vcsSetOtherData
vcsSetOtherData(data)
Public method used to set vcs specific data.
- data
-
a dictionary of vcs specific data
VersionControl.vcsStatus
vcsStatus(name)
Public method used to view the status of a file/directory in the vcs.
It must not return anything.
- name
-
file/directory name to show the status for (string)
- Raises RuntimeError:
-
not implemented
VersionControl.vcsSwitch
vcsSwitch(name)
Public method used to switch a directory to a different tag/branch.
It must not return anything.
- name
-
directory name to be switched (string)
- Raises RuntimeError:
-
not implemented
VersionControl.vcsTag
vcsTag(name)
Public method used to set the tag of a file/directory in the vcs.
It must not return anything.
- name
-
file/directory name to be tagged (string)
- Raises RuntimeError:
-
not implemented
VersionControl.vcsUpdate
vcsUpdate(name)
Public method used to update a file/directory in the vcs.
It must not return anything.
- name
-
file/directory name to be updated (string)
- Raises RuntimeError:
-
not implemented