fabulator / src / fabulator / core / vc /

    Base class for versionning control system
class BaseVC(object):

    def __init__(self, conf, env):
        self.env = env
        self.conf = conf
        self.url = conf.get('url')
        self.repos = conf.get('repos')
        self.dest = conf.get('dest')
        self.user = conf.get('user') = conf.get('pw')
        self.scheme = conf.get('scheme')

    def clone_repository(self, dest=None):
        """fetches the full repository"""
        raise NotImplementedError

    def switch_branch(self, branch_name):
        """switch from the current branch"""
        raise NotImplementedError

    def update_repository(self):
        """update the repository"""
        raise NotImplementedError
    def remove_repository(self):
        """remove the repository (yeah sometimes we expect some cleanups)"""
        raise NotImplementedError
    def update_to_revision(self, revision):
        """update the code to a specified revision"""
        raise NotImplementedError