[diffoscope] 01/03: Update the progress bar prior to working on an item so the filename is in sync.

Chris Lamb chris at chris-lamb.co.uk
Tue Mar 14 19:00:04 CET 2017


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

lamby pushed a commit to branch experimental
in repository diffoscope.

commit b5b9563854ae1d757ead112be3e65522bb945485
Author: Chris Lamb <lamby at debian.org>
Date:   Tue Mar 14 15:06:47 2017 +0100

    Update the progress bar prior to working on an item so the filename is in sync.
    
    Signed-off-by: Chris Lamb <lamby at debian.org>
---
 diffoscope/comparators/utils/container.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/diffoscope/comparators/utils/container.py b/diffoscope/comparators/utils/container.py
index fa63645..db6c478 100644
--- a/diffoscope/comparators/utils/container.py
+++ b/diffoscope/comparators/utils/container.py
@@ -106,25 +106,25 @@ class Container(object, metaclass=abc.ABCMeta):
             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
                     p.step(msg=my_member.progress_name)
+                    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 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
                 p.step(2, msg=my_name)
+                yield my_members.pop(my_name), other_members.pop(other_name), comment
 
             if Config().new_file:
                 for my_member in my_members.values():
-                    yield my_member, MissingFile('/dev/null', my_member), NO_COMMENT
                     p.step(msg=my_member)
+                    yield my_member, MissingFile('/dev/null', my_member), NO_COMMENT
 
                 for other_member in other_members.values():
-                    yield MissingFile('/dev/null', other_member), other_member, NO_COMMENT
                     p.step(msg=other_member)
+                    yield MissingFile('/dev/null', other_member), other_member, NO_COMMENT
 
     def compare(self, other, source=None):
         from .compare import compare_commented_files

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


More information about the diffoscope mailing list