Die TABs die

[?]
Dec 4, 2011, 9:05 PM
EDRUQ4UK643SUCYMMTS2JS4N3BHARLKRDWRH3QAYWDMWRAMPNAOQC

Dependencies

  • [2] 6ZSLRO7M fetchInputGit: Populate TopGit branches when on a topic branch.
  • [3] Y5DJHUBM Allow Subversion inputs to specify a revision number.
  • [4] V2MLUZRP Random indentation fix
  • [5] BMSQD2ZH Indentation
  • [6] ARD6Z67T Do incremental SVN checkouts
  • [7] 3XTHEUMP * Implemented the clone feature.
  • [8] BK24VA6Q * for git inputs, check latest revision of branch (defaults to master for now), if there is change, only use input if last checkout was > hour ago.
  • [9] OOQ2D3KC * Refactoring: move fetchInput out of hydra_scheduler into a separate
  • [10] CHQEG6WY Hydra/29: Added timeout to svn/git checkouts, job evaluation
  • [11] A22P7HCO hydra: at evaluation, check if path is already built, and mark as built in stead of adding to the queue.
  • [12] KQS7DSKJ * Clean up indentation.
  • [13] FM4O2L4M hydra: if evaluator sees cached build, also add the buildproducts
  • [14] JZE7DC2F Whitespace
  • [15] R3ON2RJ3 hydra: missing argument

