sapling/eden/scm/tests/test-gitignore.t
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

73 lines
1.2 KiB
Raku

#debugruntest-compatible
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2.
$ eagerepo
$ newrepo
$ setconfig 'ui.gitignore=1' 'ui.hgignore=0'
$ cat > .gitignore << 'EOF'
> *.tmp
> build/
> EOF
$ mkdir build exp
$ cat > build/.gitignore << 'EOF'
> !*
> EOF
$ cat > exp/.gitignore << 'EOF'
> !i.tmp
> EOF
$ touch build/libfoo.so t.tmp Makefile exp/x.tmp exp/i.tmp
$ hg status
? .gitignore
? Makefile
? exp/.gitignore
? exp/i.tmp
# Test global ignore files
$ cat > $TESTTMP/globalignore << 'EOF'
> *.pyc
> EOF
$ touch x.pyc
$ hg status
? .gitignore
? Makefile
? exp/.gitignore
? exp/i.tmp
? x.pyc
$ hg status --config 'ui.ignore.global=$TESTTMP/globalignore'
? .gitignore
? Makefile
? exp/.gitignore
? exp/i.tmp
# Test directory patterns only match directories.
$ cat > .gitignore << 'EOF'
> *.tmp
> build*/
> EOF
$ mkdir buildstuff
$ touch buildstuff/output builddocs.txt
$ hg status
? .gitignore
? Makefile
? builddocs.txt
? exp/.gitignore
? exp/i.tmp
? x.pyc