[meld/VersionControlRework: 17/123] meld.vc: Remove unused directory argument from _get_tree_cache



commit 6cd470bf02d1c020be50f0bf24485684e403506f
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sun Mar 22 07:39:21 2015 +1000

    meld.vc: Remove unused directory argument from _get_tree_cache

 meld/vc/_vc.py       |    2 +-
 meld/vc/bzr.py       |    2 +-
 meld/vc/git.py       |    4 ++--
 meld/vc/mercurial.py |    4 ++--
 meld/vc/svn.py       |    4 ++--
 meld/vcview.py       |    2 +-
 6 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/meld/vc/_vc.py b/meld/vc/_vc.py
index edf88f1..2814d7c 100644
--- a/meld/vc/_vc.py
+++ b/meld/vc/_vc.py
@@ -195,7 +195,7 @@ class Vc(object):
     def cache_tree(self, directory):
         raise NotImplementedError()
 
-    def _get_tree_cache(self, directory):
+    def _get_tree_cache(self):
         if not self._tree_cache:
             self._tree_cache = self.cache_tree()
         return self._tree_cache
diff --git a/meld/vc/bzr.py b/meld/vc/bzr.py
index b60623e..88eb80f 100644
--- a/meld/vc/bzr.py
+++ b/meld/vc/bzr.py
@@ -226,7 +226,7 @@ class Vc(_vc.Vc):
         return tree_cache
 
     def _get_dirsandfiles(self, directory, dirs, files):
-        tree = self._get_tree_cache(directory)
+        tree = self._get_tree_cache()
 
         retfiles = []
         retdirs = []
diff --git a/meld/vc/git.py b/meld/vc/git.py
index 4ececaf..4f8962f 100644
--- a/meld/vc/git.py
+++ b/meld/vc/git.py
@@ -373,12 +373,12 @@ class Vc(_vc.Vc):
         return tree_state
 
     def update_file_state(self, path):
-        tree_state = self._get_tree_cache(os.path.dirname(path))
+        tree_state = self._get_tree_cache()
         self._update_tree_state_cache(path, tree_state)
 
     def _get_dirsandfiles(self, directory, dirs, files):
 
-        tree = self._get_tree_cache(directory)
+        tree = self._get_tree_cache()
 
         retfiles = []
         retdirs = []
diff --git a/meld/vc/mercurial.py b/meld/vc/mercurial.py
index 4a0f7a8..be77930 100644
--- a/meld/vc/mercurial.py
+++ b/meld/vc/mercurial.py
@@ -128,12 +128,12 @@ class Vc(_vc.Vc):
         return tree_state
 
     def update_file_state(self, path):
-        tree_state = self._get_tree_cache(os.path.dirname(path))
+        tree_state = self._get_tree_cache()
         self._update_tree_state_cache(path, tree_state)
 
     def _get_dirsandfiles(self, directory, dirs, files):
 
-        tree = self._get_tree_cache(directory)
+        tree = self._get_tree_cache()
 
         retfiles = []
         retdirs = []
diff --git a/meld/vc/svn.py b/meld/vc/svn.py
index 75f31b2..9217da9 100644
--- a/meld/vc/svn.py
+++ b/meld/vc/svn.py
@@ -222,11 +222,11 @@ class Vc(_vc.Vc):
         return tree_state
 
     def update_file_state(self, path):
-        tree_state = self._get_tree_cache(os.path.dirname(path))
+        tree_state = self._get_tree_cache()
         self._update_tree_state_cache(path, tree_state)
 
     def _get_dirsandfiles(self, directory, dirs, files):
-        tree = self._get_tree_cache(directory)
+        tree = self._get_tree_cache()
 
         if not directory in tree:
             return [], []
diff --git a/meld/vcview.py b/meld/vcview.py
index d6a4664..1771795 100644
--- a/meld/vcview.py
+++ b/meld/vcview.py
@@ -428,7 +428,7 @@ class VcView(melddoc.MeldDoc, gnomeglade.Component):
                    active_action(a[0]) and a[1]]
 
         yield _("Scanning %s") % rootname
-        self.vc._get_tree_cache(rootname)
+        self.vc._get_tree_cache()
         while todo:
             # This needs to happen sorted and depth-first in order for our row
             # references to remain valid while we traverse.


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