Mercurial > hg-stable
changeset 35321:73abb81ccb28
fsmonitor: remove watchman transaction and working copy change notifications
Remove working copy change and transaction notifications. We were relying
upon callbacks on transaction function. This caused issues with lock ordering.
A different approach will be adopted in a subsequent commit.
Differential Revision: https://phab.mercurial-scm.org/D1611
author | Eamonn Kent <ekent@fb.com> |
---|---|
date | Wed, 06 Dec 2017 18:37:49 -0800 |
parents | 12ce62c72c24 |
children | c67fb3bfe3a1 |
files | hgext/fsmonitor/__init__.py |
diffstat | 1 files changed, 0 insertions(+), 43 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/fsmonitor/__init__.py Fri Dec 08 16:54:59 2017 +0900 +++ b/hgext/fsmonitor/__init__.py Wed Dec 06 18:37:49 2017 -0800 @@ -117,7 +117,6 @@ from mercurial.i18n import _ from mercurial.node import ( hex, - nullid, ) from mercurial import ( @@ -162,12 +161,6 @@ configitem('fsmonitor', 'blacklistusers', default=list, ) -configitem('experimental', 'fsmonitor.transaction_notify', - default=False, -) -configitem('experimental', 'fsmonitor.wc_change_notify', - default=False, -) # This extension is incompatible with the following blacklisted extensions # and will disable itself when encountering one of these: @@ -609,14 +602,6 @@ self._fsmonitorstate.invalidate() return super(fsmonitordirstate, self).invalidate(*args, **kwargs) - if dirstate._ui.configbool( - "experimental", "fsmonitor.wc_change_notify"): - def setparents(self, p1, p2=nullid): - with state_update(self._repo, name="hg.wc_change", - oldnode=self._pl[0], newnode=p1, - partial=False): - return super(fsmonitordirstate, self).setparents(p1, p2) - dirstate.__class__ = fsmonitordirstate dirstate._fsmonitorinit(repo) @@ -799,32 +784,4 @@ orig = super(fsmonitorrepo, self).status return overridestatus(orig, self, *args, **kwargs) - if ui.configbool("experimental", "fsmonitor.transaction_notify"): - def transaction(self, *args, **kwargs): - tr = super(fsmonitorrepo, self).transaction( - *args, **kwargs) - if tr.count != 1: - return tr - stateupdate = state_update(self, name="hg.transaction") - stateupdate.enter() - - class fsmonitortrans(tr.__class__): - def _abort(self): - try: - result = super(fsmonitortrans, self)._abort() - finally: - stateupdate.exit(abort=True) - return result - - def close(self): - try: - result = super(fsmonitortrans, self).close() - finally: - if self.count == 0: - stateupdate.exit() - return result - - tr.__class__ = fsmonitortrans - return tr - repo.__class__ = fsmonitorrepo