Mercurial > hg > CommitWatcher
view commitwatcher/store.py @ 10:7ae60d2ff1c2
commitwatcher/agent.py mozbasewatcher.py tests/41701d2c0341.diff
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Sat, 28 Sep 2013 05:10: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 """