l.c.m.d.Diff(SQLBase) : class documentation

Part of lp.code.model.diff View In Hierarchy

See IDiff.
Method text Undocumented
Method oversized Undocumented
Class Method mergePreviewFromBranches Generate a merge preview diff from the supplied branches.
Class Method fromTrees Create a Diff from two Bazaar trees.
Class Method fromFileAtEnd Make a Diff from a file object that is currently at its end.
Class Method fromFile Create a Diff from a textual diff.
Static Method generateDiffstat Generate statistics about the provided diff.
Class Method generateIncrementalDiff Return a Diff whose contents are an incremental diff.
Method _get_diffstat Undocumented
Method _set_diffstat Undocumented
Class Method _getMergedTree Return a tree that is the result of a merge.
Static Method _getLCA Return the unique LCA of two branches.

Inherited from SQLBase:

Method __init__ Extended version of the SQLObjectBase constructor.
Method __repr__ Undocumented
Method destroySelf Undocumented
Method __eq__ Equality operator.
Method __ne__ Inverse of __eq__.
Method __storm_invalidated__ Flush cached properties.
Class Method _get_store Undocumented
def _get_diffstat(self):
Undocumented
def _set_diffstat(self, diffstat):
Undocumented
@property
def text(self):
Undocumented
@property
def oversized(self):
Undocumented
@classmethod
def mergePreviewFromBranches(cls, source_branch, source_revision, target_branch, prerequisite_branch=None):
Generate a merge preview diff from the supplied branches.
Parameterssource_branchThe branch that will be merged.
source_revisionThe revision_id of the revision that will be merged.
target_branchThe branch that the source will merge into.
prerequisite_branchThe branch that should be merged before merging the source.
ReturnsA tuple of (Diff, ConflictList) for a merge preview.
@classmethod
def _getMergedTree(cls, source_branch, source_revision, target_branch, merge_target, cleanups):
Return a tree that is the result of a merge.
Parameterssource_branchThe branch to merge.
source_revisionThe revision_id of the revision to merge.
target_branchThe branch to merge into.
merge_targetThe tree to merge into.
cleanupsA list of cleanup operations to run when all operations are complete. This will be appended to.
Returnsa tuple of a tree and the resulting conflicts.
@staticmethod
def _getLCA(source_branch, source_revision, target_branch):
Return the unique LCA of two branches.
Parameterssource_branchThe branch to merge.
source_revisionThe revision of the source branch.
target_branchThe branch to merge into.
@classmethod
def fromTrees(klass, from_tree, to_tree, filename=None):
Create a Diff from two Bazaar trees.
Unknown Field: from_treeThe old tree in the diff.
Unknown Field: to_treeThe new tree in the diff.
@classmethod
def fromFileAtEnd(cls, diff_content, filename=None):
Make a Diff from a file object that is currently at its end.
@classmethod
def fromFile(cls, diff_content, size, filename=None, strip_prefix_segments=0):
Create a Diff from a textual diff.
Unknown Field: diff_contentThe diff text
Unknown Field: sizeThe number of bytes in the diff text.
Unknown Field: filenameThe filename to store the content with. Randomly generated if not supplied.
@staticmethod
def generateDiffstat(diff_bytes, strip_prefix_segments=0):
Generate statistics about the provided diff.
Parametersdiff_bytesA unified diff, as bytes.
strip_prefix_segmentsStrip the smallest prefix containing this many leading slashes from each file name found in the patch file, as with "patch -p".
ReturnsA map of {filename: (added_line_count, removed_line_count)}
@classmethod
def generateIncrementalDiff(cls, old_revision, new_revision, source_branch, ignore_branches):
Return a Diff whose contents are an incremental diff.

The Diff's contents will show the changes made between old_revision and new_revision, except those changes introduced by the ignore_branches.

Parametersold_revisionThe Revision to show changes from.
new_revisionThe Revision to show changes to.
source_branchThe bzr branch containing these revisions.
ignore_brancesA collection of branches to ignore merges from.
Returnsa Diff.
API Documentation for Launchpad, generated by pydoctor at 2019-02-22 00:00:05.