From 0fdcd3176b0ccd92542e77a477f6b703c7b46c02 Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Tue, 1 May 2012 09:15:52 +0200 Subject: [PATCH] Add numbered revision id of mercurial as revCount. --- src/lib/Hydra/Helper/AddBuilds.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/Hydra/Helper/AddBuilds.pm b/src/lib/Hydra/Helper/AddBuilds.pm index c2effa77..920e08e5 100644 --- a/src/lib/Hydra/Helper/AddBuilds.pm +++ b/src/lib/Hydra/Helper/AddBuilds.pm @@ -542,10 +542,10 @@ sub fetchInputHg { ("hg", "pull")); die "Error pulling latest change mercurial repo at `$uri':\n$stderr" unless $res; - (my $res1, $stdout, $stderr) = captureStdoutStderr(600,("hg", "log", "-r", $id, "--template", "{node|short} {branch}")); + (my $res1, $stdout, $stderr) = captureStdoutStderr(600,("hg", "log", "-r", $id, "--template", "{node|short} {rev} {branch}")); die "Error getting branch and revision of $id from `$uri':\n$stderr" unless $res1; - my ($revision, $branch) = split ' ', $stdout; + my ($revision, $revCount, $branch) = split ' ', $stdout; my $storePath; my $sha256; @@ -583,6 +583,7 @@ sub fetchInputHg { , storePath => $storePath , sha256hash => $sha256 , revision => $revision + , revCount => int($revCount) }; }