Jump to >

reviewboard.diffviewer.myersdiff

class MyersDiffer(*args, **kwargs)[source]

Bases: reviewboard.diffviewer.differ.Differ

An implementation of Eugene Myers’s O(ND) Diff algorithm based on GNU diff.

SNAKE_LIMIT = 20[source]
DISCARD_NONE = 0[source]
DISCARD_FOUND = 1[source]
DISCARD_CANCEL = 2[source]
class DiffData(data)[source]
__init__(data)[source]
__init__(*args, **kwargs)[source]

x.__init__(…) initializes x; see help(type(x)) for signature

ratio()[source]
get_opcodes()[source]

Generator that returns opcodes representing the contents of the diff.

The resulting opcodes are in the format of (tag, i1, i2, j1, j2)