If we can't find an exact revision, find the next closest one
authorRobert Sesek <rsesek@bluestatic.org>
Sun, 11 Sep 2005 22:59:11 +0000 (22:59 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Sun, 11 Sep 2005 22:59:11 +0000 (22:59 +0000)
includes/svnlib.php

index 84289770d2ac288b5b105007a18ffd14a0f18ac2..45494fddfce9f0b66878c46e6bbc00de1b2a7d22 100644 (file)
@@ -516,6 +516,17 @@ class SVNCommon
                }
                else
                {
+                       $keys = array_keys($logs);
+                       sort($keys);
+
+                       for ($i = 0; $i < count($keys); $i++)
+                       {
+                               if ($rev > $keys["$i"] AND $rev < $keys[ $i + 1 ])
+                               {
+                                       return $logs["$keys[$i]"];
+                               }
+                       }
+                       
                        return null;
                }
        }