view foodtruck/scm/base.py @ 626:a1697b1066bc

admin: Use `HGPLAIN` for the Mercurial VCS provider.
author Ludovic Chabant <ludovic@chabant.com>
date Mon, 08 Feb 2016 23:26:05 -0800
parents 3cec8634209a
children a77b4656c602
line wrap: on
line source



class RepoStatus(object):
    def __init__(self):
        self.new_files = []
        self.edited_files = []


class SourceControl(object):
    def __init__(self, root_dir, cfg):
        self.root_dir = root_dir
        self.config = cfg

    def getStatus(self):
        raise NotImplementedError()

    def commit(self, paths, message, *, author=None):
        author = author or self.config.get('author')
        self._doCommit(paths, message, author)

    def _doCommit(self, paths, message, author):
        raise NotImplementedError()