Jump to >

This documentation covers Review Board 2.5. You can see the latest Review Board documentation or all other versions.

reviewboard.diffviewer.differ

class DiffCompatVersion[source]

Bases: object

SMDIFFER = 0[source]
MYERS = 1[source]
MYERS_SMS_COST_BAIL = 2[source]
DEFAULT = 2[source]
MYERS_VERSIONS = (1, 2)[source]
class Differ(a, b, ignore_space=False, compat_version=None)[source]

Bases: object

Base class for differs.

__init__(a, b, ignore_space=False, compat_version=None)[source]
add_interesting_line_regex(name, regex)[source]

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)[source]

Registers for interesting lines for headers based on filename.

This is a convenience over add_interesting_line_regex that will watch for headers (functions, clases, etc.) for the file type matching the given filename.

get_interesting_lines(name, is_modified_file)[source]

Returns the interesting lines tagged with the given name.

get_opcodes()[source]
get_differ(a, b, ignore_space=False, compat_version=2)[source]

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.