/usr/share/aegis/en/html/file_diff.rpt is in aegis-web 4.24.3-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | /*
* aegis cgi script
* Copyright (C) 2002 John Darrington
* Copyright (C) 2007, 2008 Peter Miller
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see
* <http://www.gnu.org/licenses/>.
* between two deltas
*/
/* one column 1000 chars wide */
columns(1000);
auto src, delta1, delta2;
auto dst1, dst2;
delta1 = arg[0];
delta2 = arg[1];
src = arg[2];
dst1 = arg[3];
dst2 = arg[4];
/* If delta1 and delta2 are non numeric, truncate them to 1 char long */
delta1 = subst("[^0-9]+", substr(delta1, 0, 1), delta1);
delta2 = subst("[^0-9]+", substr(delta2, 0, 1), delta2);
/*
* Delta b is a special case, it means the baseline.
* Delta c is a special case, It means the version in the development
* directory
*/
auto first, second;
if (delta1 == "b")
first = "";
else
first = "-delta " ## delta1;
if (delta2 == "b")
second = "";
else
second = "-delta " ## delta2;
auto devdir;
/*
* If the change is being actively developed, copy directly from
* the development directory.
*/
if (delta1 == "c" || delta2 == "c")
{
auto cs;
auto ps;
ps = project[project_name()].state;
cs = ps.branch.change[change_number()];
auto f, found;
found = false;
for (f in cs.src)
{
if (f.file_name == src)
found = true;
}
if (found)
{
devdir = cs.development_directory;
}
}
auto cmd;
if (delta1 == "c")
cmd = "ln -s " ## devdir ## "/" ## src ## " " ## dst1;
else
cmd = "$bindir/aegis -cp -ind -baserel -p " ## project_name() ## " " ##
first ## " " ## src ## " -o " ## dst1;
cmd ##= " && ";
if (delta2 == "c")
cmd ##= "ln -s " ## devdir ## "/" ## src ## " " ## dst2;
else
cmd ##= "$bindir/aegis -cp -ind -baserel -p " ## project_name() ## " "
## second ## " " ## src ## " -o " ## dst2;
cmd ##= " && $bindir/ae_diff2htm " ## dst1 ## " " ## dst2 ## "; ";
cmd ##= "rm -f " ## dst1 ## " " ## dst2;
print(cmd);
|