diff options
author | Edward Tjörnhammar <ed@cflags.cc> | 2015-05-04 18:20:32 +0200 |
---|---|---|
committer | Edward Tjörnhammar <ed@cflags.cc> | 2015-05-04 18:20:32 +0200 |
commit | 655eed7a9309d909914d32867cecf6bada1dc3db (patch) | |
tree | 017e33889eeb5c17570fbeb46f7fd3827b1b1dc7 /pkgs/build-support/fetchhg/nix-prefetch-hg | |
parent | f9e31617a39b21e88726496c22f84851ba42864b (diff) | |
parent | 366da9e70f46bd42a62bdcd9a0aa7b891c54760d (diff) | |
download | nixlib-655eed7a9309d909914d32867cecf6bada1dc3db.tar nixlib-655eed7a9309d909914d32867cecf6bada1dc3db.tar.gz nixlib-655eed7a9309d909914d32867cecf6bada1dc3db.tar.bz2 nixlib-655eed7a9309d909914d32867cecf6bada1dc3db.tar.lz nixlib-655eed7a9309d909914d32867cecf6bada1dc3db.tar.xz nixlib-655eed7a9309d909914d32867cecf6bada1dc3db.tar.zst nixlib-655eed7a9309d909914d32867cecf6bada1dc3db.zip |
Merge pull request #7235 from risicle/fetchhgsubrepo
fetchhg: add option to fetch hg subrepos
Diffstat (limited to 'pkgs/build-support/fetchhg/nix-prefetch-hg')
-rwxr-xr-x | pkgs/build-support/fetchhg/nix-prefetch-hg | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pkgs/build-support/fetchhg/nix-prefetch-hg b/pkgs/build-support/fetchhg/nix-prefetch-hg index a8916176f8af..a877b217125f 100755 --- a/pkgs/build-support/fetchhg/nix-prefetch-hg +++ b/pkgs/build-support/fetchhg/nix-prefetch-hg @@ -17,6 +17,12 @@ if test -z "$url"; then exit 1 fi +if test "$fetchSubrepos" == 1; then + subrepoClause=S +else + subrepoClause= +fi + test -n "$rev" || rev="tip" @@ -47,7 +53,7 @@ if test -z "$finalPath"; then else tmpClone=$url fi - hg archive -q -y -r "$rev" --cwd $tmpClone $tmpArchive + hg archive -q$subrepoClause -y -r "$rev" --cwd $tmpClone $tmpArchive rm -f $tmpArchive/.hg_archival.txt echo "hg revision is $(cd $tmpClone; hg id -r "$rev" -i)" |