A series of Patches as read from a quilt series file).

Class Method read_series_file Read a series file into Patch objects
Class Method _read_series Read patch series
Static Method _get_topic Get the topic from the patch's path
Static Method _split_strip Separate the -p<num> option from the patch name
Class Method _parse_line Parse a single line from a series file
@classmethod
def read_series_file(klass, seriesfile):

Read a series file into Patch objects

@classmethod
def _read_series(klass, series, patch_dir):

Read patch series

>>> PatchSeries._read_series(['a/b',                             'a -p1',                             'a/b -p2'], '.') # doctest:+NORMALIZE_WHITESPACE
[<gbp.patch_series.Patch path='./a/b' topic='a' >,
 <gbp.patch_series.Patch path='./a' strip=1 >,
 <gbp.patch_series.Patch path='./a/b' topic='a' strip=2 >]
>>> PatchSeries._read_series(['# foo', 'a/b', '', '# bar'], '.')
[<gbp.patch_series.Patch path='./a/b' topic='a' >]
Parametersseriesseries of patches in quilt format (type: iterable of strings)
patch_dirpath prefix to prepend to each patch path (type: string)
@staticmethod
def _get_topic(line):

Get the topic from the patch's path

>>> PatchSeries._get_topic("a/b c")
'a'
>>> PatchSeries._get_topic("asdf")
>>> PatchSeries._get_topic("/asdf")
@staticmethod
def _split_strip(line):

Separate the -p<num> option from the patch name

>>> PatchSeries._split_strip("asdf -p1")
('asdf', 1)
>>> PatchSeries._split_strip("a/nice/patch")
('a/nice/patch', None)
>>> PatchSeries._split_strip("asdf foo")
('asdf foo', None)
@classmethod
def _parse_line(klass, line, patch_dir):

Parse a single line from a series file

>>> PatchSeries._parse_line("a/b -p1", '/tmp/patches')
<gbp.patch_series.Patch path='/tmp/patches/a/b' topic='a' strip=1 >
>>> PatchSeries._parse_line("a/b", '.')
<gbp.patch_series.Patch path='./a/b' topic='a' >
API Documentation for git-buildpackage, generated by pydoctor at 2020-05-22 08:50:00.