D5106: py3: fix test-dirstate-race.t
mbthomas (Mark Thomas)
phabricator at mercurial-scm.org
Sun Oct 14 14:03:15 UTC 2018
mbthomas created this revision.
Herald added a reviewer: pulkit.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D5106
AFFECTED FILES
contrib/python3-whitelist
mercurial/localrepo.py
tests/test-dirstate-race.t
CHANGE DETAILS
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
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -2066,13 +2066,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/contrib/python3-whitelist b/contrib/python3-whitelist
--- a/contrib/python3-whitelist
+++ b/contrib/python3-whitelist
@@ -139,6 +139,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
To: mbthomas, pulkit, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list