test-dirstate: fix testcase handling in new tests

Summary:
`#testcases` was translated to `for testcase in ...`, which is subtly
different since the for loop does not clean up states. Insert `cd $TESTTMP`
to make sure `setconfig` sets the global config, instead of the repo one.

Reviewed By: singhsrb

Differential Revision: D16363261

fbshipit-source-id: ea20c758e9131268f9329b98759e7423d9f1aa87
This commit is contained in:
Jun Wu 2019-07-18 15:03:09 -07:00 committed by Facebook Github Bot
parent c137206645
commit 2ec82860a2
2 changed files with 4 additions and 0 deletions

View File

@ -10,6 +10,8 @@ from testutil.dott import feature, sh, testtmp # noqa: F401
for testcase in ["v0", "v1", "v2"]:
sh % "cd $TESTTMP"
if feature.check(["v0"]):
sh % "setconfig 'format.dirstate=0'"

View File

@ -12,6 +12,8 @@ feature.require(["symlink"])
for testcase in ["v0", "v1", "v2"]:
sh % "cd $TESTTMP"
if feature.check(["v0"]):
sh % "setconfig 'format.dirstate=0'"