mercurial/context.py
changeset 34556 7a8a16f8ea22
parent 34479 99c3dee3f6ce
child 34681 4dc8a2ee0f4f
equal deleted inserted replaced
34555:989e884d1be9 34556:7a8a16f8ea22
  1931     def clearunknown(self):
  1931     def clearunknown(self):
  1932         """Removes conflicting items in the working directory so that
  1932         """Removes conflicting items in the working directory so that
  1933         ``write()`` can be called successfully.
  1933         ``write()`` can be called successfully.
  1934         """
  1934         """
  1935         wvfs = self._repo.wvfs
  1935         wvfs = self._repo.wvfs
  1936         if wvfs.isdir(self._path) and not wvfs.islink(self._path):
  1936         f = self._path
  1937             wvfs.removedirs(self._path)
  1937         if wvfs.isdir(f) and not wvfs.islink(f):
       
  1938             wvfs.rmtree(f, forcibly=True)
       
  1939         for p in reversed(list(util.finddirs(f))):
       
  1940             if wvfs.isfileorlink(p):
       
  1941                 wvfs.unlink(p)
       
  1942                 break
  1938 
  1943 
  1939     def setflags(self, l, x):
  1944     def setflags(self, l, x):
  1940         self._repo.wvfs.setflags(self._path, l, x)
  1945         self._repo.wvfs.setflags(self._path, l, x)
  1941 
  1946 
  1942 class overlayworkingctx(workingctx):
  1947 class overlayworkingctx(workingctx):