b.msgeditor : module documentation

Part of bzrlib

Commit message editor support.
Function edit_commit_message Let the user edit a commit message in a temp file.
Function edit_commit_message_encoded Let the user edit a commit message in a temp file.
Function make_commit_message_template Prepare a template file for a commit into a branch.
Function make_commit_message_template_encoded Prepare a template file for a commit into a branch.
Class MessageEditorHooks A dictionary mapping hook name to a list of callables for message editor
Function set_commit_message Sets the commit message.
Function generate_commit_message_template Generate a commit message template.
Function _get_editor Return a sequence of possible editor binaries for the current platform
Function _run_editor Try to execute an editor to edit the commit message.
Function _create_temp_file_with_commit_template Create temp file and write commit template in it.
def _get_editor():
Return a sequence of possible editor binaries for the current platform
def _run_editor(filename):
Try to execute an editor to edit the commit message.
def edit_commit_message(infotext, ignoreline=DEFAULT_IGNORE_LINE, start_message=None):
Let the user edit a commit message in a temp file.

This is run if they don't give a message or message-containing file on the command line.

ParametersinfotextText to be displayed at bottom of message for the user's reference; currently similar to 'bzr status'.
ignorelineThe separator to use above the infotext.
start_messageThe text to place above the separator, if any. This will not be removed from the message after the user has edited it.
Returnscommit message or None.
def edit_commit_message_encoded(infotext, ignoreline=DEFAULT_IGNORE_LINE, start_message=None):
Let the user edit a commit message in a temp file.

This is run if they don't give a message or message-containing file on the command line.

ParametersinfotextText to be displayed at bottom of message for the user's reference; currently similar to 'bzr status'. The string is already encoded
ignorelineThe separator to use above the infotext.
start_messageThe text to place above the separator, if any. This will not be removed from the message after the user has edited it. The string is already encoded
Returnscommit message or None.
def _create_temp_file_with_commit_template(infotext, ignoreline=DEFAULT_IGNORE_LINE, start_message=None, tmpdir=None):
Create temp file and write commit template in it.
ParametersinfotextText to be displayed at bottom of message for the user's reference; currently similar to 'bzr status'. The text is already encoded.
ignorelineThe separator to use above the infotext.
start_messageThe text to place above the separator, if any. This will not be removed from the message after the user has edited it. The string is already encoded
Returns2-tuple (temp file name, hasinfo)
def make_commit_message_template(working_tree, specific_files):
Prepare a template file for a commit into a branch.

Returns a unicode string containing the template.

def make_commit_message_template_encoded(working_tree, specific_files, diff=None, output_encoding='utf-8'):
Prepare a template file for a commit into a branch.

Returns an encoded string.

def set_commit_message(commit, start_message=None):
Sets the commit message. :param commit: Commit object for the active commit. :return: The commit message or None to continue using the message editor
def generate_commit_message_template(commit, start_message=None):
Generate a commit message template.
ParameterscommitCommit object for the active commit.
start_messageMessage to start with.
ReturnsA start commit message or None for an empty start commit message.
API Documentation for Bazaar, generated by pydoctor at 2022-06-16 00:25:16.