Part of bzrlib.diff View In Hierarchy
A DiffTree examines two trees and where a file-id has altered between them, generates a textual representation of the difference. DiffTree uses a sequence of DiffPath objects which are each given the opportunity to handle a given altered fileid. The list of DiffPath objects can be extended globally by appending to DiffTree.diff_factories, or for a specific diff operation by supplying the extra_factories option to the appropriate method.
Method | __init__ | Constructor |
Class Method | from_trees_options | Factory for producing a DiffTree. |
Method | show_diff | Write tree diff to self.to_file |
Method | diff | Perform a diff of a single file |
Method | _show_diff | Undocumented |
Method | _diff | Undocumented |
Parameters | old_tree | Tree to show as old in the comparison |
new_tree | Tree to show as new in the comparison | |
to_file | File to write comparision to | |
path_encoding | Character encoding to write paths in | |
diff_text | DiffPath-type object to use as a last resort for diffing text files. | |
extra_factories | Factories of DiffPaths to try before any other DiffPaths |
Designed to accept options used by show_diff_trees.
Parameters | old_tree | The tree to show as old in the comparison |
new_tree | The tree to show as new in the comparison | |
to_file | File to write comparisons to | |
path_encoding | Character encoding to use for writing paths | |
external_diff_options | If supplied, use the installed diff binary to perform file comparison, using supplied options. | |
old_label | Prefix to use for old file labels | |
new_label | Prefix to use for new file labels | |
using | Commandline to use to invoke an external diff tool |
Parameters | specific_files | the specific files to compare (recursive) |
extra_trees | extra trees to use for mapping paths to file_ids |