Two small changes: don't sort File objects automatically, and implement single-revisi...
authorChuck Hagenbuch <chuck@horde.org>
Tue, 9 Nov 2010 04:29:46 +0000 (23:29 -0500)
committerChuck Hagenbuch <chuck@horde.org>
Tue, 9 Nov 2010 04:30:41 +0000 (23:30 -0500)
These changes speed of display of diffs in chora immensely for me.

framework/Vcs/lib/Horde/Vcs.php
framework/Vcs/lib/Horde/Vcs/File/Git.php

index de63c3a..3ade2d5 100644 (file)
@@ -533,7 +533,6 @@ class Horde_Vcs
 
         }
         $ob->setRepository($this);
-        $ob->applySort(self::SORT_AGE);
 
         if (!empty($this->_cache) && !$fetchedFromCache) {
             $this->_cache->set($cacheId, serialize($ob));
index 9eb46c0..de17a75 100644 (file)
@@ -198,7 +198,24 @@ class Horde_Vcs_File_Git extends Horde_Vcs_File
         return $revlist;
     }
 
-   /**
+    /**
+     * TODO
+     */
+    public function queryLogs($rev = null)
+    {
+        if (is_null($rev)) {
+            $this->_ensureLogsInitialized();
+            return $this->logs;
+        } else {
+            if (!isset($this->logs[$rev])) {
+                $this->logs[$rev] = $this->_rep->getLogObject($this, $rev);
+            }
+
+            return isset($this->logs[$rev]) ? $this->logs[$rev] : null;
+        }
+    }
+
+    /**
      * Return the last Horde_Vcs_Log object in the file.
      *
      * @return Horde_Vcs_Log  Log object of the last entry in the file.