Mercurial > public > mercurial-scm > hg
comparison mercurial/context.py @ 35286:307b1689e3f8
overlayworkingctx: make clean() public
It will be called directly by rebase after concluding a node.
Differential Revision: https://phab.mercurial-scm.org/D1230
author | Phil Cohen <phillco@fb.com> |
---|---|
date | Fri, 01 Dec 2017 00:07:23 -0800 |
parents | 3ceebf497057 |
children | 2f8c476c49fe |
comparison
equal
deleted
inserted
replaced
35285:3ceebf497057 | 35286:307b1689e3f8 |
---|---|
1991 """ | 1991 """ |
1992 | 1992 |
1993 def __init__(self, repo, wrappedctx): | 1993 def __init__(self, repo, wrappedctx): |
1994 super(overlayworkingctx, self).__init__(repo) | 1994 super(overlayworkingctx, self).__init__(repo) |
1995 self._repo = repo | 1995 self._repo = repo |
1996 self.clean() | |
1996 self._wrappedctx = wrappedctx | 1997 self._wrappedctx = wrappedctx |
1997 self._clean() | |
1998 | 1998 |
1999 def data(self, path): | 1999 def data(self, path): |
2000 if self.isdirty(path): | 2000 if self.isdirty(path): |
2001 if self._cache[path]['exists']: | 2001 if self._cache[path]['exists']: |
2002 if self._cache[path]['data']: | 2002 if self._cache[path]['data']: |
2072 return self._wrappedctx[path].size() | 2072 return self._wrappedctx[path].size() |
2073 | 2073 |
2074 def isdirty(self, path): | 2074 def isdirty(self, path): |
2075 return path in self._cache | 2075 return path in self._cache |
2076 | 2076 |
2077 def _clean(self): | 2077 def clean(self): |
2078 self._cache = {} | 2078 self._cache = {} |
2079 | 2079 |
2080 def _markdirty(self, path, exists, data=None, date=None, flags=''): | 2080 def _markdirty(self, path, exists, data=None, date=None, flags=''): |
2081 self._cache[path] = { | 2081 self._cache[path] = { |
2082 'exists': exists, | 2082 'exists': exists, |