[meld/VersionControlRework: 21/123] meld.vc._vc: Pull cache_tree into its only access



commit ffa7eee097213ac85eca6b578b71c0b5ea7b98d0
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sun Mar 22 08:00:30 2015 +1000

    meld.vc._vc: Pull cache_tree into its only access

 meld/vc/_vc.py |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/meld/vc/_vc.py b/meld/vc/_vc.py
index 5198b48..599a3f0 100644
--- a/meld/vc/_vc.py
+++ b/meld/vc/_vc.py
@@ -192,14 +192,10 @@ class Vc(object):
     def get_working_directory(self, workdir):
         return workdir
 
-    def cache_tree(self):
-        tree_state = {}
-        self._update_tree_state_cache("./", tree_state)
-        return tree_state
-
     def _get_tree_cache(self):
         if not self._tree_cache:
-            self._tree_cache = self.cache_tree()
+            self._tree_cache = {}
+            self._update_tree_state_cache("./", self._tree_cache)
         return self._tree_cache
 
     def update_file_state(self, path):


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]