# HG changeset patch # User Jeff Hammel # Date 1381717054 25200 # Node ID 463dc92867dfcb8259dfe7634d249c0d92ea2f8d # Parent 9a76064ea5270e8955eca7a2ff2bc716f28e4a90 commitwatcher/event.py diff -r 9a76064ea527 -r 463dc92867df commitwatcher/event.py --- a/commitwatcher/event.py Sun Oct 13 19:08:46 2013 -0700 +++ b/commitwatcher/event.py Sun Oct 13 19:17:34 2013 -0700 @@ -2,8 +2,17 @@ event system for watching commits """ +from abc import abstractmethod + class EventHandler(object): """ABC for events""" + def match(self, commit): + """does this event trigger the handler?""" + return True # abstractmethod + class PathEventHandler(EventHandler): """events based on paths""" + + def match(self, commit): + pass # TODO: move path handling -> commit object