Module b.diff

Part of bzrlib

No module docstring
Line # Kind Name Docs
63 Function internal_diff Undocumented
150 Function external_diff Display a diff by calling out to the external diff program.
394 Function show_diff_trees Show in text form the changes from one tree to another.
465 Function get_prop_change Undocumented
471 Function get_executable_change Undocumented
479 Class DiffPath Base type for command object that compare files
521 Class DiffKindChange Special differ for file kind changes.
556 Class DiffDirectory No class docstring; 1/1 methods documented
571 Class DiffSymlink No class docstring; 1/2 methods documented
609 Class DiffText No class docstring; 2/3 methods documented
679 Class DiffFromTool Undocumented
772 Class DiffTree Provides textual representations of the difference between two trees.
54 Class _PrematchedMatcher Allow SequenceMatcher operations to use predetermined blocks
113 Function _spawn_external_diff Spawn the externall diff process, and return the child handle.
278 Function _get_trees_to_diff Get the trees and specific files to diff given a list of paths.
362 Function _get_tree_to_diff Undocumented
379 Function _relative_paths_in_tree Get the relative paths within a working tree.
439 Function _patch_header_date Returns a timestamp suitable for use in a patch header.
445 Function _raise_if_nonexistent Complain if paths are not in either inventory or tree.
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_to_diff(path_list, revision_specs, old_url, new_url):
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.
Returnsa tuple of (old_tree, new_tree, specific_files, extra_trees) where extra_trees is a sequence of additional trees to search in for file-ids.
def _get_tree_to_diff(spec, tree=None, branch=None, basis_is_default=True):
Undocumented
def _relative_paths_in_tree(tree, paths):
Get the relative paths within a working tree.

Each path may be either an absolute path or a path relative to the current working directory.

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):

Show in text form the changes from one tree to another.

to_file
The output stream.
specific_files
Include only changes to these files - None for all changes.
external_diff_options
If set, use an external GNU diff and pass these options.
extra_trees
If set, more Trees to use for looking up file ids
path_encoding
If set, the path will be encoded as specified, otherwise is supposed to be utf8
def _patch_header_date(tree, file_id, path):
Returns a timestamp suitable for use in a patch header.
def _raise_if_nonexistent(paths, old_tree, new_tree):
Complain if paths are not in either inventory or tree.

It's OK with the files exist in either tree's inventory, or if they exist in the tree but are not versioned.

This can be used by operations such as bzr status that can accept unknown or ignored files.

@deprecated_function(one_three)
def get_prop_change(meta_modified):
Undocumented
def get_executable_change(old_is_x, new_is_x):
Undocumented
API Documentation for BzrLib, generated by pydoctor at 2008-06-25 00:00:15.