Mercurial > hg > CommitWatcher
annotate commitwatcher/event.py @ 35:5406eb70f5bd
example
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Fri, 01 Nov 2013 09:23:46 -0700 |
parents | 463dc92867df |
children | 798b747b65d6 |
rev | line source |
---|---|
33 | 1 """ |
2 event system for watching commits | |
3 """ | |
4 | |
34 | 5 from abc import abstractmethod |
6 | |
33 | 7 class EventHandler(object): |
8 """ABC for events""" | |
9 | |
34 | 10 def match(self, commit): |
11 """does this event trigger the handler?""" | |
12 return True # abstractmethod | |
13 | |
33 | 14 class PathEventHandler(EventHandler): |
15 """events based on paths""" | |
34 | 16 |
17 def match(self, commit): | |
18 pass # TODO: move path handling -> commit object |