Skip to content

Commit

Permalink
Merge pull request #61 from La0/patience
Browse files Browse the repository at this point in the history
Use patience diff algorithm
  • Loading branch information
djmitche authored Feb 5, 2020
2 parents f809707 + 6262861 commit 9429443
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
8 changes: 8 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@ packaging==19.2 \
--hash=sha256:28b924174df7a2fa32c1953825ff29c61e2f5e082343165438812f00d3a7fc47 \
--hash=sha256:d9551545c6d761f3def1677baf08ab2a3ca17c56879e70fecba2fc4dde4ed108 \
# via pytest
patiencediff==0.1.0 \
--hash=sha256:050eec9ab2bf6901559aff5d5fdc9a5f55a391e68959a3802ff8f29ae123974b \
--hash=sha256:0ef76135639659a2bdbfa3a10cfae9e4753302838a62d083db8b44eab3de5547 \
--hash=sha256:2f5f96358a70ad81220104c9477a401c86cc342abbd14cb89405448311f53e09 \
--hash=sha256:7cd316f57f7b4086923cc0db80273886416134d82945dddd0aa24f0e95c7d302 \
--hash=sha256:956bbd7451044e8902cdde671c24429c242b035a42d5f40f3c547223d0badba2 \
--hash=sha256:bfb5bf7f5b494ba3a02d64a034ca76a9d90cee73b9a9a2b8318a9eaa00331306 \
--hash=sha256:cc85f98291a2555f33764c7d16ca853754669d5117ce0f3e0066a966761d0962
pluggy==0.13.0 \
--hash=sha256:0db4b7601aae1d35b4a033282da476845aa19185c1e6964b25cf324b5e4ec3e6 \
--hash=sha256:fa5fa1622fa6dd5c030e9cad086fa19ef6a0cf6d7a2d12318e10cb49d6d68f34 \
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"aiohttp~=2.3.10",
"pytest~=5.2",
"pyyaml~=4.2b1",
"patiencediff==0.1.0",
],
setup_requires=["pytest-runner", "flake8"],
tests_require=["pytest", "pytest-mock", "pytest-asyncio~=0.10.0", "flake8"],
Expand Down
4 changes: 2 additions & 2 deletions tcadmin/diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import re
import click
import difflib
import patiencediff
import blessings
import attr

Expand Down Expand Up @@ -95,7 +95,7 @@ def contextualize(rangeInfo):
return match.group(1)
return ""

lines = difflib.unified_diff(
lines = patiencediff.unified_diff(
left, right, lineterm="", fromfile="current", tofile="generated", n=context
)
colors = {
Expand Down

0 comments on commit 9429443

Please sign in to comment.