[Reproducible-commits] [diffoscope] 02/02: --html-dir: Base filename on hash of unified_diff
Joachim Breitner
nomeata at moszumanska.debian.org
Wed Dec 2 16:03:14 UTC 2015
This is an automated email from the git hooks/post-receive script.
nomeata pushed a commit to branch html-dir
in repository diffoscope.
commit 81947ec86ab002f6fd976fa32d3532dbeac90c34
Author: Joachim Breitner <mail at joachim-breitner.de>
Date: Wed Dec 2 17:01:26 2015 +0100
--html-dir: Base filename on hash of unified_diff
as anchor might not be unique, and this way, clashes are actually
helpful.
---
diffoscope/presenters/html.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/diffoscope/presenters/html.py b/diffoscope/presenters/html.py
index 8bf76ee..d6c0d39 100644
--- a/diffoscope/presenters/html.py
+++ b/diffoscope/presenters/html.py
@@ -489,11 +489,11 @@ def output_unified_diff_table(print_func, unified_diff):
finally:
print_func(u"</table>", force=True)
-def output_unified_diff(print_func, directory, anchor, unified_diff):
+def output_unified_diff(print_func, directory, unified_diff):
if directory and len(unified_diff) > Config.general.separate_file_diff_size:
# open a new file for this table
- filename="%s.html" % hashlib.md5(anchor.encode('utf-8')).hexdigest()
- logger.debug('separate html output for diff of %s (size %d)', anchor, len(unified_diff))
+ filename="%s.html" % hashlib.md5(unified_diff.encode('utf-8')).hexdigest()
+ logger.debug('separate html output for diff of size %d', len(unified_diff))
with file_printer(directory, filename) as new_print_func:
output_unified_diff_table(new_print_func, unified_diff)
@@ -526,7 +526,7 @@ def output_difference(difference, print_func, directory, parents):
% u'<br />'.join(map(escape, difference.comments)))
print_func(u"</div>")
if difference.unified_diff:
- output_unified_diff(print_func, directory, anchor, difference.unified_diff)
+ output_unified_diff(print_func, directory, difference.unified_diff)
for detail in difference.details:
output_difference(detail, print_func, directory, sources)
except PrintLimitReached:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the Reproducible-commits
mailing list