comparison foodtruck/scm/base.py @ 598:3cec8634209a

admin: Ability to configure SCM stuff per site.
author Ludovic Chabant <ludovic@chabant.com>
date Fri, 22 Jan 2016 11:01:00 -0800
parents d4a01a023998
children a77b4656c602
comparison
equal deleted inserted replaced
597:79a31a3c947b 598:3cec8634209a
5 self.new_files = [] 5 self.new_files = []
6 self.edited_files = [] 6 self.edited_files = []
7 7
8 8
9 class SourceControl(object): 9 class SourceControl(object):
10 def __init__(self, root_dir): 10 def __init__(self, root_dir, cfg):
11 self.root_dir = root_dir 11 self.root_dir = root_dir
12 self.config = cfg
12 13
13 def getStatus(self): 14 def getStatus(self):
14 raise NotImplementedError() 15 raise NotImplementedError()
15 16
16 def commit(self, paths, author, message): 17 def commit(self, paths, message, *, author=None):
18 author = author or self.config.get('author')
19 self._doCommit(paths, message, author)
20
21 def _doCommit(self, paths, message, author):
17 raise NotImplementedError() 22 raise NotImplementedError()
18 23