Menu

Commit [r10574]  Maximize  Restore  History

versioncontrol: refactor the `diff` module

While marking `hdf_diff` as deprecated, I noticed that
`_grouped_opcodes()` was introduced to compensate for the lack
of `SequenceMatcher.get_grouped_opcodes()` method in Python 2.2.

Now we can use it, but we can't throw away `_grouped_opcodes()`
completely either, as we need it in case the groups need to be
reformed if changes have been filtered out due to the `ignore_*`
options.

When no ignore options is set, we just return the opcodes directly
from the `SequenceMatcher`.

cboos 2011-02-20

added /trunk/doc/api/trac_versioncontrol_diff.rst
changed /trunk/trac/versioncontrol/diff.py
changed /trunk/trac/versioncontrol/tests/diff.py
/trunk/doc/api/trac_versioncontrol_diff.rst Diff Switch to side-by-side view
Loading...
/trunk/trac/versioncontrol/diff.py Diff Switch to side-by-side view
Loading...
/trunk/trac/versioncontrol/tests/diff.py Diff Switch to side-by-side view
Loading...
MongoDB Logo MongoDB