SHYRGAWZFYGRWCRB54TYL2GTU3B4WMQ3J5H4ZHGV27W7PUQN3EWQC
BKOIYITRBRVU4D7XFAZPV5QHAPCBMIO3SBNHYJ6TVT43WR32CTHQC
MBNX3V52ALVUJLB6RS4N4UGK7USIOEYI4NSYVNCIHXETVLS4LG5AC
OSVLMLCQQ52E47CX7TZAIFZSO4VVGRHWJTZY2G23YUPMDCKURTYAC
J5UVLXOK6EDIL5I7VKWH4V2QDS4DPD7FHRK6XBWSXFRQS4JKXFZQC
OOQ2D3KCLFPYNAN253PHWLBQMB6OMO2KYQWQXLTP65SQAYZWQ5LAC
2M7J26V4WXJTOVN7TIOMOLUD2QA4LNTFLNOUTJWKL4XEGE6W2GKQC
IK53RV4VGOHLCZGQCCIKPB45M3C7M7YMNBOJFBGZJ4LWIZNU4QNQC
$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) || " " };
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);
[% 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 %]