changeset 44724:5c2a4f37eace

tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems BSD-derived systems will use "ls -A" when running as root. Adjust the test cases to always use the flag and include .hg and related output as appropiately. Differential Revision: https://phab.mercurial-scm.org/D8397
author Joerg Sonnenberger <joerg@bec.de>
date Fri, 10 Apr 2020 19:58:34 +0200
parents 28aacddf3af0
children 16c361152133
files tests/test-audit-subrepo.t tests/test-backwards-remove.t tests/test-clone.t tests/test-copytrace-heuristics.t tests/test-fetch.t tests/test-import.t tests/test-largefiles.t tests/test-narrow-acl.t tests/test-narrow-clone-stream.t tests/test-narrow-clone.t tests/test-narrow-pull.t tests/test-narrow-trackedcmd.t tests/test-narrow-widen-no-ellipsis.t tests/test-narrow-widen.t tests/test-purge.t tests/test-remotefilelog-local.t tests/test-revert-interactive.t tests/test-revert-unknown.t tests/test-revert.t tests/test-shelve.t tests/test-sparse-clear.t tests/test-sparse-clone.t tests/test-sparse-import.t tests/test-sparse-merges.t tests/test-sparse-profiles.t tests/test-sparse-requirement.t tests/test-sparse.t tests/test-subrepo-missing.t tests/test-subrepo.t tests/test-uncommit.t tests/test-update-reverse.t
diffstat 31 files changed, 263 insertions(+), 111 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-audit-subrepo.t	Fri Apr 10 19:53:36 2020 +0200
+++ b/tests/test-audit-subrepo.t	Fri Apr 10 19:58:34 2020 +0200
@@ -281,24 +281,36 @@
   $ hg clone -q main main2
   abort: subrepo path contains illegal component: $SUB
   [255]
-  $ ls main2
+  $ ls -A main2
+  .hg
+  .hgsub
+  .hgsubstate
 
   $ SUB=sub1 hg clone -q main main3
   abort: subrepo path contains illegal component: $SUB
   [255]
-  $ ls main3
+  $ ls -A main3
+  .hg
+  .hgsub
+  .hgsubstate
 
   $ SUB=sub2 hg clone -q main main4
   abort: subrepo path contains illegal component: $SUB
   [255]
-  $ ls main4
+  $ ls -A main4
+  .hg
+  .hgsub
+  .hgsubstate
 
 on clone empty subrepo into .hg, then pull (and update), which at least fails:
 
   $ SUB=.hg hg clone -qr0 main main5
   abort: subrepo path contains illegal component: $SUB
   [255]
-  $ ls main5
+  $ ls -A main5
+  .hg
+  .hgsub
+  .hgsubstate
   $ test -d main5/.hg/.hg
   [1]
   $ SUB=.hg hg -R main5 pull -u
@@ -320,7 +332,10 @@
   $ SUB=.hg hg clone -q main main6
   abort: subrepo path contains illegal component: $SUB
   [255]
-  $ ls main6
+  $ ls -A main6
+  .hg
+  .hgsub
+  .hgsubstate
   $ cat main6/.hg/hgrc | grep pwned
   [1]
 
@@ -329,7 +344,10 @@
   $ SUB=.hg/foo hg clone -q main main7
   abort: subrepo path contains illegal component: $SUB
   [255]
-  $ ls main7
+  $ ls -A main7
+  .hg
+  .hgsub
+  .hgsubstate
   $ test -d main7/.hg/.hg
   [1]
 
@@ -338,7 +356,10 @@
   $ SUB=../out-of-tree-write hg clone -q main main8
   abort: subrepo path contains illegal component: $SUB
   [255]
-  $ ls main8
+  $ ls -A main8
+  .hg
+  .hgsub
+  .hgsubstate
 
 on clone (and update) into e.g. $HOME, which doesn't work since subrepo paths
 are concatenated prior to variable expansion:
@@ -346,8 +367,8 @@
   $ SUB="$TESTTMP/envvar/fakehome" hg clone -q main main9
   abort: subrepo path contains illegal component: $SUB
   [255]
-  $ ls main9 | wc -l
-  \s*0 (re)
+  $ ls -A main9 | wc -l
+  \s*3 (re)
 
   $ ls
   main
