Merge pull request #2899 from bennofs/nix-prefetch-revision

nix-prefetch-*: print fetched revision

+5 -1
+2
pkgs/build-support/fetchbzr/nix-prefetch-bzr
··· 52 # Perform the checkout. 53 bzr -Ossl.cert_reqs=none export $revarg --format=dir "$tmpFile" "$url" 54 55 # Compute the hash. 56 hash=$(nix-hash --type $hashType $hashFormat $tmpFile) 57 if ! test -n "$QUIET"; then echo "hash is $hash" >&2; fi
··· 52 # Perform the checkout. 53 bzr -Ossl.cert_reqs=none export $revarg --format=dir "$tmpFile" "$url" 54 55 + echo "bzr revision is $(bzr revno $revarg "$url")" 56 + 57 # Compute the hash. 58 hash=$(nix-hash --type $hashType $hashFormat $tmpFile) 59 if ! test -n "$QUIET"; then echo "hash is $hash" >&2; fi
+1 -1
pkgs/build-support/fetchgit/nix-prefetch-git
··· 217 fi;; 218 esac 219 220 - echo "git revision is $(cd $dir && git rev-parse $rev)" 221 222 # Allow doing additional processing before .git removal 223 eval "$NIX_PREFETCH_GIT_CHECKOUT_HOOK"
··· 217 fi;; 218 esac 219 220 + echo "git revision is $(cd $dir && (git rev-parse $rev 2> /dev/null || git rev-parse refs/heads/fetchgit) | tail -n1)" 221 222 # Allow doing additional processing before .git removal 223 eval "$NIX_PREFETCH_GIT_CHECKOUT_HOOK"
+1
pkgs/build-support/fetchhg/nix-prefetch-hg
··· 51 hg archive -q -y -r "$rev" --cwd $tmpClone $tmpArchive 52 rm -f $tmpArchive/.hg_archival.txt 53 54 55 # Compute the hash. 56 hash=$(nix-hash --type $hashType $hashFormat $tmpArchive)
··· 51 hg archive -q -y -r "$rev" --cwd $tmpClone $tmpArchive 52 rm -f $tmpArchive/.hg_archival.txt 53 54 + echo "hg revision is $(cd $tmpClone; hg id -r "$rev" -i)" 55 56 # Compute the hash. 57 hash=$(nix-hash --type $hashType $hashFormat $tmpArchive)
+1
pkgs/build-support/fetchsvn/nix-prefetch-svn
··· 56 fi 57 58 echo p | svn "$command" --quiet -r "$rev" "$url" "$tmpFile" >&2 59 60 # Compute the hash. 61 hash=$(nix-hash --type $hashType $hashFormat $tmpFile)
··· 56 fi 57 58 echo p | svn "$command" --quiet -r "$rev" "$url" "$tmpFile" >&2 59 + echo "svn revision is $(svn info -r "$rev" "$url" | grep "Revision: " | cut -d' ' -f2)" 60 61 # Compute the hash. 62 hash=$(nix-hash --type $hashType $hashFormat $tmpFile)