[diffoscope] 02/05: Indent for next commit.

Chris Lamb chris at chris-lamb.co.uk
Mon Sep 26 18:57:54 CEST 2016


This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository diffoscope.

commit 967a6c25ff3ec46a4a1e03fc6bb3f47e0819a3a5
Author: Chris Lamb <lamby at debian.org>
Date:   Mon Sep 26 18:41:20 2016 +0200

    Indent for next commit.
    
    Gbp-Dch: ignore
    
    Signed-off-by: Chris Lamb <lamby at debian.org>
---
 diffoscope/comparators/directory.py | 23 ++++++++++++-----------
 diffoscope/comparators/utils.py     | 35 +++++++++++++++++++----------------
 2 files changed, 31 insertions(+), 27 deletions(-)

diff --git a/diffoscope/comparators/directory.py b/diffoscope/comparators/directory.py
index cec01cb..710d92f 100644
--- a/diffoscope/comparators/directory.py
+++ b/diffoscope/comparators/directory.py
@@ -151,17 +151,18 @@ class FilesystemDirectory(object):
         other_container = DirectoryContainer(other)
         my_names = my_container.get_member_names()
         other_names = other_container.get_member_names()
-        for name in sorted(set(my_names).intersection(other_names)):
-            my_file = my_container.get_member(name)
-            other_file = other_container.get_member(name)
-            inner_difference = diffoscope.comparators.compare_files(
-                                   my_file, other_file, source=name)
-            meta_differences = compare_meta(my_file.name, other_file.name)
-            if meta_differences and not inner_difference:
-                inner_difference = Difference(None, my_file.path, other_file.path)
-            if inner_difference:
-                inner_difference.add_details(meta_differences)
-                differences.append(inner_difference)
+        if True:
+            for name in sorted(set(my_names).intersection(other_names)):
+                my_file = my_container.get_member(name)
+                other_file = other_container.get_member(name)
+                inner_difference = diffoscope.comparators.compare_files(
+                                       my_file, other_file, source=name)
+                meta_differences = compare_meta(my_file.name, other_file.name)
+                if meta_differences and not inner_difference:
+                    inner_difference = Difference(None, my_file.path, other_file.path)
+                if inner_difference:
+                    inner_difference.add_details(meta_differences)
+                    differences.append(inner_difference)
         if not differences:
             return None
         difference = Difference(None, self.path, other.path, source)
diff --git a/diffoscope/comparators/utils.py b/diffoscope/comparators/utils.py
index 95bff29..773f113 100644
--- a/diffoscope/comparators/utils.py
+++ b/diffoscope/comparators/utils.py
@@ -201,22 +201,25 @@ class Container(object, metaclass=abc.ABCMeta):
         my_members = self.get_members()
         my_reminders = collections.OrderedDict()
         other_members = other.get_members()
-        # keep it sorted like my members
-        while my_members:
-            my_member_name, my_member = my_members.popitem(last=False)
-            if my_member_name in other_members:
-                yield my_member, other_members.pop(my_member_name), NO_COMMENT
-            else:
-                my_reminders[my_member_name] = my_member
-        my_members = my_reminders
-        for my_name, other_name, score in diffoscope.comparators.perform_fuzzy_matching(my_members, other_members):
-            comment = 'Files similar despite different names (difference score: %d)' % score
-            yield my_members.pop(my_name), other_members.pop(other_name), comment
-        if Config.general.new_file:
-            for my_member in my_members.values():
-                yield my_member, NonExistingFile('/dev/null', my_member), NO_COMMENT
-            for other_member in other_members.values():
-                yield NonExistingFile('/dev/null', other_member), other_member, NO_COMMENT
+
+        if True:
+            # keep it sorted like my members
+            while my_members:
+                my_member_name, my_member = my_members.popitem(last=False)
+                if my_member_name in other_members:
+                    yield my_member, other_members.pop(my_member_name), NO_COMMENT
+                else:
+                    my_reminders[my_member_name] = my_member
+            my_members = my_reminders
+            for my_name, other_name, score in diffoscope.comparators.perform_fuzzy_matching(my_members, other_members):
+                comment = 'Files similar despite different names (difference score: %d)' % score
+                yield my_members.pop(my_name), other_members.pop(other_name), comment
+            if Config.general.new_file:
+                for my_member in my_members.values():
+                    yield my_member, NonExistingFile('/dev/null', my_member), NO_COMMENT
+                    p.step()
+                for other_member in other_members.values():
+                    yield NonExistingFile('/dev/null', other_member), other_member, NO_COMMENT
 
     def compare(self, other, source=None):
         return itertools.starmap(diffoscope.comparators.compare_commented_files, self.comparisons(other))

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git


More information about the diffoscope mailing list