1. Benoit C
  2. fabulator


fabulator / src / fabulator / core / vc / base.py

    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')
        self.pw = conf.get('pw')
        self.scheme = conf.get('scheme')
        self.conf['doc_root'] = env.yaml.get('project').get("doc_root")
        self.conf['root_dir'] = env.yaml.get('project').get('root_dir')

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

    def switch_branch(self, branch_name=None):
        """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