Mercurial > hg > CommitWatcher
annotate commitwatcher/event.py @ 36:33c5e632d50e
remove
| author | Jeff Hammel <jhammel@mozilla.com> |
|---|---|
| date | Mon, 04 Nov 2013 21:41:37 -0800 |
| 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 |
