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