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

None


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.
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.
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.
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.
vcsLogin Public method used to login to the remote repository.
vcsLogout Public method used to logout from the remote 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 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.
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

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

VersionControl.addArguments

addArguments(proc, arglist)

Protected method to add an argument list to the process proc.

arglist
list of arguments (list of strings or QStrings or a QStringList)
proc
the process object (QProcess)

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)

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)

VersionControl.vcsAdd

vcsAdd(name, isDir=0)

Public method used to add a file/directory in the vcs. It must not return anything.

isDir
flag indicating name is a directory (boolean)
name
file/directory name to be added (string)
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.

isDir
flag indicating name is a directory (boolean)
name
file/directory name to be added (string)
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.

dname
directory to check in (string)
names
dictionary with all filenames to be checked as keys
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(vcsDir, project, projectDir, noDialog=0, tag=None)

Public method used to check the project out of the vcs. It must return a boolean to indicate an execution without errors.

noDialog
flag indicating quiet operations
project
reference to the project object
projectDir
project directory to create (string)
tag
tag of version to check out (string)
vcsDir
name of the VCS directory (string)
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.

message
message for this operation (string)
name
file/directory name to be committed (string)
noDialog
flag indicating quiet operations
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(vcsDir, project, projectDir, tag=None)

Public method used to export a directory from the vcs. It must return a boolean to indicate an execution without errors.

project
reference to the project object
projectDir
project directory to create (string)
tag
tag of version to check out (string)
vcsDir
name of the VCS directory (string)
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.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(vcsDir, message, project, vendor, release, projectDir, noDialog=0)

Public method used to import the project into the vcs. It must return a boolean to indicate an execution without errors.

message
message for this operation (string)
noDialog
flag indicating quiet operations
project
reference to the project object
projectDir
project directory to create (string)
release
release version string (string)
vcsDir
name of the VCS directory (string)
vendor
vendor string (string)
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.

noDialog
flag indicating quiet operations (boolean)
vcsDir
name of the VCS directory (string)
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.vcsLogin

vcsLogin(protocol, user, passwd, host, port, repository)

Public method used to login to the remote repository. It must not return anything.

host
hostname (string)
passwd
password (string)
port
port of the server (string)
protocol
protocol to be used to access repository (string)
repository
repository name (string)
user
user name (string)
Raises RuntimeError:
not implemented

VersionControl.vcsLogout

vcsLogout(protocol, user, host, port, repository)

Public method used to logout from the remote repository. It must not return anything.

host
hostname (string)
port
port of the server (string)
protocol
protocol to be used to access repository (string)
repository
repository name (string)
user
user name (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.

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

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.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

Up