Mercurial > hg > CommitWatcher
view commitwatcher/store.py @ 15:77118f83b5b7
almost does somethign
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Sat, 28 Sep 2013 09:20:14 -0700 |
parents | 883c88b13142 |
children | a8e21cfda5fe |
line wrap: on
line source
from abc import abstractmethod __all__ = ['CommitStore', 'MemoryStore'] class CommitStore(object): """ ABC for commits """ @abstractmethod def add(self, commit): """adds a commit to the store""" @abstractmethod def paths(self, *commits): """return all paths touched for a given commit""" class MemoryStore(CommitStore): """store in volatile memory""" # volatile! def add(self, commit): raise NotImplementedError() def paths(self, *commits): """ return touched by commits """