[diffoscope] 08/10: Sort directory entries in DirectoryContainer

Jérémy Bobbio lunar at moszumanska.debian.org
Wed Jan 20 16:11:45 CET 2016

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

lunar pushed a commit to branch master
in repository diffoscope.

commit e874d3043c346a70e0f83fdc6c42f2a3ad7e7810
Author: Jérémy Bobbio <lunar at debian.org>
Date:   Wed Jan 20 15:04:36 2016 +0000

    Sort directory entries in DirectoryContainer
    As we now respect order of containers when performing comparisons, we don't
    want to have the output of the directory comparator depend on the filesystem
    ordering. So let's sort the entries in a directory.
 diffoscope/comparators/directory.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/diffoscope/comparators/directory.py b/diffoscope/comparators/directory.py
index 71ba9ad..e50aa02 100644
--- a/diffoscope/comparators/directory.py
+++ b/diffoscope/comparators/directory.py
@@ -170,7 +170,7 @@ class DirectoryContainer(Container):
                 root = root[len(path) + 1:]
             names.extend([os.path.join(root, f) for f in files])
-        return names
+        return sorted(names)
     def get_member(self, member_name):
         return diffoscope.comparators.specialize(FilesystemFile(os.path.join(self.source.path, member_name), container=self))

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

More information about the diffoscope mailing list