D5106: py3: fix test-dirstate-race.t
mbthomas (Mark Thomas)
phabricator at mercurial-scm.org
Sun Oct 14 11:27:32 EDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGe787d97e90ad: py3: fix test-dirstate-race.t (authored by mbthomas, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D5106?vs=12136&id=12147
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
@@ -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/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
To: mbthomas, pulkit, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list