mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 23:36:16 +02:00
Test fetchMercurial with path containing a .
segment
This commit is contained in:
parent
d6b7529579
commit
38125a47ab
1 changed files with 9 additions and 1 deletions
|
@ -7,7 +7,9 @@ fi
|
||||||
|
|
||||||
clearStore
|
clearStore
|
||||||
|
|
||||||
repo=$TEST_ROOT/hg
|
# Intentionally not in a canonical form
|
||||||
|
# See https://github.com/NixOS/nix/issues/6195
|
||||||
|
repo=$TEST_ROOT/./hg
|
||||||
|
|
||||||
rm -rf $repo ${repo}-tmp $TEST_HOME/.cache/nix
|
rm -rf $repo ${repo}-tmp $TEST_HOME/.cache/nix
|
||||||
|
|
||||||
|
@ -28,6 +30,12 @@ echo world > $repo/hello
|
||||||
hg commit --cwd $repo -m 'Bla2'
|
hg commit --cwd $repo -m 'Bla2'
|
||||||
rev2=$(hg log --cwd $repo -r tip --template '{node}')
|
rev2=$(hg log --cwd $repo -r tip --template '{node}')
|
||||||
|
|
||||||
|
# Fetch an unclean branch.
|
||||||
|
echo unclean > $repo/hello
|
||||||
|
path=$(nix eval --impure --raw --expr "(builtins.fetchMercurial file://$repo).outPath")
|
||||||
|
[[ $(cat $path/hello) = unclean ]]
|
||||||
|
hg revert --cwd $repo --all
|
||||||
|
|
||||||
# Fetch the default branch.
|
# Fetch the default branch.
|
||||||
path=$(nix eval --impure --raw --expr "(builtins.fetchMercurial file://$repo).outPath")
|
path=$(nix eval --impure --raw --expr "(builtins.fetchMercurial file://$repo).outPath")
|
||||||
[[ $(cat $path/hello) = world ]]
|
[[ $(cat $path/hello) = world ]]
|
||||||
|
|
Loading…
Reference in a new issue