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 $navbar = $viewsvn->paths
->construct_breadcrumb($path, false
);
17 // ###################################################################
19 $link['log'] = $viewsvn->paths
->out('log.php' . $viewsvn->paths
->fetch_rev_str(), $path);
21 // ###################################################################
23 $revs = $viewsvn->paths
->fetch_rev_num(true
);
24 $high = $revs['high'];
29 $high = $viewsvn->svn
->common
->fetch_head_rev($path);
34 $low = $viewsvn->svn
->common
->fetch_prev_rev($path, $high);
37 $diff = new SVNDiff($repos, $relpath, $low, $high);
39 $isdir = (bool
)$viewsvn->svn
->common
->isdir($path);
43 foreach ($diff->fetch() AS $filename => $file)
47 foreach ($file AS $hunk)
50 foreach ($hunk AS $key => $line)
52 $show['hunk'] = false
;
53 if ($key == 'hunk' AND isset($line['old']))
55 $filepath = ($isdir ?
$path . $filename : $path);
56 $rlow = $viewsvn->paths
->out('view.php' . $viewsvn->paths
->fetch_rev_str(false
, $low), $filepath);
57 $rhigh = $viewsvn->paths
->out('view.php' . $viewsvn->paths
->fetch_rev_str(false
, $high), $filepath);
62 if ($line['act'] == '+')
66 else if ($line['act'] == '-')
75 $line['line_clean'] = $viewsvn->svn
->format($line['line']);
78 eval('$lines .= "' . $template->fetch('diff_line') . '";');
80 eval('$hunktpl .= "' . $template->fetch('diff_hunk') . '";');
83 eval('$changes .= "' . $template->fetch('diff_file') . '";');
86 // ###################################################################
88 eval('$template->flush("' . $template->fetch('diff') . '");');
90 /*=====================================================================*\
91 || ###################################################################
94 || ###################################################################
95 \*=====================================================================*/