forked from lix-project/hydra
add support for mercurial tags/revs
This commit is contained in:
parent
96b4db1e99
commit
9374cfcb34
|
@ -468,8 +468,7 @@ sub fetchInputBazaar {
|
||||||
sub fetchInputHg {
|
sub fetchInputHg {
|
||||||
my ($db, $project, $jobset, $name, $type, $value) = @_;
|
my ($db, $project, $jobset, $name, $type, $value) = @_;
|
||||||
|
|
||||||
(my $uri, my $branch) = split ' ', $value;
|
(my $uri, my $id) = split ' ', $value;
|
||||||
$branch = defined $branch ? $branch : "default";
|
|
||||||
|
|
||||||
# init local hg clone
|
# init local hg clone
|
||||||
|
|
||||||
|
@ -490,13 +489,10 @@ sub fetchInputHg {
|
||||||
("hg", "pull"));
|
("hg", "pull"));
|
||||||
die "Error pulling latest change mercurial repo at `$uri':\n$stderr" unless $res;
|
die "Error pulling latest change mercurial repo at `$uri':\n$stderr" unless $res;
|
||||||
|
|
||||||
(my $res1, $stdout, $stderr) = captureStdoutStderr(600,
|
(my $res1, $stdout, $stderr) = captureStdoutStderr(600,("hg", "log", "-r", $id, "--template", "'{node|short} {branch}'"));
|
||||||
("hg", "heads", $branch));
|
die "Error getting branch and revision of $id from `$uri':\n$stderr" unless $res1;
|
||||||
die "Error getting head of $branch from `$uri':\n$stderr" unless $res1;
|
|
||||||
|
|
||||||
$stdout =~ m/[0-9]+:([0-9A-Fa-f]{12})/;
|
my ($revision, $branch) = split ' ', $stdout;
|
||||||
my $revision = $1;
|
|
||||||
die "Could not determine head revision of branch $branch" unless $revision;
|
|
||||||
|
|
||||||
my $storePath;
|
my $storePath;
|
||||||
my $sha256;
|
my $sha256;
|
||||||
|
|
Loading…
Reference in a new issue