357 |
miho |
1 |
<?php |
|
|
2 |
if (isset($last)) unset ($last); |
|
|
3 |
Exec("svnlook youngest /home/MLAB", $last); |
358 |
miho |
4 |
$last=$last[0]; // Poslední revize |
357 |
miho |
5 |
?> |
|
|
6 |
<h1> Commit Log </h1> |
|
|
7 |
<?php |
|
|
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 |
} |
357 |
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> |
|
|
31 |
<td> <code><?php echo $x; ?> </code></td> |
|
|
32 |
</tr> |
|
|
33 |
</table> |
366 |
miho |
34 |
<?php |
|
|
35 |
if (isset($x)) unset ($x); |
|
|
36 |
Exec("svn status /var/www", $x); |
|
|
37 |
$x=preg_replace("/\n/","",$x); // Ukousni konce řádek |
|
|
38 |
$x=implode("\n",$x); // Slož řádky |
|
|
39 |
if ($x=="") |
|
|
40 |
{ |
|
|
41 |
$x=" "; |
|
|
42 |
} |
|
|
43 |
?> |
|
|
44 |
<h2> SubVersion Status </h2> |
|
|
45 |
<p> |
|
|
46 |
Tabulka zobrazuje odchylky Subversion databáze a adresářového |
|
|
47 |
stromu webu. |
|
|
48 |
</p> |
|
|
49 |
<table> |
|
|
50 |
<tr> |
|
|
51 |
<th> SubVersion Status </th> |
|
|
52 |
</tr> |
|
|
53 |
<tr> |
|
|
54 |
<td> <code><?php echo $x; ?> </code></td> |
|
|
55 |
</tr> |
|
|
56 |
</table> |
357 |
miho |
57 |
|
155 |
miho |
58 |
<?php |
357 |
miho |
59 |
// Cyklus přes posledních několik commitů |
358 |
miho |
60 |
for($i=1; $i<=5; $i++, $last--) { |
155 |
miho |
61 |
?> |
358 |
miho |
62 |
|
357 |
miho |
63 |
<h2> Revision <?php echo $last; ?> </h2> |
|
|
64 |
<?php |
|
|
65 |
if (isset($x)) unset ($x); |
|
|
66 |
Exec("svnlook info /home/MLAB -r $last", $x); |
|
|
67 |
?> |
|
|
68 |
<table> |
358 |
miho |
69 |
<tr> |
357 |
miho |
70 |
<th> Author </th> |
|
|
71 |
<td> <?php echo $x[0]; ?> </td> |
|
|
72 |
</tr> |
|
|
73 |
<tr> |
|
|
74 |
<th> Date </th> |
|
|
75 |
<td> <?php echo $x[1]; ?> </td> |
|
|
76 |
</tr> |
358 |
miho |
77 |
<tr> |
|
|
78 |
<th> Comment </th> |
|
|
79 |
<td> <?php echo $x[3]; ?> </td> |
|
|
80 |
</tr> |
|
|
81 |
<tr> |
|
|
82 |
<td colspan=2> |
|
|
83 |
<code><?php |
357 |
miho |
84 |
if (isset($x)) unset($x); |
|
|
85 |
Exec("svnlook changed /home/MLAB -r $last", $x); |
|
|
86 |
echo implode("\n", $x); ?></code> </td> |
|
|
87 |
</table> |
358 |
miho |
88 |
|
357 |
miho |
89 |
<?php |
|
|
90 |
// Konec cyklu |
358 |
miho |
91 |
} |
366 |
miho |
92 |
|