aboutsummaryrefslogtreecommitdiff
path: root/tests/fetchMercurial.sh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-11-21 19:12:47 +0100
committerEelco Dolstra <edolstra@gmail.com>2017-11-21 19:34:46 +0100
commitd7da6c9ea9459a2fa17c3e409120c5cdfde6afdc (patch)
tree26676469ead12a6581c2301d395283129dd64f0d /tests/fetchMercurial.sh
parent6cdaa858d03b9c24f54f8157026cebaa02d9ac8a (diff)
fetchGit/fetchMercurial: Fix directory inclusion check
E.g. the existence of .gitignore would cause .git to be included.
Diffstat (limited to 'tests/fetchMercurial.sh')
-rw-r--r--tests/fetchMercurial.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/fetchMercurial.sh b/tests/fetchMercurial.sh
index 6cfc0a708..271350ecd 100644
--- a/tests/fetchMercurial.sh
+++ b/tests/fetchMercurial.sh
@@ -16,7 +16,8 @@ echo '[ui]' >> $repo/.hg/hgrc
echo 'username = Foobar <foobar@example.org>' >> $repo/.hg/hgrc
echo utrecht > $repo/hello
-hg add --cwd $repo hello
+touch $repo/.hgignore
+hg add --cwd $repo hello .hgignore
hg commit --cwd $repo -m 'Bla1'
rev1=$(hg log --cwd $repo -r tip --template '{node}')
@@ -69,6 +70,7 @@ path2=$(nix eval --raw "(builtins.fetchMercurial $repo).outPath")
[ ! -e $path2/hello ]
[ ! -e $path2/bar ]
[ ! -e $path2/dir2/bar ]
+[ ! -e $path2/.hg ]
[[ $(cat $path2/dir1/foo) = foo ]]
[[ $(nix eval --raw "(builtins.fetchMercurial $repo).rev") = 0000000000000000000000000000000000000000 ]]