mercurial/context.py
changeset 38493 da2a7d8354b2
parent 38277 aaed058a0390
child 38519 4455e5d4d59c
--- 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"""