From 6ca95016323b7bd2123dbf57238c29aace8c8f63 Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Tue, 4 Oct 2011 22:29:36 +0000 Subject: [PATCH] make default branch default, remove quotes --- src/lib/Hydra/Helper/AddBuilds.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/Hydra/Helper/AddBuilds.pm b/src/lib/Hydra/Helper/AddBuilds.pm index 2c35f9e2..23cfbbe8 100644 --- a/src/lib/Hydra/Helper/AddBuilds.pm +++ b/src/lib/Hydra/Helper/AddBuilds.pm @@ -469,6 +469,7 @@ sub fetchInputHg { my ($db, $project, $jobset, $name, $type, $value) = @_; (my $uri, my $id) = split ' ', $value; + $id = defined $id ? $id : "default"; # init local hg clone @@ -489,7 +490,7 @@ 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} {branch}")); die "Error getting branch and revision of $id from `$uri':\n$stderr" unless $res1; my ($revision, $branch) = split ' ', $stdout;