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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.