# HG changeset patch # User Jeff Hammel # Date 1381355407 25200 # Node ID 4c53f4cc6ffe74c50b375e2f5864b07965999a9d # Parent 826155711744fb9a9a884dcdfbd800f1ea1e1c02 commitwatcher/commit.py commitwatcher/store.py diff -r 826155711744 -r 4c53f4cc6ffe commitwatcher/commit.py --- a/commitwatcher/commit.py Sat Oct 05 15:50:02 2013 -0700 +++ b/commitwatcher/commit.py Wed Oct 09 14:50:07 2013 -0700 @@ -9,6 +9,4 @@ self.datetime = datetime self.author= author self.paths = paths - self.revision - - + self.revision = revision diff -r 826155711744 -r 4c53f4cc6ffe commitwatcher/store.py --- a/commitwatcher/store.py Sat Oct 05 15:50:02 2013 -0700 +++ b/commitwatcher/store.py Wed Oct 09 14:50:07 2013 -0700 @@ -7,9 +7,22 @@ ABC for commits """ + def __init__(self, verbose=True): + self.verbose = verbose + @abstractmethod + def __contains__(self, revision): + """if a particular revision is already added""" + + @abstractmethod + def store(self, commit): + """store a commit""" + def add(self, commit): """adds a commit to the store""" + if commit.revision not in self: + return + self.store(commit) @abstractmethod def paths(self, *commits):