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

Yury G. Kudryashov urkud+nix at ya.ru
Fri Mar 11 12:42:52 CET 2011


Ludovic Courtès wrote:

> Hi Nicolas,
> 
> Nicolas Pierron <nicolas.b.pierron at gmail.com> writes:
> 
>> 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/*';
> 
> I’m thinking of changing ‘nix-prefect-git’ like this:
I don't like that
# nix-prefetch-git some_url
and
fetchgit {
 url = some_url
}

result in different directories. I propose to rename nix-prefetch-git to 
hydra-fetch-git, and write nix-prefetch-git that does *exactly the same 
thing* as fetchgit does.




More information about the nix-dev mailing list