sapling/eden/scm/tests/default_hgrc.py
Muir Manders 1bcc7abff8 tests: enable rust status for debugruntest tests
Summary:
The new status doesn't work w/ legacy repos, so the tests need to be migrated. For each test, first I tried migrating to eagerepo, but in many cases that didn't work. Next I tried a remotefilelog repo (AKA "newclientrepo"). If I still couldn't get the test to work I just disabled rust status. This was mostly in tests that disabled treemanifest or were explicitly coupled with revlogs somehow.

Some tests had acute "hg status" discrepancies, so I left a FIXME(status) and disabled rust status.

I added a new "eagerepo" tinit.sh function that turns on eager format (for client repos). With this, tests doing "hg init" might just work with features that expect a modern repo.

Reviewed By: quark-zju

Differential Revision: D43839499

fbshipit-source-id: ce6d3b2747b90d31bd246c30551bdb55c446112f
2023-03-16 10:58:55 -07:00

81 lines
1.1 KiB
Python

"""
Default config file for testing
"""
def get_content(
use_watchman: bool = False, use_ipv6: bool = False, is_run_tests_py: bool = False
) -> str:
content = f"""
[ui]
slash=True
interactive=False
mergemarkers=detailed
promptecho=True
ignore.test=$RUNTESTDIR/gitignore
[devel]
all-warnings=True
collapse-traceback =True
default-date=0 0
[web]
address=localhost
ipv6={use_ipv6}
[commands]
status.relative=True
[config]
use-rust=True
[workingcopy]
enablerustwalker=True
use-rust=True
[status]
use-rust=True
[extensions]
treemanifest=
[treemanifest]
sendtrees=True
treeonly=True
rustmanifest=True
useruststore=True
[remotefilelog]
reponame=reponame-default
localdatarepack=True
cachepath=$TESTTMP/default-hgcache
[mutation]
record=False
[hint]
ack-match-full-traversal=True
"""
if use_watchman:
content += """
[extensions]
fsmonitor=
[fsmonitor]
detectrace=True
"""
# Extra configs for run-tests.py.
# For compatibility. Ideally this does not exist.
if is_run_tests_py:
content += """
[scmstore]
enableshim=True
contentstorefallback=True
[workingcopy]
ruststatus=True
"""
return content