370 |
miho |
1 |
<?php |
357 |
miho |
2 |
if (isset($last)) unset ($last); |
|
|
3 |
Exec("svnlook youngest /home/MLAB", $last); |
358 |
miho |
4 |
$last=$last[0]; // Poslední revize |
370 |
miho |
5 |
?> |
357 |
miho |
6 |
<h1> Commit Log </h1> |
370 |
miho |
7 |
<?php |
357 |
miho |
8 |
if (isset($x)) unset ($x); |
358 |
miho |
9 |
$x=@file("DynData/svn.err"); // Chybový soubor |
|
|
10 |
if ($x!="") |
|
|
11 |
{ |
|
|
12 |
$x=preg_replace("/\n/","",$x); // Ukousni konce řádek |
|
|
13 |
$x=implode("\n",$x); // Slož řádky |
|
|
14 |
if ($x=="") |
|
|
15 |
{ |
|
|
16 |
$x="O.K."; // Soubor existuje a je prázdný |
|
|
17 |
} |
|
|
18 |
} |
|
|
19 |
else |
|
|
20 |
{ |
|
|
21 |
$x="Missing Error File"; // Pokud není chybový soubor |
|
|
22 |
} |
370 |
miho |
23 |
?> |
366 |
miho |
24 |
<h2> PostCommit script result </h2> |
|
|
25 |
<p> |
|
|
26 |
Tabulka zobrazuje případné chyby posledního commitu. |
|
|
27 |
</p> |
357 |
miho |
28 |
<table> |
358 |
miho |
29 |
<tr> |
|
|
30 |
<th> Last Error </th> |
370 |
miho |
31 |
<td> <code><?php echo $x; ?></code></td> |
358 |
miho |
32 |
</tr> |
|
|
33 |
</table> |
370 |
miho |
34 |
<?php |
366 |
miho |
35 |
if (isset($x)) unset ($x); |
1486 |
miho |
36 |
Exec("svn status /home/Apache/WWW-MLAB", $x); |
366 |
miho |
37 |
$x=preg_replace("/\n/","",$x); // Ukousni konce řádek |
|
|
38 |
$x=implode("\n",$x); // Slož řádky |
|
|
39 |
if ($x=="") |
|
|
40 |
{ |
|
|
41 |
$x=" "; |
|
|
42 |
} |
370 |
miho |
43 |
?> |
366 |
miho |
44 |
<h2> SubVersion Status </h2> |
|
|
45 |
<p> |
|
|
46 |
Tabulka zobrazuje odchylky Subversion databáze a adresářového |
369 |
miho |
47 |
stromu webu. |
366 |
miho |
48 |
</p> |
|
|
49 |
<table> |
|
|
50 |
<tr> |
|
|
51 |
<th> SubVersion Status </th> |
369 |
miho |
52 |
</tr> |
|
|
53 |
<tr> |
371 |
miho |
54 |
<td> <code><?php echo $x; ?></code></td> |
366 |
miho |
55 |
</tr> |
|
|
56 |
</table> |
155 |
miho |
57 |
<?php |
357 |
miho |
58 |
// Cyklus přes posledních několik commitů |
358 |
miho |
59 |
for($i=1; $i<=5; $i++, $last--) { |
155 |
miho |
60 |
?> |
357 |
miho |
61 |
<h2> Revision <?php echo $last; ?> </h2> |
370 |
miho |
62 |
<?php |
357 |
miho |
63 |
if (isset($x)) unset ($x); |
|
|
64 |
Exec("svnlook info /home/MLAB -r $last", $x); |
370 |
miho |
65 |
?> |
357 |
miho |
66 |
<table> |
358 |
miho |
67 |
<tr> |
357 |
miho |
68 |
<th> Author </th> |
370 |
miho |
69 |
<td> <?php echo $x[0]; ?> </td> |
357 |
miho |
70 |
</tr> |
|
|
71 |
<tr> |
|
|
72 |
<th> Date </th> |
|
|
73 |
<td> <?php echo $x[1]; ?> </td> |
|
|
74 |
</tr> |
358 |
miho |
75 |
<tr> |
|
|
76 |
<th> Comment </th> |
|
|
77 |
<td> <?php echo $x[3]; ?> </td> |
|
|
78 |
</tr> |
|
|
79 |
<tr> |
371 |
miho |
80 |
<td colspan=2> <code><?php |
357 |
miho |
81 |
if (isset($x)) unset($x); |
|
|
82 |
Exec("svnlook changed /home/MLAB -r $last", $x); |
|
|
83 |
echo implode("\n", $x); ?></code> </td> |
|
|
84 |
</table> |
358 |
miho |
85 |
|
357 |
miho |
86 |
<?php |
|
|
87 |
// Konec cyklu |
358 |
miho |
88 |
} |
369 |
miho |
89 |
?> |