pology.vcs

Package pology :: Module vcs |

# Module vcs

Version control operations.

Collections of PO files are frequently kept under some sort of version control. This module provides typical version control operations, abstracted across various version control systems.

Author: Chusslove Illich (Часлав Илић) <caslav.ilic@gmx.net>

License: GPLv3

Classes
| VcsBase Abstract base for VCS objects.
| VcsNoop VCS: Dummy VCS which perform only file system operations.
| VcsSubversion VCS: Subversion.
| VcsGit VCS: Git.

Functions
{(string, string)*} or [string*] |
available_vcs(flat=False) Get keywords of all available version control systems. |
instance of VcsBase |
make_vcs(vcskey) Factory for version control systems. |

Variables
| __package__ = ``'``pology``'``

Function Details

### available_vcs(flat=False) |
Get keywords of all available version control systems. Some VCS have more than one keyword identifying them. If `flat` is `False`, a dictionary with primary keyword per VCS as keys, and tuple of all alternatives (including the main keyword) as values, is returned. If `flat` is `True`, all keywords are returned in a flat tuple. Returns: {(string, string)*} or [string*] VCS keywords, as dictionary by primary or as a flat list of all

### make_vcs(vcskey) |
Factory for version control systems. Desired VCS is identified by a keyword. Currently available: dummy noop (`none`, `noop`, `dummy`) Subversion (`svn`, `subversion`) Git (`git`) Parameters: `vcskey` (string) - keyword identifier of the VCS Returns: instance of VcsBase version control object