Known subclasses: gbp.patch_series.Dep3Patch

A patch in a L{PatchSeries}

@ivar path: path to the patch
@type path: string
@ivar topic: the topic of the patch (the directory component)
@type topic: string
@ivar strip: path components to strip (think patch -p<strip>)
@type strip: integer
@ivar info: Information retrieved from a RFC822 style patch header
@type info: C{dict} with C{str} keys and values
@ivar long_desc: the long description of the patch
Method __init__ Undocumented
Method __repr__ Undocumented
Method subject The patch's subject, either from the patch header or from the filename.
Method author The patch's author
Method email The patch author's email address
Method date The patch's modification time
Method _read_info Undocumented
Method _read_git_mailinfo Read patch information into a structured form
Method _get_subject_from_filename Determine the patch's subject based on the its filename
Method _get_info_field Return the key I{key} from the info C{dict} or use val if I{key} is not a valid key.
def __init__(self, path, topic=None, strip=None):
Undocumented
def __repr__(self):
Undocumented
def _read_info(self):
Undocumented
def _read_git_mailinfo(self):
Read patch information into a structured form

using I{git mailinfo}
def _get_subject_from_filename(self):
Determine the patch's subject based on the its filename

>>> p = Patch('debian/patches/foo.patch')
>>> p._get_subject_from_filename()
'foo'
>>> Patch('foo.patch')._get_subject_from_filename()
'foo'
>>> Patch('debian/patches/foo.bar')._get_subject_from_filename()
'foo.bar'
>>> p = Patch('debian/patches/foo')
>>> p._get_subject_from_filename()
'foo'
>>> Patch('0123-foo.patch')._get_subject_from_filename()
'foo'
>>> Patch('0123.patch')._get_subject_from_filename()
'0123'
>>> Patch('0123-foo-0123.patch')._get_subject_from_filename()
'foo-0123'

@return: the patch's subject
@rtype: C{str}
def _get_info_field(self, key, get_val=None):
Return the key I{key} from the info C{dict}
or use val if I{key} is not a valid key.

Fill self.info if not already done.

@param key: key to fetch
@type key: C{str}
@param get_val: alternate value if key is not in info dict
@type get_val: C{()->str}
@property
def subject(self):
The patch's subject, either from the patch header or from the filename.
@property
def author(self):
The patch's author
@property
def email(self):
The patch author's email address
@property
def date(self):
The patch's modification time
API Documentation for git-buildpackage, generated by pydoctor at 2019-11-14 12:49:35.