get_filtered_hunks, get_hunks are low-level wrappers for Python’s difflib.SequenceMatcher, and they generate groups of opcodes corresponding to diff “hunks”.
get_change_extent is a low-level utility used when marking intra-lines differences.
diff_blocks is used at a higher-level to fill the template data needed by the “diff_div.html” template.
unified_diff is also a higher-level function returning differences following the unified diff file format.
Finally, get_diff_options is an utility for retrieving user diff preferences from a Request.
Determines the extent of differences between two strings.
Returns a pair containing the offset at which the changes start, and the negative offset at which the changes end.
If the two strings have neither a common prefix nor a common suffix, (0, 0) is returned.
Retrieve differences in the form of difflib.SequenceMatcher opcodes, grouped according to the context and ignore_* parameters.
Parameters: |
|
---|---|
Returns: | generator of grouped difflib.SequenceMatcher opcodes |
If none of the ignore_* parameters is True, there’s nothing to filter out the results will come straight from the SequenceMatcher.
Generator yielding grouped opcodes describing differences .
See get_filtered_hunks for the parameter descriptions.
Deprecated: | use diff_blocks (will be removed in 1.1.1) |
---|
Return an array that is adequate for adding to the data dictionary
See get_filtered_hunks for the parameter descriptions.
See also the diff_div.html template.
Generator producing lines corresponding to a textual diff.
See get_filtered_hunks for the parameter descriptions.
Retrieve user preferences for diffs.
Returns: | (style, options, data) triple.
|
---|