comparison mercurial/localrepo.py @ 40296:e787d97e90ad

py3: fix test-dirstate-race.t Differential Revision: https://phab.mercurial-scm.org/D5106
author Mark Thomas <mbthomas@fb.com>
date Sun, 14 Oct 2018 14:02:32 +0000
parents 9d5ddf55415b
children 6637b079ae45
comparison
equal deleted inserted replaced
40295:fa88170c10bb 40296:e787d97e90ad
2065 2065
2066 This is different to dirstate.invalidate() that it doesn't always 2066 This is different to dirstate.invalidate() that it doesn't always
2067 rereads the dirstate. Use dirstate.invalidate() if you want to 2067 rereads the dirstate. Use dirstate.invalidate() if you want to
2068 explicitly read the dirstate again (i.e. restoring it to a previous 2068 explicitly read the dirstate again (i.e. restoring it to a previous
2069 known good state).''' 2069 known good state).'''
2070 if hasunfilteredcache(self, 'dirstate'): 2070 if hasunfilteredcache(self, r'dirstate'):
2071 for k in self.dirstate._filecache: 2071 for k in self.dirstate._filecache:
2072 try: 2072 try:
2073 delattr(self.dirstate, k) 2073 delattr(self.dirstate, k)
2074 except AttributeError: 2074 except AttributeError:
2075 pass 2075 pass
2076 delattr(self.unfiltered(), 'dirstate') 2076 delattr(self.unfiltered(), r'dirstate')
2077 2077
2078 def invalidate(self, clearfilecache=False): 2078 def invalidate(self, clearfilecache=False):
2079 '''Invalidates both store and non-store parts other than dirstate 2079 '''Invalidates both store and non-store parts other than dirstate
2080 2080
2081 If a transaction is running, invalidation of store is omitted, 2081 If a transaction is running, invalidation of store is omitted,