@@ -618,7 +639,8 @@
   $ SUB="$FAKEHOME" hg clone -qr1 main main6
   abort: subrepo path contains illegal component: $SUB
   [255]
-  $ ls "$FAKEHOME"
+  $ ls -A "$FAKEHOME"
+  .hg
   a
   $ SUB="$FAKEHOME" hg -R main6 pull -u
   pulling from $TESTTMP/envvarsym/main
@@ -631,7 +653,8 @@
   .hgsubstate: untracked file differs
   abort: untracked files in working directory differ from files in requested revision
   [255]
-  $ ls "$FAKEHOME"
+  $ ls -A "$FAKEHOME"
+  .hg
   a
 
 on clone only symlink with hg-managed fakehome directory,
@@ -642,7 +665,8 @@
   $ touch "$FAKEHOME/a"
   $ hg -R "$FAKEHOME" ci -qAm 'add fakehome file'
   $ SUB="$FAKEHOME" hg clone -qr0 main main7
-  $ ls "$FAKEHOME"
+  $ ls -A "$FAKEHOME"
+  .hg
   a
   $ SUB="$FAKEHOME" hg -R main7 pull -uf
   pulling from $TESTTMP/envvarsym/main
@@ -654,7 +678,8 @@
   new changesets * (glob)
   abort: subrepo path contains illegal component: $SUB
   [255]
-  $ ls "$FAKEHOME"
+  $ ls -A "$FAKEHOME"
+  .hg
   a
 
   $ cd ..
@@ -698,7 +723,10 @@
 #else
 
   $ hg clone -q driveletter driveletter2
-  $ ls driveletter2
+  $ ls -A driveletter2
+  .hg
+  .hgsub
+  .hgsubstate
   X:
 
 #endif
--- a/tests/test-backwards-remove.t	Fri Apr 10 19:53:36 2020 +0200
+++ b/tests/test-backwards-remove.t	Fri Apr 10 19:58:34 2020 +0200
@@ -2,7 +2,8 @@
   $ echo This is file a1 > a
   $ hg add a
   $ hg commit -m "commit #0"
-  $ ls
+  $ ls -A
+  .hg
   a
   $ echo This is file b1 > b
   $ hg add b
@@ -12,5 +13,6 @@
 
 B should disappear
 
-  $ ls
+  $ ls -A
+  .hg
   a
--- a/tests/test-clone.t	Fri Apr 10 19:53:36 2020 +0200
+++ b/tests/test-clone.t	Fri Apr 10 19:58:34 2020 +0200
@@ -1097,7 +1097,8 @@
   no changes found
   adding remote bookmark bookA
 
-  $ ls share-1anowc
+  $ ls -A share-1anowc
+  .hg
 
 Test that auto sharing doesn't cause failure of "hg clone local remote"
 
--- a/tests/test-copytrace-heuristics.t	Fri Apr 10 19:53:36 2020 +0200
+++ b/tests/test-copytrace-heuristics.t	Fri Apr 10 19:58:34 2020 +0200
@@ -292,7 +292,8 @@
   rebasing 1:472e38d57782 "mv a b"
   saved backup bundle to $TESTTMP/repo/.hg/strip-backup/472e38d57782-17d50e29-rebase.hg
   $ hg up -q c492ed3c7e35dcd1dc938053b8adf56e2cfbd062
-  $ ls
+  $ ls -A
+  .hg
   b
   $ cd ..
   $ rm -rf repo
@@ -433,7 +434,8 @@
   rebasing 3:ef716627c70b "mod a" (tip)
   merging b and a to b
   saved backup bundle to $TESTTMP/repo/.hg/strip-backup/ef716627c70b-24681561-rebase.hg
-  $ ls
+  $ ls -A
+  .hg
   b
   c
   $ cat b
