From 9ccd777c386704911734ae4c33a922a5682ac6c8 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Tue, 23 Nov 2010 16:32:43 +0100 Subject: [PATCH] Documentation is now being built for all new modules --- doc/source/changes.rst | 4 ++++ doc/source/conf.py | 2 +- doc/source/reference.rst | 41 +++++++++++++++++++++++++++++++++++++--- doc/source/tutorial.rst | 8 ++++++++ index/base.py | 2 -- index/fun.py | 7 +++---- refs/head.py | 1 - remote.py | 3 ++- 8 files changed, 56 insertions(+), 12 deletions(-) diff --git a/doc/source/changes.rst b/doc/source/changes.rst index 563fb46be..de872e2d3 100644 --- a/doc/source/changes.rst +++ b/doc/source/changes.rst @@ -2,6 +2,10 @@ Changelog ========= +0.3.2 Beta 2 +============ +* Added reflog support ( reading and writing ) + 0.3.2 Beta 1 ============ * Flattened directory structure to make development more convenient. diff --git a/doc/source/conf.py b/doc/source/conf.py index e80bd0aaa..469ab3b3c 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -20,7 +20,7 @@ # is relative to the documentation root, use os.path.abspath to make it # absolute, like shown here. #sys.path.append(os.path.abspath('.')) -sys.path.insert(0, os.path.abspath('../../lib')) +sys.path.insert(0, os.path.abspath('../../../')) # General configuration # --------------------- diff --git a/doc/source/reference.rst b/doc/source/reference.rst index 75e712a84..7adc53287 100644 --- a/doc/source/reference.rst +++ b/doc/source/reference.rst @@ -131,13 +131,48 @@ Exceptions :undoc-members: -Refs ----- +Refs.symbolic +------------- + +.. automodule:: git.refs.symbolic + :members: + :undoc-members: + +Refs.reference +-------------- -.. automodule:: git.refs +.. automodule:: git.refs.reference :members: :undoc-members: +Refs.head +--------- + +.. automodule:: git.refs.head + :members: + :undoc-members: + +Refs.tag +------------ + +.. automodule:: git.refs.tag + :members: + :undoc-members: + +Refs.remote +------------ + +.. automodule:: git.refs.remote + :members: + :undoc-members: + +Refs.log +------------ + +.. automodule:: git.refs.log + :members: + :undoc-members: + Remote ------ diff --git a/doc/source/tutorial.rst b/doc/source/tutorial.rst index 9aadae475..642136abb 100644 --- a/doc/source/tutorial.rst +++ b/doc/source/tutorial.rst @@ -88,6 +88,14 @@ A symbolic reference is a special case of a reference as it points to another re head = repo.head # the head points to the active branch/ref master = head.reference # retrieve the reference the head points to master.commit # from here you use it as any other reference + +Access the reflog easily:: + + log = master.log() + log[0] # first (i.e. oldest) reflog entry + log[-1] # last (i.e. most recent) reflog entry + +For more information on the reflog, see the ``RefLog`` type's documentation. Modifying References ******************** diff --git a/index/base.py b/index/base.py index 05caa06dc..a63dbb267 100644 --- a/index/base.py +++ b/index/base.py @@ -3,8 +3,6 @@ # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php -"""Module containing Index implementation, allowing to perform all kinds of index -manipulations such as querying and merging.""" import tempfile import os import sys diff --git a/index/fun.py b/index/fun.py index 87fdf1a90..9b35bf04a 100644 --- a/index/fun.py +++ b/index/fun.py @@ -1,7 +1,6 @@ -""" -Contains standalone functions to accompany the index implementation and make it -more versatile -""" +# Contains standalone functions to accompany the index implementation and make it +# more versatile +# NOTE: Autodoc hates it if this is a docstring from stat import ( S_IFDIR, S_IFLNK, diff --git a/refs/head.py b/refs/head.py index 91a1132c4..278cecc72 100644 --- a/refs/head.py +++ b/refs/head.py @@ -1,4 +1,3 @@ -""" Module containing all ref based objects """ from symbolic import SymbolicReference from reference import Reference diff --git a/remote.py b/remote.py index 3edde1752..2e596ca19 100644 --- a/remote.py +++ b/remote.py @@ -3,7 +3,8 @@ # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php -"""Module implementing a remote object allowing easy access to git remotes""" + +# Module implementing a remote object allowing easy access to git remotes from exc import GitCommandError from objects import Commit