Allow Subversion inputs to specify a revision number.

[?]
Oct 4, 2011, 4:15 PM
Y5DJHUBMLSYUBCN7HWFGARDK5ZLGMJJCD7I4VDTLASAKN3TZJIKQC

Dependencies

  • [2] KQS7DSKJ * Clean up indentation.
  • [3] OOQ2D3KC * Refactoring: move fetchInput out of hydra_scheduler into a separate
  • [4] JTRG7RDQ add support for git as jobinput
  • [5] 2WUNXJGW Hydra/26: Go back to using "svn export" as default for svn, added svn-checkout type for jobset which need .svn dirs. export is much more efficient

Change contents

  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 160
    [3.6794][2.2036:2058]()
    my $uri = $value;
    [3.6794]
    [3.6849]
    # Allow users to specify a revision number next to the URI.
    my ($uri, $revision) = split ' ', $value;
  • edit in src/lib/Hydra/Helper/AddBuilds.pm at line 165
    [2.2094][3.6893:6894](),[3.6893][3.6893:6894](),[3.6894][2.2095:2274]()
    # First figure out the last-modified revision of the URI.
    my @cmd = (["svn", "ls", "-v", "--depth", "empty", $uri],
    "|", ["sed", 's/^ *\([0-9]*\).*/\1/']);
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 166
    [2.2302][2.2302:2483]()
    die "Cannot get head revision of Subversion repository at `$uri':\n$stderr"
    unless IPC::Run::run(@cmd, \$stdout, \$stderr);
    my $revision = $stdout; chomp $revision;
    [2.2302]
    [2.2483]
    unless (defined $revision) {
    # 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;
    }