b.m.MergeDirective(BaseMergeDirective) : class documentation

Part of bzrlib.merge_directive View In Hierarchy

A request to perform a merge into a branch.

Designed to be serialized and mailed. It provides all the information needed to perform a merge automatically, by providing at minimum a revision bundle or the location of a branch.

The serialization format is robust against certain common forms of deterioration caused by mailing.

The format is also designed to be patch-compatible. If the directive includes a diff or revision bundle, it should be possible to apply it directly using the standard patch program.

Method __init__ Constructor.
Method clear_payload Undocumented
Method get_raw_bundle Return the bundle for this merge directive.
Class Method from_lines Deserialize a MergeRequest from an iterable of lines
Method to_lines Serialize as a list of lines
Method get_merge_request Provide data for performing a merge
Method _bundle Undocumented
Class Method _from_lines Undocumented
Static Method _generate_bundle Undocumented

Inherited from BaseMergeDirective:

Method to_files Serialize as a set of files.
Method write_to_directory Write this merge directive to a series of files in a directory.
Class Method from_objects Generate a merge directive from various objects
Method get_disk_name Generate a suitable basename for storing this directive on disk
Method to_signed Serialize as a signed string.
Method to_email Serialize as an email message.
Method install_revisions Install revisions and return the target revision
Method compose_merge_request Compose a request to merge this directive.
Method _to_lines Serialize as a list of lines
Static Method _generate_diff Undocumented
def __init__(self, revision_id, testament_sha1, time, timezone, target_branch, patch=None, patch_type=None, source_branch=None, message=None, bundle=None):
Constructor.
Parametersrevision_idThe revision to merge
testament_sha1The sha1 of the testament of the revision to merge.
timeThe current POSIX timestamp time
timezoneThe timezone offset
target_branchThe branch to apply the merge to
patchThe text of a diff or bundle
patch_typeNone, "diff" or "bundle", depending on the contents of patch
source_branchA public location to merge the revision from
messageThe message to use when committing this merge
def clear_payload(self):
Undocumented
def get_raw_bundle(self):
Return the bundle for this merge directive.
Returnsbundle text or None if there is no bundle
def _bundle(self):
Undocumented
@classmethod
def from_lines(klass, lines):
Deserialize a MergeRequest from an iterable of lines
ParameterslinesAn iterable of lines
Returnsa MergeRequest
@classmethod
def _from_lines(klass, line_iter):
Undocumented
def to_lines(self):
Serialize as a list of lines
Returnsa list of lines
@staticmethod
def _generate_bundle(repository, revision_id, ancestor_id):
Undocumented
def get_merge_request(self, repository):
Provide data for performing a merge

Returns suggested base, suggested target, and patch verification status

API Documentation for Bazaar, generated by pydoctor at 2022-06-16 00:25:16.