Change contents

  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 50
    [7.120][7.120:143]()
    my ($outPath) = @_;
    [7.120]
    [7.143]
    my ($outPath) = @_;
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 176
    [3.145][3.145:477]()
    # First figure out the last-modified revision of the URI.
    my @cmd = (["svn", "ls", "-v", "--depth", "empty", $uri],
    "|", ["sed", 's/^ *\([0-9]*\).*/\1/']);
    die "Cannot get head revision of Subversion repository at `$uri':\n$stderr"
    unless IPC::Run::run(@cmd, \$stdout, \$stderr);
    $revision = $stdout; chomp $revision;
    [3.145]
    [3.477]
    # First figure out the last-modified revision of the URI.
    my @cmd = (["svn", "ls", "-v", "--depth", "empty", $uri],
    "|", ["sed", 's/^ *\([0-9]*\).*/\1/']);
    die "Cannot get head revision of Subversion repository at `$uri':\n$stderr"
    unless IPC::Run::run(@cmd, \$stdout, \$stderr);
    $revision = $stdout; chomp $revision;
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 197
    [6.192][6.192:381]()
    # No, do a checkout. The working copy is reused between
    # invocations to speed things up.
    mkpath(scmPath . "/svn");
    my $wcPath = scmPath . "/svn" . sha256_hex($uri) . "/svn-checkout";
    [6.192]
    [6.381]
    # No, do a checkout. The working copy is reused between
    # invocations to speed things up.
    mkpath(scmPath . "/svn");
    my $wcPath = scmPath . "/svn" . sha256_hex($uri) . "/svn-checkout";
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 207
    [6.561][6.561:1034]()
    if ($checkout) {
    $storePath = addToStore($wcPath, 1, "sha256");
    } else {
    # Hm, if the Nix Perl bindings supported filters in
    # addToStore(), then we wouldn't need to make a copy here.
    my $tmpDir = File::Temp->newdir("hydra-svn-export.XXXXXX", CLEANUP => 1, TMPDIR => 1) or die;
    (system "svn", "export", $wcPath, "$tmpDir/svn-export", "--quiet") == 0 or die "svn export failed";
    $storePath = addToStore("$tmpDir/svn-export", 1, "sha256");
    }
    [6.561]
    [7.8133]
    if ($checkout) {
    $storePath = addToStore($wcPath, 1, "sha256");
    } else {
    # Hm, if the Nix Perl bindings supported filters in
    # addToStore(), then we wouldn't need to make a copy here.
    my $tmpDir = File::Temp->newdir("hydra-svn-export.XXXXXX", CLEANUP => 1, TMPDIR => 1) or die;
    (system "svn", "export", $wcPath, "$tmpDir/svn-export", "--quiet") == 0 or die "svn export failed";
    $storePath = addToStore("$tmpDir/svn-export", 1, "sha256");
    }
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 354
    [2.25][2.25:237]()
    # This is a TopGit branch. Fetch all the topic branches so
    # that builders can run "tg patch" and similar.
    (my $res, $stdout, $stderr) = captureStdoutStderr(600,
    ("tg", "remote", "--populate", "origin"));
    [2.25]
    [2.237]
    # This is a TopGit branch. Fetch all the topic branches so
    # that builders can run "tg patch" and similar.
    (my $res, $stdout, $stderr) = captureStdoutStderr(600,
    ("tg", "remote", "--populate", "origin"));
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 359
    [2.238][2.238:323]()
    print STDERR "Warning: `tg remote --populate origin' failed:\n$stderr" unless $res;
    [2.238]
    [2.323]
    print STDERR "Warning: `tg remote --populate origin' failed:\n$stderr" unless $res;
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 658
    [4.22][4.22:116]()
    die unless $@ eq "timeout\n"; # propagate unexpected errors
    return (undef, undef, undef);
    [4.22]
    [4.116]
    die unless $@ eq "timeout\n"; # propagate unexpected errors
    return (undef, undef, undef);
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 661
    [4.129][4.129:163]()
    return ($res, $stdout, $stderr);
    [4.129]
    [4.163]
    return ($res, $stdout, $stderr);
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 714
    [7.169][5.230:508]()
    open LIST, "$outPath/nix-support/hydra-build-products" or die;
    while (<LIST>) {
    /^([\w\-]+)\s+([\w\-]+)\s+(\S+)(\s+(\S+))?$/ or next;
    my $type = $1;
    my $subtype = $2 eq "none" ? "" : $2;
    my $path = $3;
    my $defaultPath = $5;
    next unless -e $path;
    [7.169]
    [7.567]
    open LIST, "$outPath/nix-support/hydra-build-products" or die;
    while (<LIST>) {
    /^([\w\-]+)\s+([\w\-]+)\s+(\S+)(\s+(\S+))?$/ or next;
    my $type = $1;
    my $subtype = $2 eq "none" ? "" : $2;
    my $path = $3;
    my $defaultPath = $5;
    next unless -e $path;
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 723
    [7.568][5.509:550]()
    my $fileSize, my $sha1, my $sha256;
    [7.568]
    [7.624]
    my $fileSize, my $sha1, my $sha256;
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 725
    [7.625][5.551:591]()
    # !!! validate $path, $defaultPath
    [7.625]
    [7.3430]
    # !!! validate $path, $defaultPath
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 727
    [7.3431][5.592:693]()
    if (-f $path) {
    my $st = stat($path) or die "cannot stat $path: $!";
    $fileSize = $st->size;
    [7.3431]
    [7.841]
    if (-f $path) {
    my $st = stat($path) or die "cannot stat $path: $!";
    $fileSize = $st->size;
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 731
    [7.866][5.694:910]()
    $sha1 = `nix-hash --flat --type sha1 $path`
    or die "cannot hash $path: $?";;
    chomp $sha1;
    $sha256 = `nix-hash --flat --type sha256 $path`
    or die "cannot hash $path: $?";;
    chomp $sha256;
    }
    [7.866]
    [7.3431]
    $sha1 = `nix-hash --flat --type sha1 $path`
    or die "cannot hash $path: $?";;
    chomp $sha1;
    $sha256 = `nix-hash --flat --type sha256 $path`
    or die "cannot hash $path: $?";;
    chomp $sha256;
    }
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 740
    [7.3432][5.911:968]()
    my $name = $path eq $outPath ? "" : basename $path;
    [7.3432]
    [7.1320]
    my $name = $path eq $outPath ? "" : basename $path;
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 742
    [7.1341][5.969:1275]()
    $db->resultset('BuildProducts')->create(
    { build => $build->id
    , productnr => $productnr++
    , type => $type
    , subtype => $subtype
    , path => $path
    , filesize => $fileSize
    , sha1hash => $sha1
    , sha256hash => $sha256
    , name => $name
    , defaultpath => $defaultPath
    });
    }
    close LIST;
    [7.1341]
    [5.1275]
    $db->resultset('BuildProducts')->create(
    { build => $build->id
    , productnr => $productnr++
    , type => $type
    , subtype => $subtype
    , path => $path
    , filesize => $fileSize
    , sha1hash => $sha1
    , sha256hash => $sha256
    , name => $name
    , defaultpath => $defaultPath
    });
    }
    close LIST;
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 759
    [5.1293][5.1293:1507]()
    $db->resultset('BuildProducts')->create(
    { build => $build->id
    , productnr => $productnr++
    , type => "nix-build"
    , subtype => ""
    , path => $outPath
    , name => $build->nixname
    });
    [5.1293]
    [5.1507]
    $db->resultset('BuildProducts')->create(
    { build => $build->id
    , productnr => $productnr++
    , type => "nix-build"
    , subtype => ""
    , path => $outPath
    , name => $build->nixname
    });
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 840
    [7.580][7.580:624]()
    $build->update({ finished => 1 });
    [7.580]
    [7.624]
    $build->update({ finished => 1 });