# `gbp.deb.changelog.ChangeLog(object)` class documentation

Part of `gbp.deb.changelog` (View In Hierarchy)

A Debian changelog

Method | __init__ | No summary
Method | __getitem__ | Undocumented
Method | __setitem__ | Undocumented
Method | filename | The filename (path) of the changelog
Method | name | The packages name
Method | version | The full version string
Method | distribution | Undocumented
Method | upstream_version | The upstream version
Method | debian_version | The Debian part of the version number
Method | epoch | The package's epoch
Method | noepoch | The version string without the epoch
Method | has_epoch | Whether the version has an epoch
Method | author | The author of the last modification
Method | email | The author's email
Method | date | The date of the last modification as rfc822 date
Method | sections_iter | Iterate over sections in the changelog
Method | sections | Get sections in the changelog
Static Method | spawn_dch | Spawn dch
Method | add_entry | Add a single changelog entry
Method | add_section | Add a new section to the changelog
Method | get_changes | Undocumented
Class Method | create | Create a new, empty changelog
Instance Variable | _contents | Undocumented
Instance Variable | _cp | Undocumented
Instance Variable | _filename | Undocumented
Method | _run_parsechangelog | Undocumented
Method | _parse | Parse a changelog based on the already read contents.
Method | _read | Undocumented
Static Method | _parse_maint | Parse maintainer

def __init__(self, contents=None, filename=None):

Parameters | contents | the contents of the changelog (type: `str`)
| filename | the filename of the changelog
| filename | `str`

_contents =
Undocumented
_cp =
Undocumented
_filename =
Undocumented
def _run_parsechangelog(self, options=None):
Undocumented
def _parse(self):

Parse a changelog based on the already read contents.

def _read(self):
Undocumented
def __getitem__(self, item):
Undocumented
def __setitem__(self, item, value):
Undocumented
@property
def filename(self):

The filename (path) of the changelog

@property
def name(self):

The packages name

@property
def version(self):

The full version string

@property
def distribution(self):
Undocumented
@property
def upstream_version(self):

The upstream version

@property
def debian_version(self):

The Debian part of the version number

@property
def epoch(self):

The package's epoch

@property
def noepoch(self):

The version string without the epoch

def has_epoch(self):

Whether the version has an epoch

Returns | `True` if the version has an epoch, `False` otherwise (type: `bool`)

@property
def author(self):

The author of the last modification

@property
def email(self):

The author's email

@property
def date(self):

The date of the last modification as rfc822 date

@property
def sections_iter(self):

Iterate over sections in the changelog

@property
def sections(self):

Get sections in the changelog

@staticmethod
def spawn_dch(msg=[], author=None, email=None, newversion=(False), version=None, release=(False), distribution=None, dch_options=None):

Spawn dch

Parameters | author | committers name (type: `str`)
| email | committers email (type: `str`)
| newversion | start a new version (type: `bool`)
| version | the verion to use (type: `str`)
| release | finalize changelog for releaze (type: `bool`)
| distribution | distribution to use (type: `str`)
| dch_options | options passed verbatim to dch (type: `list`)

def add_entry(self, msg, author=None, email=None, dch_options=[]):

Add a single changelog entry

Parameters | msg | log message to add (type: `str`)
| author | name of the author of the log message (type: `str`)
| email | email of the author of the log message (type: `str`)
| dch_options | options passed verbatim to dch (type: `list`)

def add_section(self, msg, distribution, author=None, email=None, version={}, dch_options=[]):

Add a new section to the changelog

Parameters | msg | log message to add (type: `str`)
| distribution | distribution to set for the new changelog entry (type: `str`)
| author | name of the author of the log message (type: `str`)
| email | email of the author of the log message (type: `str`)
| version | version to set for the new changelog entry
| version | `dict`
| dch_options | options passed verbatim to dch (type: `list`)

def get_changes(self, since="""0~"""):
Undocumented
@staticmethod
def _parse_maint(maintainer):

Parse maintainer

Mostly rfc822 but we allow for commas

@classmethod
def create(cls, package=None, version=None):

Create a new, empty changelog