[Reproducible-commits] [debbindiff] 02/03: Remove dead code from HTML presenter
Jérémy Bobbio
lunar at moszumanska.debian.org
Sat Mar 28 09:57:26 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 eb0a4267920df1c8080e11f8b0bfcf1f37c29185
Author: Jérémy Bobbio <lunar at debian.org>
Date: Sat Mar 28 10:56:36 2015 +0100
Remove dead code from HTML presenter
---
debbindiff/presenters/html.py | 56 -------------------------------------------
1 file changed, 56 deletions(-)
diff --git a/debbindiff/presenters/html.py b/debbindiff/presenters/html.py
index 71a9483..cbfe65c 100644
--- a/debbindiff/presenters/html.py
+++ b/debbindiff/presenters/html.py
@@ -253,62 +253,6 @@ def linediff(s, t):
return r1, r2
-def diff_changed(old, new):
- '''
- Returns the differences basend on characters between two strings
- wrapped with DIFFON and DIFFOFF using `diff`.
- '''
- con = {'=': (lambda x: x),
- '+': (lambda x: DIFFON + x + DIFFOFF),
- '-': (lambda x: '')}
- return "".join([(con[a])("".join(b)) for a, b in diff(old, new)])
-
-
-def diff_changed_ts(old, new):
- '''
- Returns a tuple for a two sided comparison based on characters, see `diff_changed`.
- '''
- return (diff_changed(new, old), diff_changed(old, new))
-
-
-def word_diff(old, new):
- '''
- Returns the difference between the old and new strings based on words. Punctuation is not part of the word.
-
- Params:
- old the old string
- new the new string
-
- Returns:
- the output of `diff` on the two strings after splitting them
- on whitespace (a list of change instructions; see the docstring
- of `diff`)
- '''
- separator_pattern = '(\W+)';
- return diff(re.split(separator_pattern, old, flags=re.UNICODE), re.split(separator_pattern, new, flags=re.UNICODE))
-
-
-def diff_changed_words(old, new):
- '''
- Returns the difference between two strings based on words (see `word_diff`)
- wrapped with DIFFON and DIFFOFF.
-
- Returns:
- the output of the diff expressed delimited with DIFFON and DIFFOFF.
- '''
- con = {'=': (lambda x: x),
- '+': (lambda x: DIFFON + x + DIFFOFF),
- '-': (lambda x: '')}
- return "".join([(con[a])("".join(b)) for a, b in word_diff(old, new)])
-
-
-def diff_changed_words_ts(old, new):
- '''
- Returns a tuple for a two sided comparison based on words, see `diff_changed_words`.
- '''
- return (diff_changed_words(new, old), diff_changed_words(old, new))
-
-
def convert(s, linesize=0, ponct=0):
i = 0
t = u""
--
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