comparison tests/test-dirstate-race.t @ 41071:28a4fb793ba1

extensions: deprecate extsetup without a `ui` argument (API) 9.5 years should be enough time, but there were some tests for the old style still (which are now updated). Exthelper doesn't fallback to the old API, so this is for consistency. .. api:: The extension hook ``extsetup`` without a `ui` argument has been deprecated, and will be removed in the next version. Add a `ui` argument to avoid the deprecation warning.
author Matt Harbison <matt_harbison@yahoo.com>
date Thu, 27 Dec 2018 21:46:03 -0500
parents e787d97e90ad
children f90a5c211251
comparison
equal deleted inserted replaced
41070:f2601cbce209 41071:28a4fb793ba1
51 $ cat >> $TESTTMP/dirstaterace.py << EOF 51 $ cat >> $TESTTMP/dirstaterace.py << EOF
52 > from mercurial import ( 52 > from mercurial import (
53 > context, 53 > context,
54 > extensions, 54 > extensions,
55 > ) 55 > )
56 > def extsetup(): 56 > def extsetup(ui):
57 > extensions.wrapfunction(context.workingctx, '_checklookup', overridechecklookup) 57 > extensions.wrapfunction(context.workingctx, '_checklookup', overridechecklookup)
58 > def overridechecklookup(orig, self, files): 58 > def overridechecklookup(orig, self, files):
59 > # make an update that changes the dirstate from underneath 59 > # make an update that changes the dirstate from underneath
60 > self._repo.ui.system(br"sh '$TESTTMP/dirstaterace.sh'", 60 > self._repo.ui.system(br"sh '$TESTTMP/dirstaterace.sh'",
61 > cwd=self._repo.root) 61 > cwd=self._repo.root)