Author: rob
Date: Tue Sep 7 14:56:53 2010
New Revision: 23676
URL: https://svn.nixos.org/websvn/nix/?rev=23676&sc=1
Log:
hydra: do not use refs/heads while checking for latest commit in branch
Modified:
hydra/trunk/src/lib/Hydra/Helper/AddBuilds.pm
Modified: hydra/trunk/src/lib/Hydra/Helper/AddBuilds.pm
==============================================================================
--- hydra/trunk/src/lib/Hydra/Helper/AddBuilds.pm Tue Sep 7 14:45:34
2010 (r23675)
+++ hydra/trunk/src/lib/Hydra/Helper/AddBuilds.pm Tue Sep 7 14:56:53
2010 (r23676)
@@ -318,10 +318,12 @@
die "Error pulling latest change git repo at `$uri':\n$stderr" unless $res;
(my $res1, $stdout, $stderr) = captureStdoutStderr(600,
- ("git", "ls-remote", $clonePath, "refs/heads/".$branch));
- die "Cannot get head revision of Git branch '$branch' at `$uri':\n$stderr"
unless $res1;
+ ("git", "ls-remote", $clonePath, $branch));
+
+ die "Cannot get head revision of Git branch '$branch' at `$uri':\n$stderr"
unless $res1 ;
- (my $revision, my $ref) = split ' ', $stdout;
+ my ($first) = split /\n/, $stdout;
+ (my $revision, my $ref) = split ' ', $first;
die unless $revision =~ /^[0-9a-fA-F]+$/;
# Some simple caching: don't check a uri/branch more than once every hour,
but prefer exact match on uri/branch/revision.
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits