I am not able to find any code which tries to populate this dictionary.
Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
durin42 |
hg-reviewers |
I am not able to find any code which tries to populate this dictionary.
No Linters Available |
No Unit Test Coverage |
Path | Packages | |||
---|---|---|---|---|
M | hgext/git/dirstate.py (3 lines) | |||
M | mercurial/dirstate.py (7 lines) | |||
M | mercurial/localrepo.py (5 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
e3b274fe978d | 84391ddf4c78 | Pulkit Goyal | Jul 6 2021, 3:34 PM |
@property | @property | ||||
def _checklink(self): | def _checklink(self): | ||||
return util.checklink(os.path.dirname(pycompat.fsencode(self.git.path))) | return util.checklink(os.path.dirname(pycompat.fsencode(self.git.path))) | ||||
def copies(self): | def copies(self): | ||||
# TODO support copies? | # TODO support copies? | ||||
return {} | return {} | ||||
# # TODO what the heck is this | |||||
_filecache = set() | |||||
def pendingparentchange(self): | def pendingparentchange(self): | ||||
# TODO: we need to implement the context manager bits and | # TODO: we need to implement the context manager bits and | ||||
# correctly stage/revert index edits. | # correctly stage/revert index edits. | ||||
return False | return False | ||||
def write(self, tr): | def write(self, tr): | ||||
# TODO: call parent change callbacks | # TODO: call parent change callbacks | ||||
self._root = root | self._root = root | ||||
self._sparsematchfn = sparsematchfn | self._sparsematchfn = sparsematchfn | ||||
# ntpath.join(root, '') of Python 2.7.9 does not add sep if root is | # ntpath.join(root, '') of Python 2.7.9 does not add sep if root is | ||||
# UNC path pointing to root share (issue4557) | # UNC path pointing to root share (issue4557) | ||||
self._rootdir = pathutil.normasprefix(root) | self._rootdir = pathutil.normasprefix(root) | ||||
self._dirty = False | self._dirty = False | ||||
self._lastnormaltime = 0 | self._lastnormaltime = 0 | ||||
self._ui = ui | self._ui = ui | ||||
self._filecache = {} | |||||
self._parentwriters = 0 | self._parentwriters = 0 | ||||
self._filename = b'dirstate' | self._filename = b'dirstate' | ||||
self._pendingfilename = b'%s.pending' % self._filename | self._pendingfilename = b'%s.pending' % self._filename | ||||
self._plchangecallbacks = {} | self._plchangecallbacks = {} | ||||
self._origpl = None | self._origpl = None | ||||
self._updatedfiles = set() | self._updatedfiles = set() | ||||
self._mapcls = dirstatemap.dirstatemap | self._mapcls = dirstatemap.dirstatemap | ||||
# Access and cache cwd early, so we don't access it for the first time | # Access and cache cwd early, so we don't access it for the first time | ||||
return copies | return copies | ||||
def setbranch(self, branch): | def setbranch(self, branch): | ||||
self.__class__._branch.set(self, encoding.fromlocal(branch)) | self.__class__._branch.set(self, encoding.fromlocal(branch)) | ||||
f = self._opener(b'branch', b'w', atomictemp=True, checkambig=True) | f = self._opener(b'branch', b'w', atomictemp=True, checkambig=True) | ||||
try: | try: | ||||
f.write(self._branch + b'\n') | f.write(self._branch + b'\n') | ||||
f.close() | f.close() | ||||
# make sure filecache has the correct stat info for _branch after | |||||
# replacing the underlying file | |||||
ce = self._filecache[b'_branch'] | |||||
if ce: | |||||
ce.refresh() | |||||
except: # re-raises | except: # re-raises | ||||
f.discard() | f.discard() | ||||
raise | raise | ||||
def invalidate(self): | def invalidate(self): | ||||
"""Causes the next access to reread the dirstate. | """Causes the next access to reread the dirstate. | ||||
This is different from localrepo.invalidatedirstate() because it always | This is different from localrepo.invalidatedirstate() because it always |
to check if it was modified since the last time it was read, | to check if it was modified since the last time it was read, | ||||
rereading it if it has. | rereading it if it has. | ||||
This is different to dirstate.invalidate() that it doesn't always | This is different to dirstate.invalidate() that it doesn't always | ||||
rereads the dirstate. Use dirstate.invalidate() if you want to | rereads the dirstate. Use dirstate.invalidate() if you want to | ||||
explicitly read the dirstate again (i.e. restoring it to a previous | explicitly read the dirstate again (i.e. restoring it to a previous | ||||
known good state).""" | known good state).""" | ||||
if hasunfilteredcache(self, 'dirstate'): | if hasunfilteredcache(self, 'dirstate'): | ||||
for k in self.dirstate._filecache: | |||||
try: | |||||
delattr(self.dirstate, k) | |||||
except AttributeError: | |||||
pass | |||||
delattr(self.unfiltered(), 'dirstate') | delattr(self.unfiltered(), 'dirstate') | ||||
def invalidate(self, clearfilecache=False): | def invalidate(self, clearfilecache=False): | ||||
"""Invalidates both store and non-store parts other than dirstate | """Invalidates both store and non-store parts other than dirstate | ||||
If a transaction is running, invalidation of store is omitted, | If a transaction is running, invalidation of store is omitted, | ||||
because discarding in-memory changes might cause inconsistency | because discarding in-memory changes might cause inconsistency | ||||
(e.g. incomplete fncache causes unintentional failure, but | (e.g. incomplete fncache causes unintentional failure, but |