about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorAustin Seipp <aseipp@pobox.com>2014-06-11 09:26:35 -0500
committerAustin Seipp <aseipp@pobox.com>2014-06-11 09:26:35 -0500
commit5a44c0a7ce0f324cd53831022047764580005dca (patch)
tree23c9ec421f53630b53c7c97d1cc2cb001d79a4b4 /pkgs
parent9b899d860065763454a3fcef79dbe15d06f3842b (diff)
parent063efadd69ba56392be1bdd31872bed27becc92d (diff)
downloadnixlib-5a44c0a7ce0f324cd53831022047764580005dca.tar
nixlib-5a44c0a7ce0f324cd53831022047764580005dca.tar.gz
nixlib-5a44c0a7ce0f324cd53831022047764580005dca.tar.bz2
nixlib-5a44c0a7ce0f324cd53831022047764580005dca.tar.lz
nixlib-5a44c0a7ce0f324cd53831022047764580005dca.tar.xz
nixlib-5a44c0a7ce0f324cd53831022047764580005dca.tar.zst
nixlib-5a44c0a7ce0f324cd53831022047764580005dca.zip
Merge pull request #2899 from bennofs/nix-prefetch-revision
nix-prefetch-*: print fetched revision
Diffstat (limited to 'pkgs')
-rwxr-xr-xpkgs/build-support/fetchbzr/nix-prefetch-bzr2
-rwxr-xr-xpkgs/build-support/fetchgit/nix-prefetch-git2
-rwxr-xr-xpkgs/build-support/fetchhg/nix-prefetch-hg1
-rwxr-xr-xpkgs/build-support/fetchsvn/nix-prefetch-svn1
4 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/build-support/fetchbzr/nix-prefetch-bzr b/pkgs/build-support/fetchbzr/nix-prefetch-bzr
index 9ff86c20ae3f..2f46819323f2 100755
--- a/pkgs/build-support/fetchbzr/nix-prefetch-bzr
+++ b/pkgs/build-support/fetchbzr/nix-prefetch-bzr
@@ -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
diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git
index d4819574acb8..3574f3b7539b 100755
--- a/pkgs/build-support/fetchgit/nix-prefetch-git
+++ b/pkgs/build-support/fetchgit/nix-prefetch-git
@@ -217,7 +217,7 @@ clone_user_rev() {
             fi;;
     esac
 
-    echo "git revision is $(cd $dir && git rev-parse $rev)"
+    echo "git revision is $(cd $dir && (git rev-parse $rev 2> /dev/null || git rev-parse refs/heads/fetchgit) | tail -n1)"
 
     # Allow doing additional processing before .git removal
     eval "$NIX_PREFETCH_GIT_CHECKOUT_HOOK"
diff --git a/pkgs/build-support/fetchhg/nix-prefetch-hg b/pkgs/build-support/fetchhg/nix-prefetch-hg
index f1f648f4aeb8..075dbc9c367b 100755
--- a/pkgs/build-support/fetchhg/nix-prefetch-hg
+++ b/pkgs/build-support/fetchhg/nix-prefetch-hg
@@ -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)
diff --git a/pkgs/build-support/fetchsvn/nix-prefetch-svn b/pkgs/build-support/fetchsvn/nix-prefetch-svn
index 2858a0b01ab1..a2ee3ac6052f 100755
--- a/pkgs/build-support/fetchsvn/nix-prefetch-svn
+++ b/pkgs/build-support/fetchsvn/nix-prefetch-svn
@@ -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)