]>
src.bluestatic.org Git - viewsvn.git/blob - dev/difftest.php
2 /*=====================================================================*\
3 || ###################################################################
4 || # ViewSVN [#]version[#]
5 || # Copyright ©2002-[#]year[#] Iris Studios, Inc.
7 || # This program is free software; you can redistribute it and/or modify
8 || # it under the terms of the GNU General Public License as published by
9 || # the Free Software Foundation; version [#]gpl[#] of the License.
11 || # This program is distributed in the hope that it will be useful, but
12 || # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 || # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 || # You should have received a copy of the GNU General Public License along
17 || # with this program; if not, write to the Free Software Foundation, Inc.,
18 || # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 || ###################################################################
20 \*=====================================================================*/
23 require_once('./global.php');
25 //$output = $viewsvn->svn->blame('bugtrack', '/trunk/index.php', 0);
27 // diff /bugtrack/trunk/index@351:359
29 $diff = new SVNDiff('bugtrack', '/trunk/', 314, 315);
34 <style type="text/css">
39 background-color: #99EE99;
44 background-color: #EE9999;
49 font: normal 11px monospace;
56 foreach ($diff->fetch() AS $filename => $file)
58 echo '<h2>' . $filename . '</h2>';
60 foreach ($file AS $hunk)
62 echo '<table cellspacing="1" cellpadding="1" width="100%">';
64 foreach ($hunk AS $key => $line)
66 if ($key == 'hunk' AND isset($line['old']))
69 <tr style="background-color: #F7F7F7">
70 <td colspan="3"> </td>
75 if ($line['act'] == '+')
79 else if ($line['act'] == '-')
89 <tr style="background-color: #EEEEDD; border-width: 0px 1px 1px 0px">
90 <td>' . $line['oldlineno'] . '</td>
91 <td>' . $line['newlineno'] . '</td>
92 <td style="background-color: ' . $color . '">' . $viewsvn->svn
->format($line['line']) . '</td>
103 /*=====================================================================*\
104 || ###################################################################
107 || ###################################################################
108 \*=====================================================================*/