[diffoscope] 01/01: Avoid walking through packages twice when comparing two .changes (Closes: #843531)
Chris Lamb
chris at chris-lamb.co.uk
Thu Dec 22 10:05:53 CET 2016
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch lamby/843531-avoid-walking-through-packages-twice
in repository diffoscope.
commit c2fae661dcc332f62d05e5d7adc6ef373b65af4e
Author: Chris Lamb <lamby at debian.org>
Date: Wed Dec 21 23:06:48 2016 +0000
Avoid walking through packages twice when comparing two .changes (Closes: #843531)
Signed-off-by: Chris Lamb <lamby at debian.org>
---
diffoscope/comparators/debian.py | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/diffoscope/comparators/debian.py b/diffoscope/comparators/debian.py
index a145992..16475c2 100644
--- a/diffoscope/comparators/debian.py
+++ b/diffoscope/comparators/debian.py
@@ -181,8 +181,18 @@ class DotDscFile(DebControlFile):
file._deb822 = dsc
return True
+class DotBuildinfoContainer(DebControlContainer):
+ def get_member_names(self):
+ # If path exists in the parent container, don't recurse
+ parent_container_names = self.source.container.get_member_names()
+
+ return [
+ x for x in super(DotBuildinfoContainer, self).get_member_names()
+ if x not in parent_container_names
+ ]
class DotBuildinfoFile(DebControlFile):
+ CONTAINER_CLASS = DotBuildinfoContainer
RE_FILE_EXTENSION = re.compile(r'\.buildinfo$')
@staticmethod
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the diffoscope
mailing list