Mercurial > hg > CommitWatcher
view commitwatcher/store.py @ 5:d85093ba9f45
commitwatcher/store.py
| author | Jeff Hammel <jhammel@mozilla.com> | 
|---|---|
| date | Fri, 27 Sep 2013 11:17:27 -0700 | 
| parents | 4cb3971d9d9d | 
| children | 883c88b13142 | 
line wrap: on
 line source
from abc import abstractmethod 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 """
