b.diff : module documentation

Part of bzrlib

No module docstring
Class AtTemplate Templating class that uses @ instead of $.
Function internal_diff Undocumented
Function external_diff Display a diff by calling out to the external diff program.
Function get_trees_and_branches_to_diff_locked Get the trees and specific files to diff given a list of paths.
Function show_diff_trees Show in text form the changes from one tree to another.
Function get_executable_change Undocumented
Class DiffPath Base type for command object that compare files
Class DiffKindChange Special differ for file kind changes.
Class DiffDirectory No class docstring; 1/1 methods documented
Class DiffSymlink No class docstring; 1/2 methods documented
Class DiffText No class docstring; 2/3 methods documented
Class DiffFromTool No class docstring; 0/2 class methods, 3/11 methods, 1/1 static methods documented
Class DiffTree Provides textual representations of the difference between two trees.
Class _PrematchedMatcher Allow SequenceMatcher operations to use predetermined blocks
Function _spawn_external_diff Spawn the externall diff process, and return the child handle.
Function _get_tree_to_diff Undocumented
Function _patch_header_date Returns a timestamp suitable for use in a patch header.
def internal_diff(old_filename, oldlines, new_filename, newlines, to_file, allow_binary=False, sequence_matcher=None, path_encoding='utf8'):
Undocumented
def _spawn_external_diff(diffcmd, capture_errors=True):
Spawn the externall diff process, and return the child handle.
ParametersdiffcmdThe command list to spawn
capture_errorsCapture stderr as well as setting LANG=C and LC_ALL=C. This lets us read and understand the output of diff, and respond to any errors.
ReturnsA Popen object.
def external_diff(old_filename, oldlines, new_filename, newlines, to_file, diff_opts):
Display a diff by calling out to the external diff program.
def get_trees_and_branches_to_diff_locked(path_list, revision_specs, old_url, new_url, add_cleanup, apply_view=True):
Get the trees and specific files to diff given a list of paths.

This method works out the trees to be diff'ed and the files of interest within those trees.

Parameterspath_listthe list of arguments passed to the diff command
revision_specsZero, one or two RevisionSpecs from the diff command line, saying what revisions to compare.
old_urlThe url of the old branch or tree. If None, the tree to use is taken from the first path, if any, or the current working tree.
new_urlThe url of the new branch or tree. If None, the tree to use is taken from the first path, if any, or the current working tree.
add_cleanupa callable like Command.add_cleanup. get_trees_and_branches_to_diff will register cleanups that must be run to unlock the trees, etc.
apply_viewif True and a view is set, apply the view or check that the paths are within it
Returnsa tuple of (old_tree, new_tree, old_branch, new_branch, specific_files, extra_trees) where extra_trees is a sequence of additional trees to search in for file-ids. The trees and branches will be read-locked until the cleanups registered via the add_cleanup param are run.
def _get_tree_to_diff(spec, tree=None, branch=None, basis_is_default=True):
Undocumented
def show_diff_trees(old_tree, new_tree, to_file, specific_files=None, external_diff_options=None, old_label='a/', new_label='b/', extra_trees=None, path_encoding='utf8', using=None, format_cls=None):
Show in text form the changes from one tree to another.
Parametersto_fileThe output stream.
specific_filesInclude only changes to these files - None for all changes.
external_diff_optionsIf set, use an external GNU diff and pass these options.
extra_treesIf set, more Trees to use for looking up file ids
path_encodingIf set, the path will be encoded as specified, otherwise is supposed to be utf8
format_clsFormatter class (DiffTree subclass)
def _patch_header_date(tree, file_id, path):
Returns a timestamp suitable for use in a patch header.
def get_executable_change(old_is_x, new_is_x):
Undocumented
API Documentation for Bazaar, generated by pydoctor at 2019-12-10 00:55:09.