Author: rob
Date: Tue Oct 4 20:03:43 2011
New Revision: 29642
URL: https://ssl.nixos.org/websvn/nix/?rev=29642&sc=1
Log:
add support for mercurial tags/revs
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 Oct 4 16:15:22
2011 (r29641)
+++ hydra/trunk/src/lib/Hydra/Helper/AddBuilds.pm Tue Oct 4 20:03:43
2011 (r29642)
@@ -468,8 +468,7 @@
sub fetchInputHg {
my ($db, $project, $jobset, $name, $type, $value) = @_;
- (my $uri, my $branch) = split ' ', $value;
- $branch = defined $branch ? $branch : "default";
+ (my $uri, my $id) = split ' ', $value;
# init local hg clone
@@ -490,13 +489,10 @@
("hg", "pull"));
die "Error pulling latest change mercurial repo at `$uri':\n$stderr"
unless $res;
- (my $res1, $stdout, $stderr) = captureStdoutStderr(600,
- ("hg", "heads", $branch));
- die "Error getting head of $branch from `$uri':\n$stderr" unless $res1;
-
- $stdout =~ m/[0-9]+:([0-9A-Fa-f]{12})/;
- my $revision = $1;
- die "Could not determine head revision of branch $branch" unless $revision;
+ (my $res1, $stdout, $stderr) = captureStdoutStderr(600,("hg", "log", "-r",
$id, "--template", "'{node|short} {branch}'"));
+ die "Error getting branch and revision of $id from `$uri':\n$stderr"
unless $res1;
+
+ my ($revision, $branch) = split ' ', $stdout;
my $storePath;
my $sha256;
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits