1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 05:00:16 +00:00

nix-prefetch-{bzr,hg,svn}: print fetched revision

This commit is contained in:
Benno Fünfstück 2014-06-11 14:42:39 +02:00
parent be25ce8f58
commit 063efadd69
3 changed files with 4 additions and 0 deletions

View file

@ -52,6 +52,8 @@ if test -z "$finalPath"; then
# Perform the checkout.
bzr -Ossl.cert_reqs=none export $revarg --format=dir "$tmpFile" "$url"
echo "bzr revision is $(bzr revno $revarg "$url")"
# Compute the hash.
hash=$(nix-hash --type $hashType $hashFormat $tmpFile)
if ! test -n "$QUIET"; then echo "hash is $hash" >&2; fi

View file

@ -51,6 +51,7 @@ if test -z "$finalPath"; then
hg archive -q -y -r "$rev" --cwd $tmpClone $tmpArchive
rm -f $tmpArchive/.hg_archival.txt
echo "hg revision is $(cd $tmpClone; hg id -r "$rev" -i)"
# Compute the hash.
hash=$(nix-hash --type $hashType $hashFormat $tmpArchive)

View file

@ -56,6 +56,7 @@ if test -z "$finalPath"; then
fi
echo p | svn "$command" --quiet -r "$rev" "$url" "$tmpFile" >&2
echo "svn revision is $(svn info -r "$rev" "$url" | grep "Revision: " | cut -d' ' -f2)"
# Compute the hash.
hash=$(nix-hash --type $hashType $hashFormat $tmpFile)