--- a/mercurial/context.py Thu Jun 28 21:24:47 2018 +0530
+++ b/mercurial/context.py Thu Jun 28 18:07:22 2018 -0700
@@ -1707,7 +1707,9 @@
def remove(self, ignoremissing=False):
"""wraps unlink for a repo's working directory"""
- self._repo.wvfs.unlinkpath(self._path, ignoremissing=ignoremissing)
+ rmdir = self._repo.ui.configbool('experimental', 'removeemptydirs')
+ self._repo.wvfs.unlinkpath(self._path, ignoremissing=ignoremissing,
+ rmdir=rmdir)
def write(self, data, flags, backgroundclose=False, **kwargs):
"""wraps repo.wwrite"""