'diff_hunk',
'diff_file',
'diff',
- 'file_change'
+ 'file_change',
+ 'property'
);
require_once('./global.php');
foreach ($diff->fetch() AS $filename => $file)
{
$hunktpl = '';
+ $proplist = '';
+
+ if (!$filename)
+ {
+ continue;
+ }
+
+ $props = $file['props'];
+ $show['props'] = (bool)$props;
+ unset($file['props']);
foreach ($file AS $hunk)
{
eval('$hunktpl .= "' . $template->fetch('diff_hunk') . '";');
}
+ foreach ($props AS $name => $value)
+ {
+ eval('$proplist .= "' . $template->fetch('property') . '";');
+ }
+
eval('$changes .= "' . $template->fetch('diff_file') . '";');
}
$chunk = 0;
$indexcounter = null;
+ $curprop = '';
$delstack = array();
{
if (preg_match('#^@@ \-([0-9]*),([0-9]*) \+([0-9]*),([0-9]*) @@$#', $line, $bits))
{
+ $property = false;
$delstack = array();
$this->diff["$index"][ ++$chunk ]['hunk'] = array('old' => array('line' => $bits[1], 'count' => $bits[2]), 'new' => array('line' => $bits[3], 'count' => $bits[4]));
$lines['old'] = $this->diff["$index"]["$chunk"]['hunk']['old']['line'] - 1;
$lines['new'] = $this->diff["$index"]["$chunk"]['hunk']['new']['line'] - 1;
continue;
}
+ else if (preg_match('#^Property changes on: (.*?)$#', $line, $bits))
+ {
+ $property = true;
+ $index = $bits[1];
+ $this->diff["$index"]['props'] = array();
+ continue;
+ }
+
+ if ($property)
+ {
+ if (preg_match('#^__*_$#', trim($line)))
+ {
+ $viewsvn->debug("skipping: $line");
+ continue;
+ }
+
+ if (preg_match('#Name: (.*?)$#', $line, $matches))
+ {
+ $curprop = $matches[1];
+ $viewsvn->debug("prop: $curprop");
+ continue;
+ }
+ else
+ {
+ if (preg_match('#^\s+?\+(.*)#', $line, $matches))
+ {
+ $this->diff["$index"]['props']["$curprop"] .= $matches[1];
+ }
+ else if (!preg_match('#^\s+[\+\- ](.*)#', $line) AND trim($line) != '')
+ {
+ $this->diff["$index"]['props']["$curprop"] .= "\n" . $line;
+ }
+ continue;
+ }
+ }
if ($indexcounter <= 3 AND $indexcounter !== null)
{
padding: 2px;
}
+.propbox
+{
+ background-color: rgb(239, 239, 239);
+
+ border-color: rgb(153, 153, 153);
+ border-width: 1px 1px 1px 1px;
+ border-style: dashed;
+}
+
+ .propbox ul
+ {
+ margin: 5px;
+ padding-left: 15px;
+ }
+
+ .propbox li
+ {
+ margin: 0px;
+ padding: 0px;
+ }
+
.list li
{
list-style-image: url(bullet.gif);