Hi Nicolas,
Nicolas Pierron <[email protected]> writes:
> 2011/3/9 Ludovic Courtès <[email protected]>:
>> I thought we could make ‘nix-prefetch-git’ (the script Hydra uses to
>> clone repositories) somehow fetch the TopGit branches automatically when
>> it sees ‘refs/top-bases’, but I don’t know exactly how to make it so,
>> nor whether it would even work.
>
> nix-prefect-git only download&checkout one commit at a specific
> refs/sha1 when this is possible. What you seems to want is to
> automatically build all branches matching refs/top-bases/* with Hydra.
> What you can do is use "git ls-remote" to list all branches you are
> interested in, and then add job in hydra for each of the references
> returned.
>
> git init;
> git remote add origin $url;
> git ls-remote origin 'refs/top-bases/*';
I’m thinking of changing ‘nix-prefect-git’ like this:
diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git
index 63d756c..8ba7fb7 100755
--- a/pkgs/build-support/fetchgit/nix-prefetch-git
+++ b/pkgs/build-support/fetchgit/nix-prefetch-git
@@ -120,6 +120,11 @@ clone(){
# Checkout linked sources.
init_submodules;
+ if [ -f .topdeps ]; then
+ # Populate the TopGit branches.
+ tg remote --populate origin
+ fi
+
cd $top;
}
What do you think?
TopGit would have to be installed on Hydra.
Thanks,
Ludo’.
_______________________________________________
nix-dev mailing list
[email protected]
https://mail.cs.uu.nl/mailman/listinfo/nix-dev