Patchwork [2,of,6] localrepo: add events support to localrepository

login
register
mail settings
Submitter Gregory Szorc
Date Aug. 19, 2014, 5:30 a.m.
Message ID <ec6632877a28678be887.1408426214@vm-ubuntu-main.gateway.sonic.net>
Download mbox | patch
Permalink /patch/5503/
State Changes Requested
Headers show

Comments

Gregory Szorc - Aug. 19, 2014, 5:30 a.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1408423487 25200
#      Mon Aug 18 21:44:47 2014 -0700
# Node ID ec6632877a28678be887e4041409c398aadec529
# Parent  110ff56e99e2ccff03841cc8baeed7f14c35f69b
localrepo: add events support to localrepository

The first logical place to add events support is the localrepository
class. This patch adds support for events there.

Patch

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -302,8 +302,10 @@  class localrepository(object):
         # - working directory parent change,
         # - bookmark changes
         self.filteredrevcache = {}
 
+        self.events = util.eventmanager()
+
     def close(self):
         pass
 
     def _restrictcapabilities(self, caps):