From 0fc698ed1654f9202181f6c38b87f19c25396749 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Guido=20G=C3=BCnther?= Date: Sat, 30 Jul 2011 15:46:02 +0200 Subject: [PATCH] doc: epydoc updates Git-Dch: Ignore --- gbp/git.py | 10 ++++++---- gbp/pq.py | 8 ++++++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/gbp/git.py b/gbp/git.py index 3880b47..c51f420 100644 --- a/gbp/git.py +++ b/gbp/git.py @@ -26,7 +26,7 @@ import dateutil.parser import calendar class GitRepositoryError(Exception): - """Exception thrown by GitRepository""" + """Exception thrown by L{GitRepository}""" pass @@ -404,7 +404,7 @@ class GitRepository(object): author={}, committer={}): """Replace the current tip of branch 'branch' with the contents from 'unpack_dir' @param unpack_dir: content to add - @type unpack_dir: striing + @type unpack_dir: string @param msg: commit message to use @type msg: string @param branch: branch to add the contents of unpack_dir to @@ -489,13 +489,15 @@ class GitRepository(object): return False def format_patches(self, start, end, output_dir): + """ + Output the commits between start and end as patches in output_dir + """ options = [ '-N', '-k', '-o', output_dir, '%s...%s' % (start, end) ] output, ret = self.__git_getoutput('format-patch', options) return [ line.strip() for line in output ] def apply_patch(self, patch, index=True, context=None, strip=None): """Apply a patch using git apply""" - args = [] if context: args += [ '-C', context ] @@ -515,7 +517,7 @@ class GitRepository(object): def has_submodules(self): - """Does the repo have submodules""" + """Does the repo have submodules?""" if os.path.exists('.gitmodules'): return True else: diff --git a/gbp/pq.py b/gbp/pq.py index 9cb85ae..429ceea 100644 --- a/gbp/pq.py +++ b/gbp/pq.py @@ -21,7 +21,7 @@ from errors import GbpError class Patch(object): """ - A patch in a patchqueue + A patch in a L{PatchQueue} @ivar path: path to the patch @type path: string @@ -46,9 +46,13 @@ class Patch(object): class PatchQueue(list): + """ + A series of L{Patch}es (e.g. as read from a quilt series file) + """ + @classmethod def read_series_file(klass, seriesfile): - """Read a series file into gbp.pq.Patch objects""" + """Read a series file into L{Patch} objects""" patch_dir = os.path.dirname(seriesfile) try: s = file(seriesfile) -- 2.7.4