[meld: 11/63] filediff, filemerge: More file-loading unification



commit 1a95826872923dd04b566dfc7bf42ff305ccbc92
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sun Jul 19 10:27:19 2015 +1000

    filediff, filemerge: More file-loading unification

 meld/filediff.py  |    5 +++++
 meld/filemerge.py |    6 ------
 2 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/meld/filediff.py b/meld/filediff.py
index 64513b5..ec578d8 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -1104,6 +1104,9 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
         if all(b.data.loaded for b in self.textbuffer[:self.num_panes]):
             self.scheduler.add_task(self._compare_files_internal())
 
+    def _merge_files(self):
+        yield 1
+
     def _diff_files(self, refresh=False):
         yield _("[%s] Computing differences") % self.label_text
         texts = self.buffer_filtered[:self.num_panes]
@@ -1150,6 +1153,8 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
             self.textbuffer[i].set_language(langs[i])
 
     def _compare_files_internal(self):
+        for i in self._merge_files():
+            yield i
         for i in self._diff_files():
             yield i
 
diff --git a/meld/filemerge.py b/meld/filemerge.py
index f44afab..c644b61 100644
--- a/meld/filemerge.py
+++ b/meld/filemerge.py
@@ -33,12 +33,6 @@ class FileMerge(filediff.FileDiff):
         comp = filediff.FileDiff.get_comparison(self)
         return recent.TYPE_MERGE, comp[1]
 
-    def _compare_files_internal(self):
-        for i in self._merge_files():
-            yield i
-        for i in self._diff_files():
-            yield i
-
     def _merge_files(self):
         yield _("[%s] Merging files") % self.label_text
         merger = merge.Merger()


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