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 echo $viewsvn->paths
->construct_breadcrumb($path, false
);
17 $revs = $viewsvn->paths
->fetch_rev_num(true
);
18 $high = $revs['high'];
23 $high = $viewsvn->svn
->common
->fetch_head_rev($path);
28 $low = $viewsvn->svn
->common
->fetch_prev_rev($path, $high);
31 $diff = new SVNDiff($repos, $relpath, $low, $high);
33 $isdir = (bool
)$viewsvn->svn
->common
->isdir($path);
36 <style type
="text/css">
41 background
-color
: #99EE99;
46 background
-color
: #EE9999;
51 font
: normal
11px monospace
;
58 foreach ($diff->fetch() AS $filename => $file)
60 echo '<h2>' . $filename . '</h2>';
62 foreach ($file AS $hunk)
64 echo '<table cellspacing="1" cellpadding="1" width="100%">';
66 foreach ($hunk AS $key => $line)
68 if ($key == 'hunk' AND isset($line['old']))
70 $filepath = ($isdir ?
$path . $filename : $path);
72 <tr style="background-color: #F7F7F7">
73 <td><a href="/viewsvn/' . $viewsvn->paths
->out('view.php' . $viewsvn->paths
->fetch_rev_str(false
, $low), $filepath) . '">r' . $low . '</a></td>
74 <td><a href="/viewsvn/' . $viewsvn->paths
->out('view.php' . $viewsvn->paths
->fetch_rev_str(false
, $high), $filepath) . '">r' . $high . '</a></td>
80 if ($line['act'] == '+')
84 else if ($line['act'] == '-')
94 <tr style="background-color: #EEEEDD; border-width: 0px 1px 1px 0px">
95 <td>' . $line['oldlineno'] . '</td>
96 <td>' . $line['newlineno'] . '</td>
97 <td style="background-color: ' . $color . '">' . $viewsvn->svn
->format($line['line']) . '</td>
108 /*=====================================================================*\
109 || ###################################################################
112 || ###################################################################
113 \*=====================================================================*/