reviewboard.diffviewer.differ¶
- class DiffCompatVersion¶
Bases:
object
- SMDIFFER = 0¶
- MYERS = 1¶
- MYERS_SMS_COST_BAIL = 2¶
- DEFAULT = 2¶
- MYERS_VERSIONS = (1, 2)¶
- class Differ(a, b, ignore_space=False, compat_version=None)¶
Bases:
object
Base class for differs.
- __init__(a, b, ignore_space=False, compat_version=None)¶
- add_interesting_line_regex(name, regex)¶
Registers a regular expression used to look for interesting lines.
All interesting lines found that match the regular expression will be stored and tagged with the given name. Callers can use get_interesting_lines to get the results.
- add_interesting_lines_for_headers(filename)¶
Registers for interesting lines for headers based on filename.
This is a convenience over add_interesting_line_regex that will watch for headers (functions, classes, etc.) for the file type matching the given filename.
- get_interesting_lines(name, is_modified_file)¶
Returns the interesting lines tagged with the given name.
- get_opcodes()¶
- get_differ(a, b, ignore_space=False, compat_version=2)¶
Returns a differ for with the given settings.
By default, this will return the MyersDiffer. Older differs can be used by specifying a compat_version, but this is only for really ancient diffs, currently.