This instance will be upgraded to Heptapod 0.19.0rc2 on 2021-01-18 at 11:00 UTC+1 (a few minutes of downtime)

Commit a981e3c3 authored by Yuya Nishihara's avatar Yuya Nishihara

repoagent: rename stopMonitoring to be merged with shutdown of command server

parent 06f19c1dc7c9
......@@ -341,9 +341,8 @@ class RepoAgent(QObject):
else:
self._watcher.startMonitoring()
def stopMonitoring(self):
"""Stop filesystem monitoring on repository closed by RepoManager or
command about to run"""
def stopService(self):
"""Shut down back-end services on repository closed by RepoManager"""
self._watcher.stopMonitoring()
def rawRepo(self):
......@@ -387,7 +386,8 @@ class RepoAgent(QObject):
def _onRepositoryDestroyed(self):
if self._repo.root in _repocache:
del _repocache[self._repo.root]
self.stopMonitoring() # avoid further changed/destroyed signals
# avoid further changed/destroyed signals
self._watcher.stopMonitoring()
self.repositoryDestroyed.emit()
@pyqtSlot()
......@@ -408,7 +408,7 @@ class RepoAgent(QObject):
@pyqtSlot(bool)
def _onBusyChanged(self, busy):
if busy:
self.stopMonitoring()
self._watcher.stopMonitoring()
else:
self._watcher.pollStatus()
self.startMonitoringIfEnabled()
......@@ -545,7 +545,7 @@ class RepoManager(QObject):
self._ui.debug('closing repo: %s\n' % hglib.fromunicode(path))
agent, _refcount = self._openagents.pop(path)
agent.stopMonitoring()
agent.stopService()
# TODO: disconnected automatically if _repocache does not exist
for (sig, _slot), mapper in zip(self._SIGNALMAP, self._sigmappers):
QObject.disconnect(agent, sig, mapper, SLOT('map()'))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment