class VCSApplicationBase(ConnectorMixin): (source)
Known subclasses: zim.plugins.versioncontrol.bzr.BZRApplicationBackend
, zim.plugins.versioncontrol.fossil.FOSSILApplicationBackend
, zim.plugins.versioncontrol.git.GITApplicationBackend
, zim.plugins.versioncontrol.hg.HGApplicationBackend
Class Method | build_bin_application_instance |
Builds an Application object for the backend command @returns: an Application object @implementation: must be implemented in child classes. |
Class Method | tryexec |
Check if the command associated with the backend is available. @returns: True if the command is available |
Method | __init__ |
No summary |
Method | add |
Add a file to the repository. If None, then the add must be for the entire repository @param file: a File instance representing the file to add. @returns: True if the command was successfull |
Method | annotate |
return the annotated version of a file. This is commonly related to the VCS command annotate |
Method | cat |
No summary |
Method | commit |
No summary |
Method | commit_version |
Run a commit operation. |
Method | diff |
No summary |
Method | ignore |
initialize the .XXignore file used by the VCS. |
Method | init |
runs the VCS init command @returns: True if the command was successfull @implementation: must be implemented in child class |
Method | init_repo |
No summary |
Method | is_modified |
Returns True if the repo is not up-to-date, or False @returns: True if the repo is not up-to-date, or False @implementation: must be implemented in the child class. |
Method | list_versions |
Returns a list of all versions, for a file or for the entire repo |
Method | log |
No summary |
Method | log_to_revision_list |
No summary |
Method | move |
Must implement the VCS operation required after a file has been moved into the repository. |
Method | on_created |
Callback when a file has been created @param fs: the watcher object @param path: a File or Folder object |
Method | on_moved |
No summary |
Method | on_removed |
Callback when a file has been delted @param fs: the watcher object @param path: a File or Folder object |
Method | pipe |
No summary |
Method | remove |
No summary |
Method | repo_exists |
Returns True if a repository is already setup @returns: True if a repository is already setup in the root directory @implementation: must be implemented in child classes. |
Method | revert |
No summary |
Method | run |
Execute a command with the associated binary with 'params' parameters. Note: the working directory is the root associated to the repository |
Method | stage |
Prepares the repo for a commit. Used, for example, by git to stage changes so that the status message in SaveVersionDialog shows what will be committed. |
Method | status |
No summary |
Instance Variable | notebook_dir |
Undocumented |
Instance Variable | root |
Undocumented |
Method | _ignored |
No summary |
Instance Variable | _app |
Undocumented |
Inherited from ConnectorMixin
:
Method | connectto |
Connect to signals of another object E.g.: |
Method | connectto_all |
Convenience method to combine multiple calls to connectto() . |
Method | disconnect_all |
Disconnect all signals that have been connected with connectto and friends. Typically called when you want to destroy this object. |
Method | disconnect_from |
Disc all signals that have been connected with connectto and friends to a specific object. |
Method | _disconnect_from |
Undocumented |
Instance Variable | _connected_signals |
Undocumented |
zim.plugins.versioncontrol.bzr.BZRApplicationBackend
, zim.plugins.versioncontrol.fossil.FOSSILApplicationBackend
, zim.plugins.versioncontrol.git.GITApplicationBackend
, zim.plugins.versioncontrol.hg.HGApplicationBackend
Application
object for the backend commandReturns | |
an Application object | |
Unknown Field: implementation | |
must be implemented in child classes. |
Returns | |
True if the command is available |
zim.plugins.versioncontrol.bzr.BZRApplicationBackend
, zim.plugins.versioncontrol.fossil.FOSSILApplicationBackend
, zim.plugins.versioncontrol.git.GITApplicationBackend
, zim.plugins.versioncontrol.hg.HGApplicationBackend
Parameters | |
file | a File instance representing the file to add. |
Returns | |
True if the command was successfull Exemple: for Mercurial, the implementation will run "hg add <file>" or "hg add" if file=None (meaning the entire repository | |
Unknown Field: implementation | |
must be implemented in child classes |
zim.plugins.versioncontrol.bzr.BZRApplicationBackend
, zim.plugins.versioncontrol.fossil.FOSSILApplicationBackend
, zim.plugins.versioncontrol.git.GITApplicationBackend
, zim.plugins.versioncontrol.hg.HGApplicationBackend
Parameters | |
file | a File object in this repository |
version | a version id |
Returns | |
a list of lines |
zim.plugins.versioncontrol.bzr.BZRApplicationBackend
, zim.plugins.versioncontrol.fossil.FOSSILApplicationBackend
, zim.plugins.versioncontrol.git.GITApplicationBackend
, zim.plugins.versioncontrol.hg.HGApplicationBackend
Returns | |
True if the command was successfull | |
Unknown Field: implementation | |
must be implemented in child class Example: for mercurial or bazaar it runs "hg init" (or "bzr init") |
zim.plugins.versioncontrol.bzr.BZRApplicationBackend
, zim.plugins.versioncontrol.fossil.FOSSILApplicationBackend
, zim.plugins.versioncontrol.git.GITApplicationBackend
, zim.plugins.versioncontrol.hg.HGApplicationBackend
init()
, adds existing files etc.Returns | |
nothing. | |
Unknown Field: implementation | |
must be implemented in the child class. |
zim.plugins.versioncontrol.bzr.BZRApplicationBackend
, zim.plugins.versioncontrol.fossil.FOSSILApplicationBackend
, zim.plugins.versioncontrol.git.GITApplicationBackend
, zim.plugins.versioncontrol.hg.HGApplicationBackend
Returns | |
True if the repo is not up-to-date, or False | |
Unknown Field: implementation | |
must be implemented in the child class. |
Parameters | |
file | a File object representing the path to the file, or None |
Returns | |
a list of tuples (revision (int), date, user (str), msg (str)) |
zim.plugins.versioncontrol.bzr.BZRApplicationBackend
, zim.plugins.versioncontrol.fossil.FOSSILApplicationBackend
, zim.plugins.versioncontrol.git.GITApplicationBackend
, zim.plugins.versioncontrol.hg.HGApplicationBackend
Parameters | |
file | a File instance representing the file or None (for the entire repository) |
Returns | |
a list of str() representing the output of the command. (not parsed) | |
Unknown Field: implementation | |
must be implemented in child class. It must return the output for a file or for the entire repository, and the order must be from the oldest to the newest commits |
zim.plugins.versioncontrol.bzr.BZRApplicationBackend
, zim.plugins.versioncontrol.fossil.FOSSILApplicationBackend
, zim.plugins.versioncontrol.git.GITApplicationBackend
, zim.plugins.versioncontrol.hg.HGApplicationBackend
Parameters | |
log_op_output | a list of str() representing the log operation output before being parsed. |
Returns | |
a list of tuple (revision-id, date, user, commit-message) representing the entire life. | |
Unknown Field: implementation | |
must be implemented in the child class. Actually, this method is a "log" operation parser which will convert str lines into list of 4-str tuples : (revision-id, date, user, commit-message) |
Parameters | |
params | a list of parameters to be added to the command line |
Returns | |
a list of str() representing each line of the output | |
Unknown Field: implementation | |
should not be overriden by child classes |
zim.plugins.versioncontrol.bzr.BZRApplicationBackend
, zim.plugins.versioncontrol.fossil.FOSSILApplicationBackend
, zim.plugins.versioncontrol.git.GITApplicationBackend
, zim.plugins.versioncontrol.hg.HGApplicationBackend
Parameters | |
file | a File instance representing the file that have been deleted |
Returns | |
True if the command was successfull | |
Unknown Field: implementation | |
must be implemented in child class. CAUTION: this must implement the VCS operation required after a versionned file has been deleted from the file system. Example: in mercurial it has been implemented with: hg rm <file> |
zim.plugins.versioncontrol.bzr.BZRApplicationBackend
, zim.plugins.versioncontrol.fossil.FOSSILApplicationBackend
, zim.plugins.versioncontrol.git.GITApplicationBackend
, zim.plugins.versioncontrol.hg.HGApplicationBackend
Returns | |
True if a repository is already setup in the root directory | |
Unknown Field: implementation | |
must be implemented in child classes. |
Parameters | |
params | a list of parameters to be added to the command line |
Returns | |
nothing | |
Unknown Field: implementation | |
should not be overriden by child classes |
zim.plugins.versioncontrol.git.GITApplicationBackend
Unknown Field: implementation | |
optional to be implemented in child class |
zim.plugins.versioncontrol.bzr.BZRApplicationBackend
, zim.plugins.versioncontrol.fossil.FOSSILApplicationBackend
, zim.plugins.versioncontrol.git.GITApplicationBackend
, zim.plugins.versioncontrol.hg.HGApplicationBackend
Returns | |
a list of str() representing the output of a "status" command related to the repository | |
Unknown Field: implementation | |
must be implemented in child classes |
Parameters | |
file | a File representing the file that we want to know if it should be ignored |
Returns | |
True if the file should be ignored by the VCS. | |
Unknown Field: implementation | |
may be overridden if some files are to be ignored specifically for the backend |