Package translate :: Package storage :: Package versioncontrol :: Class GenericRevisionControlSystem
[hide private]
[frames] | no frames]

Class GenericRevisionControlSystem

source code

Known Subclasses:

The super class for all version control classes.

Always inherit from this class to implement another RC interface.

At least the two attributes "RCS_METADIR" and "SCAN_PARENTS" must be 
overriden by all implementations that derive from this class.

By default, all implementations can rely on the following attributes:
    root_dir: the parent of the metadata directory of the working copy
    location_abs: the absolute path of the RCS object
    location_rel: the path of the RCS object relative to 'root_dir'

Instance Methods [hide private]
 
__init__(self, location)
find the relevant information about this RCS object
source code
 
_find_rcs_directory(self, rcs_obj)
Try to find the metadata directory of the RCS
source code
 
_find_rcs_in_parent_directories(self, rcs_obj)
Try to find the metadata directory in all parent directories
source code
 
_self_check(self)
Check if all necessary attributes are defined
source code
 
getcleanfile(self, revision=None)
Dummy to be overridden by real implementations
source code
 
commit(self, revision=None, author=None)
Dummy to be overridden by real implementations
source code
 
update(self, revision=None)
Dummy to be overridden by real implementations
source code
Class Variables [hide private]
  RCS_METADIR = None
The name of the metadata directory of the RCS
  SCAN_PARENTS = None
whether to check the parent directories for the metadata directory of the RCS working copy
Method Details [hide private]

__init__(self, location)
(Constructor)

source code 

find the relevant information about this RCS object

The IOError exception indicates that the specified object (file or directory) is not controlled by the given version control system.

_find_rcs_directory(self, rcs_obj)

source code 
Try to find the metadata directory of the RCS

returns a tuple:
    the absolute path of the directory, that contains the metadata directory
    the absolute path of the RCS object
    the relative path of the RCS object based on the directory above

_self_check(self)

source code 

Check if all necessary attributes are defined

Useful to make sure, that a new implementation does not forget something like "RCS_METADIR"


Class Variable Details [hide private]

RCS_METADIR

The name of the metadata directory of the RCS

e.g.: for Subversion -> ".svn"

Value:
None

SCAN_PARENTS

whether to check the parent directories for the metadata directory of the RCS working copy

some revision control systems store their metadata directory only in the base of the working copy (e.g. bzr, GIT and Darcs) use "True" for these RCS

other RCS store a metadata directory in every single directory of the working copy (e.g. Subversion and CVS) use "False" for these RCS

Value:
None