[Reproducible-commits] [debbindiff] 04/07: Rename .changes comparator

Jérémy Bobbio lunar at moszumanska.debian.org
Sat Jun 27 08:59:11 UTC 2015


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

lunar pushed a commit to branch master
in repository debbindiff.

commit a04f9b8a066ae6e7daf6b1ec350b83bdd1164df0
Author: Jérémy Bobbio <lunar at debian.org>
Date:   Fri Jun 26 11:09:45 2015 +0000

    Rename .changes comparator
    
    The name for the module and the function was not specific enough.
    Having a 'debian' module should allow us to group code related (e.g. to also
    support .buildinfo in the future)
---
 debbindiff/comparators/__init__.py               | 4 ++--
 debbindiff/comparators/deb.py                    | 2 ++
 debbindiff/comparators/{changes.py => debian.py} | 2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/debbindiff/comparators/__init__.py b/debbindiff/comparators/__init__.py
index 25cc864..c50608e 100644
--- a/debbindiff/comparators/__init__.py
+++ b/debbindiff/comparators/__init__.py
@@ -27,10 +27,10 @@ from debbindiff.difference import Difference
 from debbindiff.comparators.binary import \
     compare_binary_files, are_same_binaries
 from debbindiff.comparators.bzip2 import compare_bzip2_files
-from debbindiff.comparators.changes import compare_changes_files
 from debbindiff.comparators.java import compare_class_files
 from debbindiff.comparators.cpio import compare_cpio_files
 from debbindiff.comparators.deb import compare_deb_files, compare_md5sums_files
+from debbindiff.comparators.debian import compare_dot_changes_files
 from debbindiff.comparators.directory import compare_directories
 from debbindiff.comparators.elf import \
     compare_elf_files, compare_static_lib_files
@@ -87,7 +87,7 @@ def compare_unknown(path1, path2, source=None):
 
 
 COMPARATORS = [
-    (None, r'\.changes$', compare_changes_files),
+    (None, r'\.changes$', compare_dot_changes_files),
     (None, r'\.(p_)?hi$', compare_hi_files),
     (None, r'\/\./md5sums$', compare_md5sums_files),
     (None, r'\.mo$', compare_mo_files),
diff --git a/debbindiff/comparators/deb.py b/debbindiff/comparators/deb.py
index 6e46fe0..e6b4d09 100644
--- a/debbindiff/comparators/deb.py
+++ b/debbindiff/comparators/deb.py
@@ -17,6 +17,8 @@
 # You should have received a copy of the GNU General Public License
 # along with debbindiff.  If not, see <http://www.gnu.org/licenses/>.
 
+from __future__ import absolute_import
+
 import os.path
 from debian.arfile import ArFile
 from debbindiff import logger
diff --git a/debbindiff/comparators/changes.py b/debbindiff/comparators/debian.py
similarity index 98%
rename from debbindiff/comparators/changes.py
rename to debbindiff/comparators/debian.py
index ac13345..c3a2a95 100644
--- a/debbindiff/comparators/changes.py
+++ b/debbindiff/comparators/debian.py
@@ -32,7 +32,7 @@ DOT_CHANGES_FIELDS = [
     ]
 
 
-def compare_changes_files(path1, path2, source=None):
+def compare_dot_changes_files(path1, path2, source=None):
     try:
         dot_changes1 = Changes(filename=path1)
         dot_changes1.validate(check_signature=False)

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



More information about the Reproducible-commits mailing list