We no longer break diff indicies
authorRobert Sesek <rsesek@bluestatic.org>
Tue, 20 Dec 2005 23:50:56 +0000 (23:50 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Tue, 20 Dec 2005 23:50:56 +0000 (23:50 +0000)
includes/svnlib.php

index 5c6ed9f68e28d14835eedcd299cd51f66bcc0141..7b518cf03d438250faa13114eadb7f9a9d90ed9d 100644 (file)
@@ -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'           => '',