hydra: when no external url is given for diff's of git/hg input, revert to a diff done on a local available clone
[?]
Aug 25, 2011, 2:50 PM
SHYRGAWZFYGRWCRB54TYL2GTU3B4WMQ3J5H4ZHGV27W7PUQN3EWQCDependencies
- [2]
BKOIYITRadded some json responses - [3]
MBNX3V52hydra: disallow robots.txt for root and project all builds page - [4]
OSVLMLCQhydra: factored out build restart and - [5]
ZI535LI6* hydra: 'new' UI for project/jobset/job/build - [6]
5SHCWE7X* Prevent repeated evaluation of a jobset with the same inputs. This - [7]
OOQ2D3KC* Refactoring: move fetchInput out of hydra_scheduler into a separate - [8]
SGNXIOI4Hydra/32: Add option to force evaluation of a certain jobset via web interface (for admins only) - [9]
JI26P3PChydra: export addBuildProducts - [10]
O25D52TAinitial support for mercurial - [11]
QBQSQOSYhydra: moved getbuildlog - [12]
A22P7HCOhydra: at evaluation, check if path is already built, and mark as built in stead of adding to the queue. - [13]
3XTHEUMP* Implemented the clone feature. - [14]
2M7J26V4inital version of links to diff in scm - [15]
KAZWI5G4* hydra: buildpage, show changes since last build/successful build - [*]
J5UVLXOK* Start of a basic Catalyst web interface. - [*]
IK53RV4V
Change contents
- edit in src/lib/Hydra/Controller/API.pm at line 7
use Hydra::Helper::AddBuilds; - edit in src/lib/Hydra/Controller/API.pm at line 12
use Digest::SHA qw(sha256_hex); - edit in src/lib/Hydra/Controller/API.pm at line 208
$c->forward('Hydra::View::Plain');}sub scmdiff : Chained('api') PathPart('scmdiff') Args(0) {my ($self, $c) = @_;my $uri = $c->request->params->{uri} ;my $type = $c->request->params->{type} ;my $branch = $c->request->params->{branch} ;my $rev1 = $c->request->params->{rev1} ;my $rev2 = $c->request->params->{rev2} ;my $diff = "";if($type eq "hg") {my $clonePath = scmPath . "/" . sha256_hex($uri);die if ! -d $clonePath;$diff .= `(cd $clonePath ; hg log -r $rev1:$rev2)`;$diff .= `(cd $clonePath ; hg diff -r $rev1:$rev2)`;} elsif ($type eq "git") {my $clonePath = scmPath . "/" . sha256_hex($uri.$branch);die if ! -d $clonePath;$diff .= `(cd $clonePath ; git log $rev1..$rev2)`;$diff .= `(cd $clonePath ; git diff $rev1..$rev2)`;}$c->stash->{'plain'} = { data => (scalar $diff) || " " }; - edit in src/lib/Hydra/Controller/Root.pm at line 153
, uri_for('API', 'scmdiff', []) - replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 15
our @EXPORT = qw(fetchInput evalJobs checkBuild inputsToArgs captureStdoutStderr getReleaseName getBuildLog addBuildProducts restartBuild);our @EXPORT = qw(fetchInput evalJobs checkBuild inputsToArgs captureStdoutStderr getReleaseName getBuildLog addBuildProducts restartBuild scmPath); - replacement in src/root/common.tt at line 311
[% contents %][% res = bi1.uri.split(' ') %][% url = res.0 %][% branch = res.1 %][% IF bi1.type == "hg" || bi1.type == "git" %]<a target="_new" href="/api/scmdiff?uri=[% url %]&rev1=[% bi1.revision %]&rev2=[% bi2.revision %]&type=[% bi1.type %]&branch=[% branch %]">[% contents %]</a>[% ELSE %][% contents %][% END %]