2 /*=====================================================================*\
3 || ################################################################### ||
4 || # ViewSVN [#]version[#]
5 || # --------------------------------------------------------------- # ||
6 || # Copyright ©2002-[#]year[#] by Iris Studios, Inc. All Rights Reserved. # ||
7 || # This file may not be reproduced in any way without permission. # ||
8 || # --------------------------------------------------------------- # ||
9 || # User License Agreement at http://www.iris-studios.com/license/ # ||
10 || ################################################################### ||
11 \*=====================================================================*/
13 require_once('./global.php');
15 $path = $viewsvn->paths
->parse();
16 $repos = $viewsvn->paths
->fetch_repos($path);
17 $relpath = $viewsvn->paths
->fetch_path($path);
19 echo $viewsvn->paths
->construct_breadcrumb($path, false
);
21 if (empty($viewsvn->in
['high']))
23 $viewsvn->in
['high'] = $viewsvn->svn
->common
->fetch_head_rev($path);
26 if (empty($viewsvn->in
['low']))
28 $viewsvn->in
['low'] = $viewsvn->svn
->common
->fetch_prev_rev($path, $viewsvn->in
['high']);
31 $diff = new SVNDiff($repos, $relpath, $viewsvn->in
['low'], $viewsvn->in
['high']);
33 if ($viewsvn->svn
->common
->isdir($path))
43 <style type
="text/css">
48 background
-color
: #99EE99;
53 background
-color
: #EE9999;
58 font
: normal
11px monospace
;
65 foreach ($diff->fetch() AS $filename => $file)
67 echo '<h2>' . $filename . '</h2>';
69 foreach ($file AS $hunk)
71 echo '<table cellspacing="1" cellpadding="1" width="100%">';
73 foreach ($hunk AS $key => $line)
75 if ($key == 'hunk' AND isset($line['old']))
78 <tr style="background-color: #F7F7F7">
79 <td><a href="/viewsvn/' . $viewsvn->paths
->out($viewpg . '.php?rev=' . $viewsvn->in
['low'], $path) . '">r' . $viewsvn->in
['low'] . '</a></td>
80 <td><a href="/viewsvn/' . $viewsvn->paths
->out($viewpg . '.php?rev=' . $viewsvn->in
['high'], $path) . '">r' . $viewsvn->in
['high'] . '</a></td>
86 if ($line['act'] == '+')
90 else if ($line['act'] == '-')
100 <tr style="background-color: #EEEEDD; border-width: 0px 1px 1px 0px">
101 <td>' . $line['oldlineno'] . '</td>
102 <td>' . $line['newlineno'] . '</td>
103 <td style="background-color: ' . $color . '">' . $viewsvn->svn
->format($line['line']) . '</td>
114 /*=====================================================================*\
115 || ###################################################################
118 || ###################################################################
119 \*=====================================================================*/