@@ -470,7 +472,8 @@
   0 files updated, 1 files merged, 0 files removed, 0 files unresolved
   (branch merge, don't forget to commit)
   $ hg ci -m merge
-  $ ls
+  $ ls -A
+  .hg
   b
   $ cd ..
   $ rm -rf repo
@@ -505,7 +508,8 @@
   merging b and a to b
   merging c and a to c
   saved backup bundle to $TESTTMP/repo/repo/.hg/strip-backup/ef716627c70b-24681561-rebase.hg
-  $ ls
+  $ ls -A
+  .hg
   b
   c
   $ cat b
@@ -558,7 +562,8 @@
   |/   desc: mod a
   o  rev: 0, phase: draft
      desc: initial
-  $ ls
+  $ ls -A
+  .hg
   c
   $ cd ..
   $ rm -rf repo
@@ -588,7 +593,8 @@
   unshelving change 'default'
   rebasing shelved changes
   merging b and a to b
-  $ ls
+  $ ls -A
+  .hg
   b
   $ cat b
   b
--- a/tests/test-fetch.t	Fri Apr 10 19:53:36 2020 +0200
+++ b/tests/test-fetch.t	Fri Apr 10 19:58:34 2020 +0200
@@ -62,7 +62,8 @@
   merging with 1:d36c0562f908
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   new changeset 3:a323a0c43ec4 merges remote changes with local
-  $ ls c
+  $ ls -A c
+  .hg
   a
   b
   c
--- a/tests/test-import.t	Fri Apr 10 19:53:36 2020 +0200
+++ b/tests/test-import.t	Fri Apr 10 19:58:34 2020 +0200
@@ -1823,7 +1823,8 @@
   $ hg status -c .
   C a
   C b
-  $ ls
+  $ ls -A
+  .hg
   a
   a.rej
   b
@@ -1870,7 +1871,8 @@
   $ hg status -c .
   C a
   C b
-  $ ls
+  $ ls -A
+  .hg
   a
   a.rej
   b
@@ -1919,7 +1921,8 @@
   $ hg status -c .
   C a
   C b
-  $ ls
+  $ ls -A
+  .hg
   a
   a.rej
   b
--- a/tests/test-largefiles.t	Fri Apr 10 19:53:36 2020 +0200
+++ b/tests/test-largefiles.t	Fri Apr 10 19:58:34 2020 +0200
@@ -126,7 +126,9 @@
   Invoking status precommit hook
   R large1
   R normal1
-  $ ls
+  $ ls -A
+  .hg
+  .hglf
   sub
   $ echo "testlargefile" > large1-test
   $ hg add --large large1-test
@@ -254,7 +256,8 @@
   $ cat sub/large2
   large22
   $ cd ../archive2
-  $ ls
+  $ ls -A
+  .hg_archival.txt
   sub
   $ cat sub/normal2
   normal22
--- a/tests/test-narrow-acl.t	Fri Apr 10 19:53:36 2020 +0200
+++ b/tests/test-narrow-acl.t	Fri Apr 10 19:58:34 2020 +0200
@@ -28,7 +28,8 @@
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
 The clone directory should only contain f1 and f2
-  $ ls -1 narrowclone1 | sort
+  $ ls -A -1 narrowclone1 | sort
+  .hg
   f1
   f2
 
--- a/tests/test-narrow-clone-stream.t	Fri Apr 10 19:53:36 2020 +0200
+++ b/tests/test-narrow-clone-stream.t	Fri Apr 10 19:58:34 2020 +0200
@@ -54,7 +54,8 @@
   transferred * KB in * seconds (* */sec) (glob)
 
   $ cd narrow
-  $ ls
+  $ ls -A
+  .hg
   $ hg tracked
   I path:dir/src/F10
 
--- a/tests/test-narrow-clone.t	Fri Apr 10 19:53:36 2020 +0200
+++ b/tests/test-narrow-clone.t	Fri Apr 10 19:58:34 2020 +0200
@@ -180,7 +180,8 @@
   $ hg tracked
   $ hg update
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ ls
+  $ ls -A
+  .hg
 
   $ cd ..
 
--- a/tests/test-narrow-pull.t	Fri Apr 10 19:53:36 2020 +0200
+++ b/tests/test-narrow-pull.t	Fri Apr 10 19:58:34 2020 +0200
@@ -26,7 +26,8 @@
   updating to branch default
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ cd narrow
-  $ ls
+  $ ls -A
+  .hg
   f2
   f8
   $ cat f2 f8
--- a/tests/test-narrow-trackedcmd.t	Fri Apr 10 19:53:36 2020 +0200
+++ b/tests/test-narrow-trackedcmd.t	Fri Apr 10 19:58:34 2020 +0200
@@ -46,7 +46,8 @@
   $ cd narrow
   $ hg tracked
   I path:inside
-  $ ls
+  $ ls -A
+  .hg
   inside
   $ cat inside/f
   inside
--- a/tests/test-narrow-widen-no-ellipsis.t	Fri Apr 10 19:53:36 2020 +0200
+++ b/tests/test-narrow-widen-no-ellipsis.t	Fri Apr 10 19:58:34 2020 +0200
@@ -55,7 +55,8 @@
   added 0 changesets with 1 changes to 1 files
   $ hg tracked
   I path:inside
-  $ ls
+  $ ls -A
+  .hg
   inside
   $ cat inside/f
   inside
--- a/tests/test-narrow-widen.t	Fri Apr 10 19:53:36 2020 +0200
+++ b/tests/test-narrow-widen.t	Fri Apr 10 19:58:34 2020 +0200
@@ -51,7 +51,8 @@
   $ cd narrow
   $ hg tracked
   I path:inside
-  $ ls
+  $ ls -A
+  .hg
   inside
   $ cat inside/f
   inside
--- a/tests/test-purge.t	Fri Apr 10 19:53:36 2020 +0200
+++ b/tests/test-purge.t	Fri Apr 10 19:58:34 2020 +0200
@@ -25,7 +25,9 @@
   empty_dir
   $ hg purge -v
   removing directory empty_dir
-  $ ls
+  $ ls -A
+  .hg
+  .hgignore
   directory
   r1
 
@@ -41,7 +43,9 @@
   removing file untracked_dir/untracked_file1
   removing file untracked_dir/untracked_file2
   removing directory untracked_dir
-  $ ls
+  $ ls -A
+  .hg
+  .hgignore
   directory
   r1
 
@@ -61,7 +65,9 @@
   $ hg purge -v
   removing file untracked_file
   removing file untracked_file_readonly
-  $ ls
+  $ ls -A
+  .hg
+  .hgignore
   directory
   r1
 
@@ -72,7 +78,9 @@
   directory/untracked_file
   $ hg purge -v
   removing file directory/untracked_file
-  $ ls
+  $ ls -A
+  .hg
+  .hgignore
   directory
   r1
 
@@ -84,7 +92,9 @@
   $ hg purge -v
   removing directory untracked_directory/nested_directory
   removing directory untracked_directory
-  $ ls
+  $ ls -A
+  .hg
+  .hgignore
   directory
   r1
 
@@ -98,7 +108,9 @@
   removing directory untracked_directory/nested_directory
   removing directory untracked_directory
   $ cd ..
-  $ ls
+  $ ls -A
+  .hg
+  .hgignore
   directory
   r1
 
@@ -113,7 +125,9 @@
   removing directory untracked_directory/nested_directory
   removing directory untracked_directory
   $ cd ..
-  $ ls
+  $ ls -A
+  .hg
+  .hgignore
   directory
   r1
   $ ls directory/untracked_file
@@ -135,7 +149,9 @@
   ignored
   $ hg purge -v -i
   removing file ignored
-  $ ls
+  $ ls -A
+  .hg
+  .hgignore
   directory
   r1
   untracked_file
@@ -189,7 +205,9 @@
   $ touch excluded_file
   $ hg purge -p -X excluded_file
   $ hg purge -v -X excluded_file
-  $ ls
+  $ ls -A
+  .hg
+  .hgignore
   directory
   excluded_file
   r1
@@ -201,7 +219,9 @@
   $ touch excluded_dir/file
   $ hg purge -p -X excluded_dir
   $ hg purge -v -X excluded_dir
-  $ ls
+  $ ls -A
+  .hg
+  .hgignore
   directory
   excluded_dir
   r1
@@ -214,7 +234,9 @@
   $ mkdir excluded_dir
   $ hg purge -p -X excluded_dir
   $ hg purge -v -X excluded_dir
-  $ ls
+  $ ls -A
+  .hg
+  .hgignore
   directory
   excluded_dir
   r1
@@ -241,7 +263,9 @@
   $ hg purge -v --files
   removing file dir/untracked_file
   removing file untracked_file
-  $ ls
+  $ ls -A
+  .hg
+  .hgignore
   dir
   empty_dir
   $ ls dir
@@ -254,7 +278,9 @@
   empty_dir
   $ hg purge -v --dirs
   removing directory empty_dir
-  $ ls
+  $ ls -A
+  .hg
+  .hgignore
   dir
   untracked_file
   $ ls dir
@@ -273,6 +299,8 @@
   removing file untracked_file
   removing directory empty_dir
   removing directory dir
-  $ ls
+  $ ls -A
+  .hg
+  .hgignore
 
   $ cd ..
--- a/tests/test-remotefilelog-local.t	Fri Apr 10 19:53:36 2020 +0200
+++ b/tests/test-remotefilelog-local.t	Fri Apr 10 19:58:34 2020 +0200
@@ -121,7 +121,8 @@
 # unbundle
 
   $ clearcache
-  $ ls
+  $ ls -A
+  .hg
   w
   x
   y
--- a/tests/test-revert-interactive.t	Fri Apr 10 19:53:36 2020 +0200
+++ b/tests/test-revert-interactive.t	Fri Apr 10 19:58:34 2020 +0200
@@ -475,14 +475,16 @@
   > EOF
   add back removed file a (Yn)? y
   undeleting a
-  $ ls
+  $ ls -A
+  .hg
   a
   $ hg rm a
   $ hg revert -i<<EOF
   > n
   > EOF
   add back removed file a (Yn)? n
-  $ ls
+  $ ls -A
+  .hg
   $ hg revert -a
   undeleting a
   $ cd ..
--- a/tests/test-revert-unknown.t	Fri Apr 10 19:53:36 2020 +0200
+++ b/tests/test-revert-unknown.t	Fri Apr 10 19:58:34 2020 +0200
@@ -24,6 +24,7 @@
 
 Should show a and unknown
 
-  $ ls
+  $ ls -A
+  .hg
   a
   unknown
--- a/tests/test-revert.t	Fri Apr 10 19:53:36 2020 +0200
+++ b/tests/test-revert.t	Fri Apr 10 19:58:34 2020 +0200
@@ -73,7 +73,8 @@
   $ hg status b
   b: * (glob)
 
-  $ ls
+  $ ls -A
+  .hg
   a
   c
   e
--- a/tests/test-shelve.t	Fri Apr 10 19:53:36 2020 +0200
+++ b/tests/test-shelve.t	Fri Apr 10 19:58:34 2020 +0200
@@ -1249,7 +1249,8 @@
   record change 2/2 to 'd'?
   (enter ? for help) [Ynesfdaq?] n
   
-  $ ls
+  $ ls -A
+  .hg
   b
   c
   e
@@ -1284,7 +1285,8 @@
   $ hg status -v
   A c
   A d
-  $ ls
+  $ ls -A
+  .hg
   b
   c
   d
--- a/tests/test-sparse-clear.t	Fri Apr 10 19:53:36 2020 +0200
+++ b/tests/test-sparse-clear.t	Fri Apr 10 19:58:34 2020 +0200
@@ -28,10 +28,12 @@
 Clear rules when there are includes
 
   $ hg debugsparse --include *.py
-  $ ls
+  $ ls -A
+  .hg
   data.py
   $ hg debugsparse --clear-rules
-  $ ls
+  $ ls -A
+  .hg
   base.sparse
   data.py
   index.html
@@ -41,12 +43,14 @@
 Clear rules when there are excludes
 
   $ hg debugsparse --exclude *.sparse
-  $ ls
+  $ ls -A
+  .hg
   data.py
   index.html
   readme.txt
   $ hg debugsparse --clear-rules
-  $ ls
+  $ ls -A
+  .hg
   base.sparse
   data.py
   index.html
@@ -56,18 +60,21 @@
 Clearing rules should not alter profiles
 
   $ hg debugsparse --enable-profile webpage.sparse
-  $ ls
+  $ ls -A
+  .hg
   base.sparse
   index.html
   webpage.sparse
   $ hg debugsparse --include *.py
-  $ ls
+  $ ls -A
+  .hg
   base.sparse
   data.py
   index.html
   webpage.sparse
   $ hg debugsparse --clear-rules
-  $ ls
+  $ ls -A
+  .hg
   base.sparse
   index.html
   webpage.sparse
--- a/tests/test-sparse-clone.t	Fri Apr 10 19:53:36 2020 +0200
+++ b/tests/test-sparse-clone.t	Fri Apr 10 19:58:34 2020 +0200
@@ -34,7 +34,8 @@
   warning: sparse profile 'webpage.sparse' not found in rev 000000000000 - ignoring it
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ cd clone1
-  $ ls
+  $ ls -A
+  .hg
   index.html
   $ cd ..
 
@@ -44,7 +45,8 @@
   updating to branch default
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ cd clone2
-  $ ls
+  $ ls -A
+  .hg
   backend.sparse
   webpage.sparse
   $ cd ..
@@ -55,7 +57,8 @@
   updating to branch default
   4 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ cd clone3
-  $ ls
+  $ ls -A
+  .hg
   backend.sparse
   index.html
   readme.txt
@@ -67,6 +70,7 @@
   $ hg clone -q --enable-profile webpage.sparse ssh://user@dummy/myrepo clone4
   warning: sparse profile 'webpage.sparse' not found in rev 000000000000 - ignoring it
   $ cd clone4
-  $ ls
+  $ ls -A
+  .hg
   index.html
   $ cd ..
--- a/tests/test-sparse-import.t	Fri Apr 10 19:53:36 2020 +0200
+++ b/tests/test-sparse-import.t	Fri Apr 10 19:58:34 2020 +0200
@@ -32,7 +32,8 @@
   > *.py
   > EOF
   $ hg debugsparse --import-rules $TESTTMP/rules_to_import
-  $ ls
+  $ ls -A
+  .hg
   data.py
 
   $ hg debugsparse --reset
@@ -44,7 +45,8 @@
   > *.py
   > EOF
   $ hg debugsparse --import-rules $TESTTMP/rules_to_import
-  $ ls
+  $ ls -A
+  .hg
   base.sparse
   data.py
   webpage.sparse
@@ -65,7 +67,8 @@
   > *.py
   > EOF
   $ hg debugsparse --import-rules $TESTTMP/rules_to_import
-  $ ls
+  $ ls -A
+  .hg
   base.sparse
   index.html
   readme.txt
--- a/tests/test-sparse-merges.t	Fri Apr 10 19:53:36 2020 +0200
+++ b/tests/test-sparse-merges.t	Fri Apr 10 19:58:34 2020 +0200
@@ -28,7 +28,8 @@
 
 Verify bar was merged temporarily
 
-  $ ls
+  $ ls -A
+  .hg
   bar
   foo
   $ hg status
@@ -39,7 +40,8 @@
   $ hg commit -m "merged"
   cleaned up 1 temporarily added file(s) from the sparse checkout
   $ hg status
-  $ ls
+  $ ls -A
+  .hg
   foo
 
   $ hg cat -r . bar
@@ -108,7 +110,9 @@
   o  0:53f3774ed939 added .hgignore
   
   $ hg debugsparse --exclude "d"
-  $ ls
+  $ ls -A
+  .hg
+  .hgignore
   a
 
   $ hg merge
@@ -168,7 +172,9 @@
   o  0:53f3774ed939 added .hgignore
   
   $ hg debugsparse --exclude "a"
-  $ ls
+  $ ls -A
+  .hg
+  .hgignore
   d
 
   $ hg merge
--- a/tests/test-sparse-profiles.t	Fri Apr 10 19:53:36 2020 +0200
+++ b/tests/test-sparse-profiles.t	Fri Apr 10 19:58:34 2020 +0200
@@ -42,7 +42,8 @@
 Verify enabling a single profile works
 
   $ hg debugsparse --enable-profile webpage.sparse
-  $ ls
+  $ ls -A
+  .hg
   backend.sparse
   index.html
   webpage.sparse
@@ -50,7 +51,8 @@
 Verify enabling two profiles works
 
   $ hg debugsparse --enable-profile backend.sparse
-  $ ls
+  $ ls -A
+  .hg
   backend.sparse
   data.py
   index.html
@@ -59,7 +61,8 @@
 Verify disabling a profile works
 
   $ hg debugsparse --disable-profile webpage.sparse
-  $ ls
+  $ ls -A
+  .hg
   backend.sparse
   data.py
   webpage.sparse
@@ -81,20 +84,23 @@
   $ echo foo >> data.py
 
   $ hg ci -m 'edit profile'
-  $ ls
+  $ ls -A
+  .hg
   backend.sparse
   data.py
   readme.txt
   webpage.sparse
 
   $ hg up -q 0
-  $ ls
+  $ ls -A
+  .hg
   backend.sparse
   data.py
   webpage.sparse
 
   $ hg up -q 1
-  $ ls
+  $ ls -A
+  .hg
   backend.sparse
   data.py
   readme.txt
@@ -111,7 +117,8 @@
   $ echo bar >> data.py
 
   $ hg ci -qAm "edit profile other"
-  $ ls
+  $ ls -A
+  .hg
   backend.sparse
   index.html
   webpage.sparse
@@ -129,7 +136,8 @@
   [1]
 
   $ rm *.orig
-  $ ls
+  $ ls -A
+  .hg
   backend.sparse
   data.py
   index.html
@@ -154,7 +162,8 @@
   (no more unresolved files)
 
   $ hg ci -qAm "merge profiles"
-  $ ls
+  $ ls -A
+  .hg
   backend.sparse
   index.html
   readme.txt
@@ -168,7 +177,8 @@
 Verify stripping refreshes dirstate
 
   $ hg strip -q -r .
-  $ ls
+  $ ls -A
+  .hg
   backend.sparse
   index.html
   webpage.sparse
@@ -176,7 +186,8 @@
 Verify rebase conflicts pulls in the conflicting changes
 
   $ hg up -q 1
-  $ ls
+  $ ls -A
+  .hg
   backend.sparse
   data.py
   readme.txt
@@ -192,7 +203,8 @@
   unresolved conflicts (see hg resolve, then hg rebase --continue)
   [1]
   $ rm *.orig
-  $ ls
+  $ ls -A
+  .hg
   backend.sparse
   data.py
   index.html
@@ -217,7 +229,8 @@
   continue: hg rebase --continue
 
   $ hg rebase -q --continue
-  $ ls
+  $ ls -A
+  .hg
   backend.sparse
   index.html
   readme.txt
@@ -237,13 +250,15 @@
   $ hg commit -m "delete profiles"
   $ hg up -q ".^"
   $ hg debugsparse --enable-profile backend.sparse
-  $ ls
+  $ ls -A
+  .hg
   index.html
   readme.txt
   $ hg up tip | grep warning
   warning: sparse profile 'backend.sparse' not found in rev bfcb76de99cc - ignoring it
   [1]
-  $ ls
+  $ ls -A
+  .hg
   data.py
   index.html
   readme.txt
--- a/tests/test-sparse-requirement.t	Fri Apr 10 19:53:36 2020 +0200
+++ b/tests/test-sparse-requirement.t	Fri Apr 10 19:58:34 2020 +0200
@@ -26,7 +26,8 @@
   testonly-simplestore (reposimplestore !)
 
   $ hg debugsparse --config extensions.sparse= --enable-profile frontend.sparse
-  $ ls
+  $ ls -A
+  .hg
   a.html
   b.html
 
--- a/tests/test-sparse.t	Fri Apr 10 19:53:36 2020 +0200
+++ b/tests/test-sparse.t	Fri Apr 10 19:58:34 2020 +0200
@@ -22,7 +22,8 @@
 
   $ hg up -q 0
   $ hg debugsparse --include 'hide'
-  $ ls
+  $ ls -A
+  .hg
   hide
 
 Absolute paths outside the repo should just be rejected
@@ -77,7 +78,8 @@
 
   $ echo z > hide
   $ hg ci -Aqm 'edit hide'
-  $ ls
+  $ ls -A
+  .hg
   hide
   $ hg manifest
   hide
@@ -86,7 +88,8 @@
 Verify --reset brings files back
 
   $ hg debugsparse --reset
-  $ ls
+  $ ls -A
+  .hg
   hide
   show
   $ cat hide
@@ -106,11 +109,13 @@
 Verify update only writes included files
 
   $ hg up -q 0
-  $ ls
+  $ ls -A
+  .hg
   show
 
   $ hg up -q 1
-  $ ls
+  $ ls -A
+  .hg
   show
   show2
 
@@ -144,7 +149,8 @@
 
   $ hg debugsparse --delete -f 'show*'
   pending changes to 'hide'
-  $ ls
+  $ ls -A
+  .hg
   hide
   hide2
   hide3
@@ -166,7 +172,8 @@
 
   $ hg debugsparse --exclude -f 'hide*'
   pending changes to 'hide'
-  $ ls
+  $ ls -A
+  .hg
   hide
   hide3
   show
@@ -177,7 +184,8 @@
   $ hg up -qC .
 TODO: add an option to purge to also purge files outside the sparse config?
   $ hg purge --all --config extensions.purge=
-  $ ls
+  $ ls -A
+  .hg
   hide
   hide3
   show
@@ -216,7 +224,8 @@
   rebase aborted
   $ rm hide.orig
 
-  $ ls
+  $ ls -A
+  .hg
   show
   show2
 
--- a/tests/test-subrepo-missing.t	Fri Apr 10 19:53:36 2020 +0200
+++ b/tests/test-subrepo-missing.t	Fri Apr 10 19:58:34 2020 +0200
@@ -50,7 +50,8 @@
   $ hg st
   warning: subrepo spec file '.hgsub' not found
   ! .hgsub
-  $ ls subrepo
+  $ ls -A subrepo
+  .hg
   a
 
 delete .hgsubstate and update
@@ -65,7 +66,8 @@
   use (c)hanged version or leave (d)eleted? c
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg st
-  $ ls subrepo
+  $ ls -A subrepo
+  .hg
   a
 
 Enable obsolete
@@ -134,7 +136,10 @@
   1: repository $TESTTMP/repo/subrepo not found
   3: repository $TESTTMP/repo/subrepo not found
   4: repository $TESTTMP/repo/subrepo not found
-  $ ls
+  $ ls -A
+  .hg
+  .hgsub
+  .hgsubstate
   b
   $ mv b subrepo
 
--- a/tests/test-subrepo.t	Fri Apr 10 19:53:36 2020 +0200
+++ b/tests/test-subrepo.t	Fri Apr 10 19:58:34 2020 +0200
@@ -498,7 +498,10 @@
   abort: subrepos not enabled
   (see 'hg help config.subrepos' for details)
   [255]
-  $ ls tc2
+  $ ls -A tc2
+  .hg
+  .hgsub
+  .hgsubstate
   a
 
   $ hg clone t tc3 --config subrepos.allowed=false
@@ -506,7 +509,10 @@
   abort: subrepos not enabled
   (see 'hg help config.subrepos' for details)
   [255]
-  $ ls tc3
+  $ ls -A tc3
+  .hg
+  .hgsub
+  .hgsubstate
   a
 
 And again with just the hg type disabled
@@ -516,7 +522,10 @@
   abort: hg subrepos not allowed
   (see 'hg help config.subrepos' for details)
   [255]
-  $ ls tc4
+  $ ls -A tc4
+  .hg
+  .hgsub
+  .hgsubstate
   a
 
   $ hg clone t tc5 --config subrepos.hg:allowed=false
@@ -524,7 +533,10 @@
   abort: hg subrepos not allowed
   (see 'hg help config.subrepos' for details)
   [255]
-  $ ls tc5
+  $ ls -A tc5
+  .hg
+  .hgsub
+  .hgsubstate
   a
 
 push
--- a/tests/test-uncommit.t	Fri Apr 10 19:53:36 2020 +0200
+++ b/tests/test-uncommit.t	Fri Apr 10 19:58:34 2020 +0200
@@ -60,7 +60,8 @@
   $ touch files
   $ hg add files
   $ for i in a ab abc abcd abcde; do echo $i > files; echo $i > file-$i; hg add file-$i; hg commit -m "added file-$i"; done
-  $ ls
+  $ ls -A
+  .hg
   file-a
   file-ab
   file-abc
--- a/tests/test-update-reverse.t	Fri Apr 10 19:53:36 2020 +0200
+++ b/tests/test-update-reverse.t	Fri Apr 10 19:58:34 2020 +0200
@@ -12,7 +12,8 @@
 
 'main' should be gone:
 
-  $ ls
+  $ ls -A
+  .hg
   a
 
   $ touch side1
@@ -59,7 +60,8 @@
   date:        Thu Jan 01 00:00:00 1970 +0000
   summary:     Added main
   
-  $ ls
+  $ ls -A
+  .hg
   a
   side1
   side2
@@ -76,7 +78,8 @@
   getting main
   1 files updated, 0 files merged, 2 files removed, 0 files unresolved
 
-  $ ls
+  $ ls -A
+  .hg
   a
   main