Mercurial > public > mercurial-scm > hg-stable
diff mercurial/context.py @ 34054:65ae54582713
merge: move some of the logic in batchget() to workingfilectx
We will use this logic in two places with in-memory merge.
Differential Revision: https://phab.mercurial-scm.org/D444
author | Phil Cohen <phillco@fb.com> |
---|---|
date | Thu, 31 Aug 2017 11:28:59 -0700 |
parents | be814edf3306 |
children | d2fc88426d21 |
line wrap: on
line diff
--- a/mercurial/context.py Thu Aug 31 11:28:59 2017 -0700 +++ b/mercurial/context.py Thu Aug 31 11:28:59 2017 -0700 @@ -1963,6 +1963,14 @@ self._repo.wwrite(self._path, data, flags, backgroundclose=backgroundclose) + def clearunknown(self): + """Removes conflicting items in the working directory so that + ``write()`` can be called successfully. + """ + wvfs = self._repo.wvfs + if wvfs.isdir(self._path) and not wvfs.islink(self._path): + wvfs.removedirs(self._path) + def setflags(self, l, x): self._repo.wvfs.setflags(self._path, l, x)