Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(109)

Issue 13418045: Unified method for text diff for all Content types (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 8 months ago by ana.balica
Modified:
10 years, 8 months ago
Reviewers:
thomas.j.waldmann
Visibility:
Public.

Description

For text-like content types return a text diff and for all other types return an empty list. Useful for a homogeneous treatment of item contents while creating a content diff for a mail notification.

Patch Set 1 #

Total comments: 9

Patch Set 2 : Change docstrings #

Patch Set 3 : Fix import order #

Patch Set 4 : Change method name and docstring about return #

Patch Set 5 : File objects as params instead of strings #

Total comments: 8

Patch Set 6 : Use py3-compatible io module #

Patch Set 7 : Docstring from base class #

Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -0 lines) Patch
M MoinMoin/items/_tests/test_Content.py View 1 2 3 4 5 2 chunks +23 lines, -0 lines 0 comments Download
M MoinMoin/items/content.py View 1 2 3 4 5 6 3 chunks +21 lines, -0 lines 0 comments Download

Messages

Total messages: 7
Thomas.J.Waldmann
https://codereview.appspot.com/13418045/diff/1/MoinMoin/items/_tests/test_Content.py File MoinMoin/items/_tests/test_Content.py (right): https://codereview.appspot.com/13418045/diff/1/MoinMoin/items/_tests/test_Content.py#newcode281 MoinMoin/items/_tests/test_Content.py:281: assert difflines == [] ? how should this work ...
10 years, 8 months ago (2013-09-05 21:08:53 UTC) #1
ana.balica
https://codereview.appspot.com/13418045/diff/1/MoinMoin/items/_tests/test_Content.py File MoinMoin/items/_tests/test_Content.py (right): https://codereview.appspot.com/13418045/diff/1/MoinMoin/items/_tests/test_Content.py#newcode281 MoinMoin/items/_tests/test_Content.py:281: assert difflines == [] On 2013/09/05 21:08:53, Thomas.J.Waldmann wrote: ...
10 years, 8 months ago (2013-09-05 21:27:12 UTC) #2
Thomas.J.Waldmann
On 2013/09/05 21:27:12, ana.balica wrote: > https://codereview.appspot.com/13418045/diff/1/MoinMoin/items/_tests/test_Content.py > File MoinMoin/items/_tests/test_Content.py (right): > > https://codereview.appspot.com/13418045/diff/1/MoinMoin/items/_tests/test_Content.py#newcode281 > ...
10 years, 8 months ago (2013-09-05 21:38:04 UTC) #3
Thomas.J.Waldmann
10 years, 8 months ago (2013-09-05 21:38:11 UTC) #4
Thomas.J.Waldmann
https://codereview.appspot.com/13418045/diff/15001/MoinMoin/items/_tests/test_Content.py File MoinMoin/items/_tests/test_Content.py (right): https://codereview.appspot.com/13418045/diff/15001/MoinMoin/items/_tests/test_Content.py#newcode11 MoinMoin/items/_tests/test_Content.py:11: from StringIO import StringIO maybe rather use the py3-compatible ...
10 years, 8 months ago (2013-09-06 15:10:51 UTC) #5
ana.balica
https://codereview.appspot.com/13418045/diff/15001/MoinMoin/items/content.py File MoinMoin/items/content.py (right): https://codereview.appspot.com/13418045/diff/15001/MoinMoin/items/content.py#newcode874 MoinMoin/items/content.py:874: return diff(old_text.splitlines(), new_text.splitlines()) On 2013/09/06 15:10:51, Thomas.J.Waldmann wrote: > ...
10 years, 8 months ago (2013-09-06 17:27:20 UTC) #6
Thomas.J.Waldmann
10 years, 8 months ago (2013-09-07 18:19:25 UTC) #7
https://codereview.appspot.com/13418045/diff/15001/MoinMoin/items/content.py
File MoinMoin/items/content.py (right):

https://codereview.appspot.com/13418045/diff/15001/MoinMoin/items/content.py#...
MoinMoin/items/content.py:874: return diff(old_text.splitlines(),
new_text.splitlines())
well, you said that you can't do what you want with that interface, so it'll
either need change or would stay inconsistent.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b