Mercurial > hg > CommitWatcher
view commitwatcher/store.py @ 19:091fd9f40b05
commitwatcher/agent.py
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Sat, 28 Sep 2013 20:33:17 -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 """