From dbfe5c3b8a72a9ca1782eba629ab4b45b4d13a11 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 11 Sep 2005 22:59:11 +0000 Subject: [PATCH] If we can't find an exact revision, find the next closest one --- includes/svnlib.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/includes/svnlib.php b/includes/svnlib.php index 8428977..45494fd 100644 --- a/includes/svnlib.php +++ b/includes/svnlib.php @@ -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; } } -- 2.22.5