Mercurial > public > mercurial-scm > hg-stable
comparison 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 |
comparison
equal
deleted
inserted
replaced
34053:fe04c018eaac | 34054:65ae54582713 |
---|---|
1961 def write(self, data, flags, backgroundclose=False): | 1961 def write(self, data, flags, backgroundclose=False): |
1962 """wraps repo.wwrite""" | 1962 """wraps repo.wwrite""" |
1963 self._repo.wwrite(self._path, data, flags, | 1963 self._repo.wwrite(self._path, data, flags, |
1964 backgroundclose=backgroundclose) | 1964 backgroundclose=backgroundclose) |
1965 | 1965 |
1966 def clearunknown(self): | |
1967 """Removes conflicting items in the working directory so that | |
1968 ``write()`` can be called successfully. | |
1969 """ | |
1970 wvfs = self._repo.wvfs | |
1971 if wvfs.isdir(self._path) and not wvfs.islink(self._path): | |
1972 wvfs.removedirs(self._path) | |
1973 | |
1966 def setflags(self, l, x): | 1974 def setflags(self, l, x): |
1967 self._repo.wvfs.setflags(self._path, l, x) | 1975 self._repo.wvfs.setflags(self._path, l, x) |
1968 | 1976 |
1969 class workingcommitctx(workingctx): | 1977 class workingcommitctx(workingctx): |
1970 """A workingcommitctx object makes access to data related to | 1978 """A workingcommitctx object makes access to data related to |