[Nix-dev] Re: Hydra, nix-prefetch-git, and TopGit

Nicolas Pierron nicolas.b.pierron at gmail.com
Thu Mar 10 10:33:51 CET 2011


2011/3/9 Ludovic Courtès <ludo at gnu.org>:
> 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/*';

By the way, I would be highly interested by such feature in Hydra
because some git projects have branches which are waiting for merge
approval, and our current autonomous build system does not watch for
such branches.

-- 
Nicolas Pierron
http://www.linkedin.com/in/nicolasbpierron - http://nbp.name/



More information about the nix-dev mailing list