Bug 1288273 - Remove hgwatchman even if named watchman, r?gps
MozReview-Commit-ID: Ckbco00nETx
--- a/hgext/configwizard/__init__.py
+++ b/hgext/configwizard/__init__.py
@@ -653,21 +653,19 @@ def _checkfsmonitor(ui, cw, hgversion):
subprocess.check_output([watchman, '--version'],
stderr=subprocess.STDOUT)
except Exception:
ui.write(WATCHMAN_NOT_FOUND)
ui.write('\n')
return
if ui.hasconfig('extensions', 'fsmonitor'):
- try:
- del cw.c['extensions']['hgwatchman']
+ ext = cw.c['extensions']
+ if any([ext.pop('hgwatchman', False), ext.pop('watchman', False)]):
ui.write('Removing extensions.hgwatchman because fsmonitor is installed\n')
- except KeyError:
- pass
return
# Mercurial 3.8+ has fsmonitor built-in.
if hgversion >= (3, 8, 0):
_promptnativeextension(ui, cw, 'fsmonitor', FSMONITOR_INFO)
else:
ui.write(FSMONITOR_NOT_AVAILABLE)