view foodtruck/scm/base.py @ 614:a2d9ef307a08

publish: Make the `shell` log update faster by flushing the pipe.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 04 Feb 2016 21:49:15 -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()