fetch_head_rev() now works well :)
authorRobert Sesek <rsesek@bluestatic.org>
Mon, 19 Dec 2005 23:24:49 +0000 (23:24 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Mon, 19 Dec 2005 23:24:49 +0000 (23:24 +0000)
includes/svnlib.php

index cc8724e745dbbcb04994848a1ffd2a7b7d089de3..b2db36955ef214752b17a296d207903ce770691b 100644 (file)
@@ -429,6 +429,16 @@ class SVNCommon
        */
        function fetch_head_rev($path)
        {
+               $output = $this->registry->shell->exec($this->registry->svn->svnpath . ' info ' . $this->registry->repos->fetch_path($this->registry->paths->fetch_repos($path), false) . $this->registry->paths->fetch_path($path));
+               
+               foreach ($output AS $line)
+               {
+                       if (preg_match('#^Last Changed Rev: (.*)#', $line, $matches))
+                       {
+                               return $matches[1];
+                       }
+               }
+               
                $revs = $this->fetch_revs($path);
                return $revs['HEAD'];
        }
@@ -476,6 +486,7 @@ class SVNCommon
        * @access       public
        *
        * @param        string  Universal path
+       * @param        bool    Override the cache system?
        *
        * @return       array   Log data
        */