From e552bfa5a62045e88db32d0b7fa0d28162e6c1fd Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Tue, 20 Dec 2005 23:50:56 +0000 Subject: [PATCH] We no longer break diff indicies --- includes/svnlib.php | 58 ++++++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/includes/svnlib.php b/includes/svnlib.php index 5c6ed9f..7b518cf 100644 --- a/includes/svnlib.php +++ b/includes/svnlib.php @@ -889,34 +889,6 @@ class SVNDiff 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) { $indexcounter++; @@ -928,7 +900,7 @@ class SVNDiff continue; } - if (preg_match('#^([\+\- ])(.*)#', $line, $matches)) + if (preg_match('#^([\+\- ])(.*)#', $line, $matches) AND !$property) { $act = $matches[1]; $content = $matches[2]; @@ -1004,6 +976,34 @@ class SVNDiff 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; + } + } + $this->diff["$index"]["$chunk"][] = array( 'line' => '', 'act' => '', -- 2.22.5