module documentation

Generate Debian changelog entries from Git commit messages

Function build_parser Undocumented
Function changelog_commit_msg Undocumented
Function create_changelog Undocumented
Function do_release Remove the snapshot header and set the distribution
Function do_snapshot Add new snapshot banner to most recent changelog section. The next snapshot number is calculated by eval()'ing next_snapshot.
Function fixup_section Fixup the changelog header and trailer's committer and email address
Function get_author_email Get author and email from git configuration
Function get_customizations Undocumented
Function guess_documented_commit Guess the last commit documented in the changelog from the snapshot banner, the last tagged version or the last point the changelog was touched.
Function guess_version_from_upstream Guess the version based on the latest version on the upstream branch. If the version in dch is already higher this function returns None.
Function has_snapshot_banner Whether the changelog has a snapshot banner
Function main Undocumented
Function mangle_changelog Mangle changelog to either add or remove snapshot markers
Function maybe_create_changelog Get the changelog or create a new one if it does not exist yet
Function parse_args Undocumented
Function parse_commit Parse a commit and return message, author, and author email
Function process_editor_option Determine text editor and check if we need it
Function process_options Undocumented
Function snapshot_version Get the current release and snapshot version.
Variable snapshot_re Undocumented
Variable user_customizations Undocumented
def build_parser(name):

Undocumented

def changelog_commit_msg(options, version):

Undocumented

def create_changelog(repo, source, options):

Undocumented

def do_release(changelog, repo, cp, use_git_author, dch_options):

Remove the snapshot header and set the distribution

def do_snapshot(changelog, repo, next_snapshot):

Add new snapshot banner to most recent changelog section. The next snapshot number is calculated by eval()'ing next_snapshot.

def fixup_section(repo, use_git_author, options, dch_options):

Fixup the changelog header and trailer's committer and email address

It might otherwise point to the last git committer instead of the person creating the changelog

This also applies --distribution and --urgency options passed to gbp dch

def get_author_email(repo, use_git_config):

Get author and email from git configuration

def get_customizations(customization_file):

Undocumented

def guess_documented_commit(cp, repo, tagformat):

Guess the last commit documented in the changelog from the snapshot banner, the last tagged version or the last point the changelog was touched.

Parameters
cpthe changelog
repothe git repository
tagformatthe format for Debian tags
Returns
strthe commit that was last documented in the changelog
Raises
GbpErrorIn case we fail to find a commit to start at
def guess_version_from_upstream(repo, upstream_tag_format, upstream_branch, cp=None):

Guess the version based on the latest version on the upstream branch. If the version in dch is already higher this function returns None.

def has_snapshot_banner(cp):

Whether the changelog has a snapshot banner

def main(argv):

Undocumented

def mangle_changelog(changelog, cp, snapshot=''):

Mangle changelog to either add or remove snapshot markers

Parameters
changelogUndocumented
cpUndocumented
snapshot:strSHA1 if snapshot header should be added/maintained, empty if it should be removed
def maybe_create_changelog(repo, source, options):

Get the changelog or create a new one if it does not exist yet

def parse_args(argv):

Undocumented

def parse_commit(repo, commitid, opts, last_commit=False):

Parse a commit and return message, author, and author email

def process_editor_option(options):

Determine text editor and check if we need it

def process_options(options, parser):

Undocumented

def snapshot_version(version):

Get the current release and snapshot version.

Format is <debian-version>~<release>.gbp<short-commit-id>

>>> snapshot_version('1.0-1')
('1.0-1', 0)
>>> snapshot_version('1.0-1~1.test0')
('1.0-1~1.test0', 0)
>>> snapshot_version('1.0-1~2.gbp1234')
('1.0-1', 2)
snapshot_re =

Undocumented

user_customizations: typing.Dict[str, str] =

Undocumented