diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist --- a/contrib/python3-whitelist +++ b/contrib/python3-whitelist @@ -140,6 +140,7 @@ test-directaccess.t test-dirstate-backup.t test-dirstate-nonnormalset.t +test-dirstate-race.t test-dirstate.t test-dispatch.py test-doctest.py diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -2067,13 +2067,13 @@ rereads the dirstate. Use dirstate.invalidate() if you want to explicitly read the dirstate again (i.e. restoring it to a previous known good state).''' - if hasunfilteredcache(self, 'dirstate'): + if hasunfilteredcache(self, r'dirstate'): for k in self.dirstate._filecache: try: delattr(self.dirstate, k) except AttributeError: pass - delattr(self.unfiltered(), 'dirstate') + delattr(self.unfiltered(), r'dirstate') def invalidate(self, clearfilecache=False): '''Invalidates both store and non-store parts other than dirstate diff --git a/tests/test-dirstate-race.t b/tests/test-dirstate-race.t --- a/tests/test-dirstate-race.t +++ b/tests/test-dirstate-race.t @@ -57,7 +57,7 @@ > extensions.wrapfunction(context.workingctx, '_checklookup', overridechecklookup) > def overridechecklookup(orig, self, files): > # make an update that changes the dirstate from underneath - > self._repo.ui.system(r"sh '$TESTTMP/dirstaterace.sh'", + > self._repo.ui.system(br"sh '$TESTTMP/dirstaterace.sh'", > cwd=self._repo.root) > return orig(self, files) > EOF