diff options
83 files changed, 7892 insertions, 198 deletions
@@ -1,22 +1,34 @@ ======= CHANGES ======= + 0.3 === - * ConcurrentWriteOperation was removed, and replaced by LockedFD - * IndexFile.get_entries_key was renamed to entry_key - * IndexEntry instances contained in IndexFile.entries now use binary sha's. Use - the .hexsha property to obtain the hexadecimal version. The .sha property - was removed to make the use of the respective sha more explicit. - * IndexFile.write_tree: removed missing_ok keyword, its always True now - Instead of raising GitCommandError it raises UnmergedEntriesError - * diff.Diff.null_hex_sha renamed to NULL_HEX_SHA, to be conforming with - the naming in the Object base class - * Object instances, and everything derived from it, now use binary sha's internally. The 'sha' member was removed, in favor of the 'binsha' member. +Renamed Modules +--------------- +* For consistency with naming conventions used in sub-modules like gitdb, the following modules have been renamed + * git.utils -> git.util + * git.errors -> git.exc + * git.objects.utils -> git.objects.util + +General +------- +* Object instances, and everything derived from it, now use binary sha's internally. The 'sha' member was removed, in favor of the 'binsha' member. An 'hexsha' property is available for convenient conversions. They may only be initialized using their binary shas, reference names or revision specs are not allowed anymore. - * The .data attribute was removed from the Object type, it is only available - on the Blob type. +* IndexEntry instances contained in IndexFile.entries now use binary sha's. Use the .hexsha property to obtain the hexadecimal version. The .sha property was removed to make the use of the respective sha more explicit. +* If objects are instantiated explicitly, a binary sha is required to identify the object, where previously any rev-spec could be used. The ref-spec compatible +version still exists as Object.new or Repo.commit|Repo.tree respectively. +* The .data attribute was removed from the Object type, to obtain plain data, use the data_stream property instead. +* ConcurrentWriteOperation was removed, and replaced by LockedFD +* IndexFile.get_entries_key was renamed to entry_key +* IndexFile.write_tree: removed missing_ok keyword, its always True now + Instead of raising GitCommandError it raises UnmergedEntriesError. + This is required as the pure-python implementation doesn't support the missing_ok keyword yet. +* diff.Diff.null_hex_sha renamed to NULL_HEX_SHA, to be conforming with + the naming in the Object base class + + 0.2 Beta 2 @@ -1 +1 @@ -0.2.0-beta1 +0.3.0-beta1 diff --git a/doc/.gitignore b/doc/.gitignore new file mode 100644 index 00000000..567609b1 --- /dev/null +++ b/doc/.gitignore @@ -0,0 +1 @@ +build/ diff --git a/doc/Makefile b/doc/Makefile index dbc6dec2..39fe377f 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -9,7 +9,7 @@ PAPER = # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d _build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . +ALLSPHINXOPTS = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source .PHONY: help clean html web pickle htmlhelp latex changes linkcheck @@ -24,52 +24,52 @@ help: @echo " linkcheck to check all external links for integrity" clean: - -rm -rf _build/* + -rm -rf build/* html: - mkdir -p _build/html _build/doctrees - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html + mkdir -p build/html build/doctrees + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html @echo - @echo "Build finished. The HTML pages are in _build/html." + @echo "Build finished. The HTML pages are in build/html." pickle: - mkdir -p _build/pickle _build/doctrees - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) _build/pickle + mkdir -p build/pickle build/doctrees + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle @echo @echo "Build finished; now you can process the pickle files." web: pickle json: - mkdir -p _build/json _build/doctrees - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) _build/json + mkdir -p build/json build/doctrees + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) build/json @echo @echo "Build finished; now you can process the JSON files." htmlhelp: - mkdir -p _build/htmlhelp _build/doctrees - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp + mkdir -p build/htmlhelp build/doctrees + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) build/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in _build/htmlhelp." + ".hhp project file in build/htmlhelp." latex: - mkdir -p _build/latex _build/doctrees - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex + mkdir -p build/latex build/doctrees + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) build/latex @echo - @echo "Build finished; the LaTeX files are in _build/latex." + @echo "Build finished; the LaTeX files are in build/latex." @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \ "run these through (pdf)latex." changes: - mkdir -p _build/changes _build/doctrees - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) _build/changes + mkdir -p build/changes build/doctrees + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) build/changes @echo - @echo "The overview file is in _build/changes." + @echo "The overview file is in build/changes." linkcheck: - mkdir -p _build/linkcheck _build/doctrees - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) _build/linkcheck + mkdir -p build/linkcheck build/doctrees + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) build/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ - "or in _build/linkcheck/output.txt." + "or in build/linkcheck/output.txt." diff --git a/doc/doc_index/0.1/_sources/index.txt b/doc/doc_index/0.1/_sources/index.txt new file mode 100644 index 00000000..19191272 --- /dev/null +++ b/doc/doc_index/0.1/_sources/index.txt @@ -0,0 +1,23 @@ +.. GitPython documentation master file, created by sphinx-quickstart on Sat Jan 24 11:51:01 2009. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +GitPython Documentation +======================= + +Contents: + +.. toctree:: + :maxdepth: 3 + + intro + tutorial + reference + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + diff --git a/doc/doc_index/0.1/_sources/intro.txt b/doc/doc_index/0.1/_sources/intro.txt new file mode 100644 index 00000000..c99e5a4c --- /dev/null +++ b/doc/doc_index/0.1/_sources/intro.txt @@ -0,0 +1,83 @@ +.. _intro_toplevel: + +================== +Overview / Install +================== + +GitPython is a python library used to interact with Git repositories. + +GitPython is a port of the grit_ library in Ruby created by +Tom Preston-Werner and Chris Wanstrath. + +.. _grit: http://grit.rubyforge.org + +Requirements +============ + +* Git_ tested with 1.5.3.7 +* `Python Nose`_ - used for running the tests +* `Mock by Michael Foord`_ used for tests. Requires 0.5 or higher + +.. _Git: http://git-scm.com/ +.. _Python Nose: http://code.google.com/p/python-nose/ +.. _Mock by Michael Foord: http://www.voidspace.org.uk/python/mock/ + +Installing GitPython +==================== + +Installing GitPython is easily done using +`setuptools`_. Assuming it is +installed, just run the following from the command-line: + +.. sourcecode:: none + + # easy_install GitPython + +This command will download the latest version of GitPython from the +`Python Package Index <http://pypi.python.org/pypi/GitPython>`_ and install it +to your system. More information about ``easy_install`` and pypi can be found +here: + +* `setuptools`_ +* `install setuptools <http://peak.telecommunity.com/DevCenter/EasyInstall#installation-instructions>`_ +* `pypi <http://pypi.python.org/pypi/GitPython>`_ + +.. _setuptools: http://peak.telecommunity.com/DevCenter/setuptools + +Alternatively, you can install from the distribution using the ``setup.py`` +script: + +.. sourcecode:: none + + # python setup.py install + +Getting Started +=============== + +* :ref:`tutorial_toplevel` - This tutorial provides a walk-through of some of + the basic functionality and concepts used in GitPython. It, however, is not + exhaustive so you are encouraged to spend some time in the + :ref:`api_reference_toplevel`. + +API Reference +============= + +An organized section of the GitPthon API is at :ref:`api_reference_toplevel`. + +Source Code +=========== + +GitPython's git repo is available on Gitorious, which can be browsed at: + +http://gitorious.org/git-python + +and cloned from: + +git://gitorious.org/git-python/mainline.git + +License Information +=================== + +GitPython is licensed under the New BSD License. See the LICENSE file for +more information. + diff --git a/doc/doc_index/0.1/_sources/reference.txt b/doc/doc_index/0.1/_sources/reference.txt new file mode 100644 index 00000000..078cbdf6 --- /dev/null +++ b/doc/doc_index/0.1/_sources/reference.txt @@ -0,0 +1,95 @@ +.. _api_reference_toplevel: + +API Reference +============= + +Actor +----- + +.. automodule:: git.actor + :members: + :undoc-members: + +Blob +---- + +.. automodule:: git.blob + :members: + :undoc-members: + +Git +--- + +.. automodule:: git.cmd + :members: + :undoc-members: + +Commit +------ + +.. automodule:: git.commit + :members: + :undoc-members: + +Diff +---- + +.. automodule:: git.diff + :members: + :undoc-members: + +Errors +------ + +.. automodule:: git.errors + :members: + :undoc-members: + +Head +---- + +.. automodule:: git.head + :members: + :undoc-members: + +Lazy +---- + +.. automodule:: git.lazy + :members: + :undoc-members: + +Repo +---- + +.. automodule:: git.repo + :members: + :undoc-members: + +Stats +----- + +.. automodule:: git.stats + :members: + :undoc-members: + +Tag +--- + +.. automodule:: git.tag + :members: + :undoc-members: + +Tree +---- + +.. automodule:: git.tree + :members: + :undoc-members: + +Utils +----- + +.. automodule:: git.utils + :members: + :undoc-members: diff --git a/doc/doc_index/0.1/_sources/tutorial.txt b/doc/doc_index/0.1/_sources/tutorial.txt new file mode 100644 index 00000000..838fd68e --- /dev/null +++ b/doc/doc_index/0.1/_sources/tutorial.txt @@ -0,0 +1,211 @@ +.. _tutorial_toplevel: + +================== +GitPython Tutorial +================== + +GitPython provides object model access to your git repository. Once you have +created a repository object, you can traverse it to find parent commit(s), +trees, blobs, etc. + +Initialize a Repo object +************************ + +The first step is to create a ``Repo`` object to represent your repository. + + >>> from git import * + >>> repo = Repo("/Users/mtrier/Development/git-python") + +In the above example, the directory ``/Users/mtrier/Development/git-python`` +is my working repository and contains the ``.git`` directory. You can also +initialize GitPython with a bare repository. + + >>> repo = Repo.create("/var/git/git-python.git") + +Getting a list of commits +************************* + +From the ``Repo`` object, you can get a list of ``Commit`` +objects. + + >>> repo.commits() + [<git.Commit "207c0c4418115df0d30820ab1a9acd2ea4bf4431">, + <git.Commit "a91c45eee0b41bf3cdaad3418ca3850664c4a4b4">, + <git.Commit "e17c7e11aed9e94d2159e549a99b966912ce1091">, + <git.Commit "bd795df2d0e07d10e0298670005c0e9d9a5ed867">] + +Called without arguments, ``Repo.commits`` returns a list of up to ten commits +reachable by the master branch (starting at the latest commit). You can ask +for commits beginning at a different branch, commit, tag, etc. + + >>> repo.commits('mybranch') + >>> repo.commits('40d3057d09a7a4d61059bca9dca5ae698de58cbe') + >>> repo.commits('v0.1') + +You can specify the maximum number of commits to return. + + >>> repo.commits('master', max_count=100) + +If you need paging, you can specify a number of commits to skip. + + >>> repo.commits('master', max_count=10, skip=20) + +The above will return commits 21-30 from the commit list. + +The Commit object +***************** + +Commit objects contain information about a specific commit. + + >>> head = repo.commits()[0] + + >>> head.id + '207c0c4418115df0d30820ab1a9acd2ea4bf4431' + + >>> head.parents + [<git.Commit "a91c45eee0b41bf3cdaad3418ca3850664c4a4b4">] + + >>> head.tree + <git.Tree "563413aedbeda425d8d9dcbb744247d0c3e8a0ac"> + + >>> head.author + <git.Actor "Michael Trier <mtrier@gmail.com>"> + + >>> head.authored_date + (2008, 5, 7, 5, 0, 56, 2, 128, 0) + + >>> head.committer + <git.Actor "Michael Trier <mtrier@gmail.com>"> + + >>> head.committed_date + (2008, 5, 7, 5, 0, 56, 2, 128, 0) + + >>> head.message + 'cleaned up a lot of test information. Fixed escaping so it works with + subprocess.' + +Note: date time is represented in a `struct_time`_ format. Conversion to +human readable form can be accomplished with the various time module methods. + + >>> import time + >>> time.asctime(head.committed_date) + 'Wed May 7 05:56:02 2008' + + >>> time.strftime("%a, %d %b %Y %H:%M", head.committed_date) + 'Wed, 7 May 2008 05:56' + +.. _struct_time: http://docs.python.org/library/time.html + +You can traverse a commit's ancestry by chaining calls to ``parents``. + + >>> repo.commits()[0].parents[0].parents[0].parents[0] + +The above corresponds to ``master^^^`` or ``master~3`` in git parlance. + +The Tree object +*************** + +A tree records pointers to the contents of a directory. Let's say you want +the root tree of the latest commit on the master branch. + + >>> tree = repo.commits()[0].tree + <git.Tree "a006b5b1a8115185a228b7514cdcd46fed90dc92"> + + >>> tree.id + 'a006b5b1a8115185a228b7514cdcd46fed90dc92' + +Once you have a tree, you can get the contents. + + >>> contents = tree.values() + [<git.Blob "6a91a439ea968bf2f5ce8bb1cd8ddf5bf2cad6c7">, + <git.Blob "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391">, + <git.Tree "eaa0090ec96b054e425603480519e7cf587adfc3">, + <git.Blob "980e72ae16b5378009ba5dfd6772b59fe7ccd2df">] + +The tree is implements a dictionary protocol so it can be used and acts just +like a dictionary with some additional properties. + + >>> tree.items() + [('lib', <git.Tree "310ebc9a0904531438bdde831fd6a27c6b6be58e">), + ('LICENSE', <git.Blob "6797c1421052efe2ded9efdbb498b37aeae16415">), + ('doc', <git.Tree "a58386dd101f6eb7f33499317e5508726dfd5e4f">), + ('MANIFEST.in', <git.Blob "7da4e346bb0a682e99312c48a1f452796d3fb988">), + ('.gitignore', <git.Blob "6870991011cc8d9853a7a8a6f02061512c6a8190">), + ('test', <git.Tree "c6f6ee37d328987bc6fb47a33fed16c7886df857">), + ('VERSION', <git.Blob "9faa1b7a7339db85692f91ad4b922554624a3ef7">), + ('AUTHORS', <git.Blob "9f649ef5448f9666d78356a2f66ba07c5fb27229">), + ('README', <git.Blob "9643dcf549f34fbd09503d4c941a5d04157570fe">), + ('ez_setup.py', <git.Blob "3031ad0d119bd5010648cf8c038e2bbe21969ecb">), + ('setup.py', <git.Blob "271074302aee04eb0394a4706c74f0c2eb504746">), + ('CHANGES', <git.Blob "0d236f3d9f20d5e5db86daefe1e3ba1ce68e3a97">)] + +This tree contains three ``Blob`` objects and one ``Tree`` object. The trees +are subdirectories and the blobs are files. Trees below the root have +additional attributes. + + >>> contents = tree["lib"] + <git.Tree "c1c7214dde86f76bc3e18806ac1f47c38b2b7a3"> + + >>> contents.name + 'test' + + >>> contents.mode + '040000' + +There is a convenience method that allows you to get a named sub-object +from a tree with a syntax similar to how paths are written in an unix +system. + + >>> tree/"lib" + <git.Tree "c1c7214dde86f76bc3e18806ac1f47c38b2b7a30"> + +You can also get a tree directly from the repository if you know its name. + + >>> repo.tree() + <git.Tree "master"> + + >>> repo.tree("c1c7214dde86f76bc3e18806ac1f47c38b2b7a30") + <git.Tree "c1c7214dde86f76bc3e18806ac1f47c38b2b7a30"> + +The Blob object +*************** + +A blob represents a file. Trees often contain blobs. + + >>> blob = tree['urls.py'] + <git.Blob "b19574431a073333ea09346eafd64e7b1908ef49"> + +A blob has certain attributes. + + >>> blob.name + 'urls.py' + + >>> blob.mode + '100644' + + >>> blob.mime_type + 'text/x-python' + + >>> blob.size + 415 + +You can get the data of a blob as a string. + + >>> blob.data + "from django.conf.urls.defaults import *\nfrom django.conf..." + +You can also get a blob directly from the repo if you know its name. + + >>> repo.blob("b19574431a073333ea09346eafd64e7b1908ef49") + <git.Blob "b19574431a073333ea09346eafd64e7b1908ef49"> + +What Else? +********** + +There is more stuff in there, like the ability to tar or gzip repos, stats, +log, blame, and probably a few other things. Additionally calls to the git +instance are handled through a ``__getattr__`` construct, which makes +available any git commands directly, with a nice conversion of Python dicts +to command line parameters. + +Check the unit tests, they're pretty exhaustive. diff --git a/doc/doc_index/0.1/_static/basic.css b/doc/doc_index/0.1/_static/basic.css new file mode 100644 index 00000000..a04d6545 --- /dev/null +++ b/doc/doc_index/0.1/_static/basic.css @@ -0,0 +1,417 @@ +/** + * Sphinx stylesheet -- basic theme + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + */ + +/* -- main layout ----------------------------------------------------------- */ + +div.clearer { + clear: both; +} + +/* -- relbar ---------------------------------------------------------------- */ + +div.related { + width: 100%; + font-size: 90%; +} + +div.related h3 { + display: none; +} + +div.related ul { + margin: 0; + padding: 0 0 0 10px; + list-style: none; +} + +div.related li { + display: inline; +} + +div.related li.right { + float: right; + margin-right: 5px; +} + +/* -- sidebar --------------------------------------------------------------- */ + +div.sphinxsidebarwrapper { + padding: 10px 5px 0 10px; +} + +div.sphinxsidebar { + float: left; + width: 230px; + margin-left: -100%; + font-size: 90%; +} + +div.sphinxsidebar ul { + list-style: none; +} + +div.sphinxsidebar ul ul, +div.sphinxsidebar ul.want-points { + margin-left: 20px; + list-style: square; +} + +div.sphinxsidebar ul ul { + margin-top: 0; + margin-bottom: 0; +} + +div.sphinxsidebar form { + margin-top: 10px; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + +img { + border: 0; +} + +/* -- search page ----------------------------------------------------------- */ + +ul.search { + margin: 10px 0 0 20px; + padding: 0; +} + +ul.search li { + padding: 5px 0 5px 20px; + background-image: url(file.png); + background-repeat: no-repeat; + background-position: 0 7px; +} + +ul.search li a { + font-weight: bold; +} + +ul.search li div.context { + color: #888; + margin: 2px 0 0 30px; + text-align: left; +} + +ul.keywordmatches li.goodmatch a { + font-weight: bold; +} + +/* -- index page ------------------------------------------------------------ */ + +table.contentstable { + width: 90%; +} + +table.contentstable p.biglink { + line-height: 150%; +} + +a.biglink { + font-size: 1.3em; +} + +span.linkdescr { + font-style: italic; + padding-top: 5px; + font-size: 90%; +} + +/* -- general index --------------------------------------------------------- */ + +table.indextable td { + text-align: left; + vertical-align: top; +} + +table.indextable dl, table.indextable dd { + margin-top: 0; + margin-bottom: 0; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +/* -- general body styles --------------------------------------------------- */ + +a.headerlink { + visibility: hidden; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink { + visibility: visible; +} + +div.body p.caption { + text-align: inherit; +} + +div.body td { + text-align: left; +} + +.field-list ul { + padding-left: 1em; +} + +.first { + margin-top: 0 !important; +} + +p.rubric { + margin-top: 30px; + font-weight: bold; +} + +/* -- sidebars -------------------------------------------------------------- */ + +div.sidebar { + margin: 0 0 0.5em 1em; + border: 1px solid #ddb; + padding: 7px 7px 0 7px; + background-color: #ffe; + width: 40%; + float: right; +} + +p.sidebar-title { + font-weight: bold; +} + +/* -- topics ---------------------------------------------------------------- */ + +div.topic { + border: 1px solid #ccc; + padding: 7px 7px 0 7px; + margin: 10px 0 10px 0; +} + +p.topic-title { + font-size: 1.1em; + font-weight: bold; + margin-top: 10px; +} + +/* -- admonitions ----------------------------------------------------------- */ + +div.admonition { + margin-top: 10px; + margin-bottom: 10px; + padding: 7px; +} + +div.admonition dt { + font-weight: bold; +} + +div.admonition dl { + margin-bottom: 0; +} + +p.admonition-title { + margin: 0px 10px 5px 0px; + font-weight: bold; +} + +div.body p.centered { + text-align: center; + margin-top: 25px; +} + +/* -- tables ---------------------------------------------------------------- */ + +table.docutils { + border: 0; + border-collapse: collapse; +} + +table.docutils td, table.docutils th { + padding: 1px 8px 1px 0; + border-top: 0; + border-left: 0; + border-right: 0; + border-bottom: 1px solid #aaa; +} + +table.field-list td, table.field-list th { + border: 0 !important; +} + +table.footnote td, table.footnote th { + border: 0 !important; +} + +th { + text-align: left; + padding-right: 5px; +} + +/* -- other body styles ----------------------------------------------------- */ + +dl { + margin-bottom: 15px; +} + +dd p { + margin-top: 0px; +} + +dd ul, dd table { + margin-bottom: 10px; +} + +dd { + margin-top: 3px; + margin-bottom: 10px; + margin-left: 30px; +} + +dt:target, .highlight { + background-color: #fbe54e; +} + +dl.glossary dt { + font-weight: bold; + font-size: 1.1em; +} + +.field-list ul { + margin: 0; + padding-left: 1em; +} + +.field-list p { + margin: 0; +} + +.refcount { + color: #060; +} + +.optional { + font-size: 1.3em; +} + +.versionmodified { + font-style: italic; +} + +.system-message { + background-color: #fda; + padding: 5px; + border: 3px solid red; +} + +.footnote:target { + background-color: #ffa +} + +.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; +} + +.line-block .line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; +} + +/* -- code displays --------------------------------------------------------- */ + +pre { + overflow: auto; +} + +td.linenos pre { + padding: 5px 0px; + border: 0; + background-color: transparent; + color: #aaa; +} + +table.highlighttable { + margin-left: 0.5em; +} + +table.highlighttable td { + padding: 0 0.5em 0 0.5em; +} + +tt.descname { + background-color: transparent; + font-weight: bold; + font-size: 1.2em; +} + +tt.descclassname { + background-color: transparent; +} + +tt.xref, a tt { + background-color: transparent; + font-weight: bold; +} + +h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt { + background-color: transparent; +} + +/* -- math display ---------------------------------------------------------- */ + +img.math { + vertical-align: middle; +} + +div.body div.math p { + text-align: center; +} + +span.eqno { + float: right; +} + +/* -- printout stylesheet --------------------------------------------------- */ + +@media print { + div.document, + div.documentwrapper, + div.bodywrapper { + margin: 0 !important; + width: 100%; + } + + div.sphinxsidebar, + div.related, + div.footer, + #top-link { + display: none; + } +} diff --git a/doc/doc_index/0.1/_static/default.css b/doc/doc_index/0.1/_static/default.css new file mode 100644 index 00000000..37257440 --- /dev/null +++ b/doc/doc_index/0.1/_static/default.css @@ -0,0 +1,230 @@ +/** + * Sphinx stylesheet -- default theme + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + */ + +@import url("basic.css"); + +/* -- page layout ----------------------------------------------------------- */ + +body { + font-family: sans-serif; + font-size: 100%; + background-color: #11303d; + color: #000; + margin: 0; + padding: 0; +} + +div.document { + background-color: #1c4e63; +} + +div.documentwrapper { + float: left; + width: 100%; +} + +div.bodywrapper { + margin: 0 0 0 230px; +} + +div.body { + background-color: #ffffff; + color: #000000; + padding: 0 20px 30px 20px; +} + +div.footer { + color: #ffffff; + width: 100%; + padding: 9px 0 9px 0; + text-align: center; + font-size: 75%; +} + +div.footer a { + color: #ffffff; + text-decoration: underline; +} + +div.related { + background-color: #133f52; + line-height: 30px; + color: #ffffff; +} + +div.related a { + color: #ffffff; +} + +div.sphinxsidebar { +} + +div.sphinxsidebar h3 { + font-family: 'Trebuchet MS', sans-serif; + color: #ffffff; + font-size: 1.4em; + font-weight: normal; + margin: 0; + padding: 0; +} + +div.sphinxsidebar h3 a { + color: #ffffff; +} + +div.sphinxsidebar h4 { + font-family: 'Trebuchet MS', sans-serif; + color: #ffffff; + font-size: 1.3em; + font-weight: normal; + margin: 5px 0 0 0; + padding: 0; +} + +div.sphinxsidebar p { + color: #ffffff; +} + +div.sphinxsidebar p.topless { + margin: 5px 10px 10px 10px; +} + +div.sphinxsidebar ul { + margin: 10px; + padding: 0; + color: #ffffff; +} + +div.sphinxsidebar a { + color: #98dbcc; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + +/* -- body styles ----------------------------------------------------------- */ + +a { + color: #355f7c; + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +div.body p, div.body dd, div.body li { + text-align: justify; + line-height: 130%; +} + +div.body h1, +div.body h2, +div.body h3, +div.body h4, +div.body h5, +div.body h6 { + font-family: 'Trebuchet MS', sans-serif; + background-color: #f2f2f2; + font-weight: normal; + color: #20435c; + border-bottom: 1px solid #ccc; + margin: 20px -20px 10px -20px; + padding: 3px 0 3px 10px; +} + +div.body h1 { margin-top: 0; font-size: 200%; } +div.body h2 { font-size: 160%; } +div.body h3 { font-size: 140%; } +div.body h4 { font-size: 120%; } +div.body h5 { font-size: 110%; } +div.body h6 { font-size: 100%; } + +a.headerlink { + color: #c60f0f; + font-size: 0.8em; + padding: 0 4px 0 4px; + text-decoration: none; +} + +a.headerlink:hover { + background-color: #c60f0f; + color: white; +} + +div.body p, div.body dd, div.body li { + text-align: justify; + line-height: 130%; +} + +div.admonition p.admonition-title + p { + display: inline; +} + +div.admonition p { + margin-bottom: 5px; +} + +div.admonition pre { + margin-bottom: 5px; +} + +div.admonition ul, div.admonition ol { + margin-bottom: 5px; +} + +div.note { + background-color: #eee; + border: 1px solid #ccc; +} + +div.seealso { + background-color: #ffc; + border: 1px solid #ff6; +} + +div.topic { + background-color: #eee; +} + +div.warning { + background-color: #ffe4e4; + border: 1px solid #f66; +} + +p.admonition-title { + display: inline; +} + +p.admonition-title:after { + content: ":"; +} + +pre { + padding: 5px; + background-color: #eeffcc; + color: #333333; + line-height: 120%; + border: 1px solid #ac9; + border-left: none; + border-right: none; +} + +tt { + background-color: #ecf0f3; + padding: 0 1px 0 1px; + font-size: 0.95em; +} + +.warning tt { + background: #efc2c2; +} + +.note tt { + background: #d6d6d6; +}
\ No newline at end of file diff --git a/doc/doc_index/0.1/_static/doctools.js b/doc/doc_index/0.1/_static/doctools.js new file mode 100644 index 00000000..9447678c --- /dev/null +++ b/doc/doc_index/0.1/_static/doctools.js @@ -0,0 +1,232 @@ +/// XXX: make it cross browser + +/** + * make the code below compatible with browsers without + * an installed firebug like debugger + */ +if (!window.console || !console.firebug) { + var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", + "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"]; + window.console = {}; + for (var i = 0; i < names.length; ++i) + window.console[names[i]] = function() {} +} + +/** + * small helper function to urldecode strings + */ +jQuery.urldecode = function(x) { + return decodeURIComponent(x).replace(/\+/g, ' '); +} + +/** + * small helper function to urlencode strings + */ +jQuery.urlencode = encodeURIComponent; + +/** + * This function returns the parsed url parameters of the + * current request. Multiple values per key are supported, + * it will always return arrays of strings for the value parts. + */ +jQuery.getQueryParameters = function(s) { + if (typeof s == 'undefined') + s = document.location.search; + var parts = s.substr(s.indexOf('?') + 1).split('&'); + var result = {}; + for (var i = 0; i < parts.length; i++) { + var tmp = parts[i].split('=', 2); + var key = jQuery.urldecode(tmp[0]); + var value = jQuery.urldecode(tmp[1]); + if (key in result) + result[key].push(value); + else + result[key] = [value]; + } + return result; +} + +/** + * small function to check if an array contains + * a given item. + */ +jQuery.contains = function(arr, item) { + for (var i = 0; i < arr.length; i++) { + if (arr[i] == item) + return true; + } + return false; +} + +/** + * highlight a given string on a jquery object by wrapping it in + * span elements with the given class name. + */ +jQuery.fn.highlightText = function(text, className) { + function highlight(node) { + if (node.nodeType == 3) { + var val = node.nodeValue; + var pos = val.toLowerCase().indexOf(text); + if (pos >= 0 && !jQuery.className.has(node.parentNode, className)) { + var span = document.createElement("span"); + span.className = className; + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + node.parentNode.insertBefore(span, node.parentNode.insertBefore( + document.createTextNode(val.substr(pos + text.length)), + node.nextSibling)); + node.nodeValue = val.substr(0, pos); + } + } + else if (!jQuery(node).is("button, select, textarea")) { + jQuery.each(node.childNodes, function() { + highlight(this) + }); + } + } + return this.each(function() { + highlight(this); + }); +} + +/** + * Small JavaScript module for the documentation. + */ +var Documentation = { + + init : function() { + this.fixFirefoxAnchorBug(); + this.highlightSearchWords(); + this.initModIndex(); + }, + + /** + * i18n support + */ + TRANSLATIONS : {}, + PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; }, + LOCALE : 'unknown', + + // gettext and ngettext don't access this so that the functions + // can savely bound to a different name (_ = Documentation.gettext) + gettext : function(string) { + var translated = Documentation.TRANSLATIONS[string]; + if (typeof translated == 'undefined') + return string; + return (typeof translated == 'string') ? translated : translated[0]; + }, + + ngettext : function(singular, plural, n) { + var translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated == 'undefined') + return (n == 1) ? singular : plural; + return translated[Documentation.PLURALEXPR(n)]; + }, + + addTranslations : function(catalog) { + for (var key in catalog.messages) + this.TRANSLATIONS[key] = catalog.messages[key]; + this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); + this.LOCALE = catalog.locale; + }, + + /** + * add context elements like header anchor links + */ + addContextElements : function() { + $('div[id] > :header:first').each(function() { + $('<a class="headerlink">\u00B6</a>'). + attr('href', '#' + this.id). + attr('title', _('Permalink to this headline')). + appendTo(this); + }); + $('dt[id]').each(function() { + $('<a class="headerlink">\u00B6</a>'). + attr('href', '#' + this.id). + attr('title', _('Permalink to this definition')). + appendTo(this); + }); + }, + + /** + * workaround a firefox stupidity + */ + fixFirefoxAnchorBug : function() { + if (document.location.hash && $.browser.mozilla) + window.setTimeout(function() { + document.location.href += ''; + }, 10); + }, + + /** + * highlight the search words provided in the url in the text + */ + highlightSearchWords : function() { + var params = $.getQueryParameters(); + var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; + if (terms.length) { + var body = $('div.body'); + window.setTimeout(function() { + $.each(terms, function() { + body.highlightText(this.toLowerCase(), 'highlight'); + }); + }, 10); + $('<li class="highlight-link"><a href="javascript:Documentation.' + + 'hideSearchWords()">' + _('Hide Search Matches') + '</a></li>') + .appendTo($('.sidebar .this-page-menu')); + } + }, + + /** + * init the modindex toggle buttons + */ + initModIndex : function() { + var togglers = $('img.toggler').click(function() { + var src = $(this).attr('src'); + var idnum = $(this).attr('id').substr(7); + console.log($('tr.cg-' + idnum).toggle()); + if (src.substr(-9) == 'minus.png') + $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); + else + $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); + }).css('display', ''); + if (DOCUMENTATION_OPTIONS.COLLAPSE_MODINDEX) { + togglers.click(); + } + }, + + /** + * helper function to hide the search marks again + */ + hideSearchWords : function() { + $('.sidebar .this-page-menu li.highlight-link').fadeOut(300); + $('span.highlight').removeClass('highlight'); + }, + + /** + * make the url absolute + */ + makeURL : function(relativeURL) { + return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; + }, + + /** + * get the current relative url + */ + getCurrentURL : function() { + var path = document.location.pathname; + var parts = path.split(/\//); + $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { + if (this == '..') + parts.pop(); + }); + var url = parts.join('/'); + return path.substring(url.lastIndexOf('/') + 1, path.length - 1); + } +}; + +// quick alias for translations +_ = Documentation.gettext; + +$(document).ready(function() { + Documentation.init(); +}); diff --git a/doc/doc_index/0.1/_static/file.png b/doc/doc_index/0.1/_static/file.png Binary files differnew file mode 100644 index 00000000..d18082e3 --- /dev/null +++ b/doc/doc_index/0.1/_static/file.png diff --git a/doc/doc_index/0.1/_static/jquery.js b/doc/doc_index/0.1/_static/jquery.js new file mode 100644 index 00000000..82b98e1d --- /dev/null +++ b/doc/doc_index/0.1/_static/jquery.js @@ -0,0 +1,32 @@ +/* + * jQuery 1.2.6 - New Wave Javascript + * + * Copyright (c) 2008 John Resig (jquery.com) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * $Date: 2008-05-24 14:22:17 -0400 (Sat, 24 May 2008) $ + * $Rev: 5685 $ + */ +(function(){var _jQuery=window.jQuery,_$=window.$;var jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);};var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,isSimple=/^.[^:#\[\.]*$/,undefined;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this;}if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1])selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem){if(elem.id!=match[3])return jQuery().find(selector);return jQuery(elem);}selector=[];}}else +return jQuery(context).find(selector);}else if(jQuery.isFunction(selector))return jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(jQuery.makeArray(selector));},jquery:"1.2.6",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){var ret=-1;return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function(name,value,type){var options=name;if(name.constructor==String)if(value===undefined)return this[0]&&jQuery[type||"attr"](this[0],name);else{options={};options[name]=value;}return this.each(function(i){for(name in options)jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));});},css:function(key,value){if((key=='width'||key=='height')&&parseFloat(value)<0)value=undefined;return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!="object"&&text!=null)return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return ret;},wrapAll:function(html){if(this[0])jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1)this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1)this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem);});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems);},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0];}else +return this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)this[expando]=null;});if(events===true)this.find("*").andSelf().each(function(i){if(this.nodeType==3)return;var events=jQuery.data(this,"events");for(var type in events)for(var handler in events[type])jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,this));},not:function(selector){if(selector.constructor==String)if(isSimple.test(selector))return this.pushStack(jQuery.multiFilter(selector,this,true));else +selector=jQuery.multiFilter(selector,this);var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector=='string'?jQuery(selector):jQuery.makeArray(selector))));},is:function(selector){return!!selector&&jQuery.multiFilter(selector,this).length>0;},hasClass:function(selector){return this.is("."+selector);},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0)return null;for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery.browser.msie&&!option.attributes.value.specified?option.text:option.value;if(one)return value;values.push(value);}}return values;}else +return(this[0].value||"").replace(/\r/g,"");}return undefined;}if(value.constructor==Number)value+='';return this.each(function(){if(this.nodeType!=1)return;if(value.constructor==Array&&/radio|checkbox/.test(this.type))this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0);else if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length)this.selectedIndex=-1;}else +this.value=value;});},html:function(value){return value==undefined?(this[0]?this[0].innerHTML:null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length)data=jQuery.data(this[0],key);return data===undefined&&parts[1]?this.data(parts[0]):data;}else +return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse)elems.reverse();}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr"))obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script"))scripts=scripts.add(elem);else{if(elem.nodeType==1)scripts=scripts.add(jQuery("script",elem).remove());callback.call(obj,elem);}});scripts.each(evalScript);});}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src)jQuery.ajax({url:elem.src,async:false,dataType:"script"});else +jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)elem.parentNode.removeChild(elem);}function now(){return+new Date;}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2;}if(typeof target!="object"&&typeof target!="function")target={};if(length==i){target=this;--i;}for(;i<length;i++)if((options=arguments[i])!=null)for(var name in options){var src=target[name],copy=options[name];if(target===copy)continue;if(deep&©&&typeof copy=="object"&&!copy.nodeType)target[name]=jQuery.extend(deep,src||(copy.length!=null?[]:{}),copy);else if(copy!==undefined)target[name]=copy;}return target;};var expando="jQuery"+now(),uuid=0,windowData={},exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{};jQuery.extend({noConflict:function(deep){window.$=_$;if(deep)window.jQuery=_jQuery;return jQuery;},isFunction:function(fn){return!!fn&&typeof fn!="string"&&!fn.nodeName&&fn.constructor!=Array&&/^[\s[]?function/.test(fn+"");},isXMLDoc:function(elem){return elem.documentElement&&!elem.body||elem.tagName&&elem.ownerDocument&&!elem.ownerDocument.body;},globalEval:function(data){data=jQuery.trim(data);if(data){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.browser.msie)script.text=data;else +script.appendChild(document.createTextNode(data));head.insertBefore(script,head.firstChild);head.removeChild(script);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id)id=elem[expando]=++uuid;if(name&&!jQuery.cache[id])jQuery.cache[id]={};if(data!==undefined)jQuery.cache[id][name]=data;return name?jQuery.cache[id][name]:id;},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id])break;if(!name)jQuery.removeData(elem);}}else{try{delete elem[expando];}catch(e){if(elem.removeAttribute)elem.removeAttribute(expando);}delete jQuery.cache[id];}},each:function(object,callback,args){var name,i=0,length=object.length;if(args){if(length==undefined){for(name in object)if(callback.apply(object[name],args)===false)break;}else +for(;i<length;)if(callback.apply(object[i++],args)===false)break;}else{if(length==undefined){for(name in object)if(callback.call(object[name],name,object[name])===false)break;}else +for(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}return object;},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value))value=value.call(elem,i);return value&&value.constructor==Number&&type=="curCSS"&&!exclude.test(name)?value+"px":value;},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className))elem.className+=(elem.className?" ":"")+className;});},remove:function(elem,classNames){if(elem.nodeType==1)elem.className=classNames!=undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return!jQuery.className.has(classNames,className);}).join(" "):"";},has:function(elem,className){return jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}callback.call(elem);for(var name in options)elem.style[name]=old[name];},css:function(elem,name,force){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});val-=Math.round(padding+border);}if(jQuery(elem).is(":visible"))getWH();else +jQuery.swap(elem,props,getWH);return Math.max(0,val);}return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style;function color(elem){if(!jQuery.browser.safari)return false;var ret=defaultView.getComputedStyle(elem,null);return!ret||ret.getPropertyValue("color")=="";}if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret;}if(jQuery.browser.opera&&name=="display"){var save=style.outline;style.outline="0 solid black";style.outline=save;}if(name.match(/float/i))name=styleFloat;if(!force&&style&&style[name])ret=style[name];else if(defaultView.getComputedStyle){if(name.match(/float/i))name="float";name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle&&!color(elem))ret=computedStyle.getPropertyValue(name);else{var swap=[],stack=[],a=elem,i=0;for(;a&&color(a);a=a.parentNode)stack.unshift(a);for(;i<stack.length;i++)if(color(stack[i])){swap[i]=stack[i].style.display;stack[i].style.display="block";}ret=name=="display"&&swap[stack.length-1]!=null?"none":(computedStyle&&computedStyle.getPropertyValue(name))||"";for(i=0;i<swap.length;i++)if(swap[i]!=null)stack[i].style.display=swap[i];}if(name=="opacity"&&ret=="")ret="1";}else if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase();});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=ret||0;ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft;}}return ret;},clean:function(elems,context){var ret=[];context=context||document;if(typeof context.createElement=='undefined')context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;jQuery.each(elems,function(i,elem){if(!elem)return;if(elem.constructor==Number)elem+='';if(typeof elem=="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">";});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||jQuery.browser.msie&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)div=div.lastChild;if(jQuery.browser.msie){var tbody=!tags.indexOf("<table")&&tags.indexOf("<tbody")<0?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&tags.indexOf("<tbody")<0?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j)if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length)tbody[j].parentNode.removeChild(tbody[j]);if(/^\s/.test(elem))div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);}elem=jQuery.makeArray(div.childNodes);}if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select")))return;if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options)ret.push(elem);else +ret=jQuery.merge(ret,elem);});return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8)return undefined;var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined,msie=jQuery.browser.msie;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&jQuery.browser.safari)elem.parentNode.selectedIndex;if(name in elem&¬xml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)throw"type property can't be changed";elem[name]=value;}if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name))return elem.getAttributeNode(name).nodeValue;return elem[name];}if(msie&¬xml&&name=="style")return jQuery.attr(elem.style,"cssText",value);if(set)elem.setAttribute(name,""+value);var attr=msie&¬xml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}if(msie&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(value)+''=="NaN"?"":"alpha(opacity="+value*100+")");}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+'':"";}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(set)elem[name]=value;return elem[name];},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||array.split||array.setInterval||array.call)ret[0]=array;else +while(i)ret[--i]=array[i];}return ret;},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++)if(array[i]===elem)return i;return-1;},merge:function(first,second){var i=0,elem,pos=first.length;if(jQuery.browser.msie){while(elem=second[i++])if(elem.nodeType!=8)first[pos++]=elem;}else +while(elem=second[i++])first[pos++]=elem;return first;},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i]);}}}catch(e){ret=array;}return ret;},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++)if(!inv!=!callback(elems[i],i))ret.push(elems[i]);return ret;},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!=null)ret[ret.length]=value;}return ret.concat.apply([],ret);}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};var styleFloat=jQuery.browser.msie?"styleFloat":"cssFloat";jQuery.extend({boxModel:!jQuery.browser.msie||document.compatMode=="CSS1Compat",props:{"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing"}});jQuery.each({parent:function(elem){return elem.parentNode;},parents:function(elem){return jQuery.dir(elem,"parentNode");},next:function(elem){return jQuery.nth(elem,2,"nextSibling");},prev:function(elem){return jQuery.nth(elem,2,"previousSibling");},nextAll:function(elem){return jQuery.dir(elem,"nextSibling");},prevAll:function(elem){return jQuery.dir(elem,"previousSibling");},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},children:function(elem){return jQuery.sibling(elem.firstChild);},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string")ret=jQuery.multiFilter(selector,ret);return this.pushStack(jQuery.unique(ret));};});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(){var args=arguments;return this.each(function(){for(var i=0,length=args.length;i<length;i++)jQuery(args[i])[original](this);});};});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1)this.removeAttribute(name);},addClass:function(classNames){jQuery.className.add(this,classNames);},removeClass:function(classNames){jQuery.className.remove(this,classNames);},toggleClass:function(classNames){jQuery.className[jQuery.className.has(this,classNames)?"remove":"add"](this,classNames);},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).r.length){jQuery("*",this).add(this).each(function(){jQuery.event.remove(this);jQuery.removeData(this);});if(this.parentNode)this.parentNode.removeChild(this);}},empty:function(){jQuery(">*",this).remove();while(this.firstChild)this.removeChild(this.firstChild);}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body["client"+name]||jQuery.browser.safari&&window["inner"+name]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(Math.max(document.body["scroll"+name],document.documentElement["scroll"+name]),Math.max(document.body["offset"+name],document.documentElement["offset"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+"px");};});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);},"#":function(a,i,m){return a.getAttribute("id")==m[2];},":":{lt:function(a,i,m){return i<m[3]-0;},gt:function(a,i,m){return i>m[3]-0;},nth:function(a,i,m){return m[3]-0==i;},eq:function(a,i,m){return m[3]-0==i;},first:function(a,i){return i==0;},last:function(a,i,m,r){return i==r.length-1;},even:function(a,i){return i%2==0;},odd:function(a,i){return i%2;},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a;},"last-child":function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;},"only-child":function(a){return!jQuery.nth(a.parentNode.lastChild,2,"previousSibling");},parent:function(a){return a.firstChild;},empty:function(a){return!a.firstChild;},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;},visible:function(a){return"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";},hidden:function(a){return"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";},enabled:function(a){return!a.disabled;},disabled:function(a){return a.disabled;},checked:function(a){return a.checked;},selected:function(a){return a.selected||jQuery.attr(a,"selected");},text:function(a){return"text"==a.type;},radio:function(a){return"radio"==a.type;},checkbox:function(a){return"checkbox"==a.type;},file:function(a){return"file"==a.type;},password:function(a){return"password"==a.type;},submit:function(a){return"submit"==a.type;},image:function(a){return"image"==a.type;},reset:function(a){return"reset"==a.type;},button:function(a){return"button"==a.type||jQuery.nodeName(a,"button");},input:function(a){return/input|select|textarea|button/i.test(a.nodeName);},has:function(a,i,m){return jQuery.find(m[3],a).length;},header:function(a){return/h\d/i.test(a.nodeName);},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}return cur;},find:function(t,context){if(typeof t!="string")return[t];if(context&&context.nodeType!=1&&context.nodeType!=9)return[];context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false,re=quickChild,m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)for(var c=ret[i].firstChild;c;c=c.nextSibling)if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName))r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j<rl;j++){var n=m=="~"||m=="+"?ret[j].nextSibling:ret[j].firstChild;for(;n;n=n.nextSibling)if(n.nodeType==1){var id=jQuery.data(n);if(m=="~"&&merge[id])break;if(!nodeName||n.nodeName.toUpperCase()==nodeName){if(m=="~")merge[id]=true;r.push(n);}if(m=="+")break;}}ret=r;t=jQuery.trim(t.replace(re,""));foundToken=true;}}if(t&&!foundToken){if(!t.indexOf(",")){if(context==ret[0])ret.shift();done=jQuery.merge(done,ret);r=ret=[context];t=" "+t.substr(1,t.length);}else{var re2=quickID;var m=re2.exec(t);if(m){m=[0,m[2],m[3],m[1]];}else{re2=quickClass;m=re2.exec(t);}m[2]=m[2].replace(/\\/g,"");var elem=ret[ret.length-1];if(m[1]=="#"&&elem&&elem.getElementById&&!jQuery.isXMLDoc(elem)){var oid=elem.getElementById(m[2]);if((jQuery.browser.msie||jQuery.browser.opera)&&oid&&typeof oid.id=="string"&&oid.id!=m[2])oid=jQuery('[@id="'+m[2]+'"]',elem)[0];ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[];}else{for(var i=0;ret[i];i++){var tag=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];if(tag=="*"&&ret[i].nodeName.toLowerCase()=="object")tag="param";r=jQuery.merge(r,ret[i].getElementsByTagName(tag));}if(m[1]==".")r=jQuery.classFilter(r,m[2]);if(m[1]=="#"){var tmp=[];for(var i=0;r[i];i++)if(r[i].getAttribute("id")==m[2]){tmp=[r[i]];break;}r=tmp;}ret=r;}t=t.replace(re2,"");}}if(t){var val=jQuery.filter(t,r);ret=r=val.r;t=jQuery.trim(val.t);}}if(t)ret=[];if(ret&&context==ret[0])ret.shift();done=jQuery.merge(done,ret);return done;},classFilter:function(r,m,not){m=" "+m+" ";var tmp=[];for(var i=0;r[i];i++){var pass=(" "+r[i].className+" ").indexOf(m)>=0;if(!not&&pass||not&&!pass)tmp.push(r[i]);}return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}if(!m)break;if(m[1]==":"&&m[2]=="not")r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3]);else if(m[1]==".")r=jQuery.classFilter(r,m[2],not);else if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i<rl;i++){var a=r[i],z=a[jQuery.props[m[2]]||m[2]];if(z==null||/href|src|selected/.test(m[2]))z=jQuery.attr(a,m[2])||'';if((type==""&&!!z||type=="="&&z==m[5]||type=="!="&&z!=m[5]||type=="^="&&z&&!z.indexOf(m[5])||type=="$="&&z.substr(z.length-m[5].length)==m[5]||(type=="*="||type=="~=")&&z.indexOf(m[5])>=0)^not)tmp.push(a);}r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"0n+"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i<rl;i++){var node=r[i],parentNode=node.parentNode,id=jQuery.data(parentNode);if(!merge[id]){var c=1;for(var n=parentNode.firstChild;n;n=n.nextSibling)if(n.nodeType==1)n.nodeIndex=c++;merge[id]=true;}var add=false;if(first==0){if(node.nodeIndex==last)add=true;}else if((node.nodeIndex-last)%first==0&&(node.nodeIndex-last)/first>=0)add=true;if(add^not)tmp.push(node);}r=tmp;}else{var fn=jQuery.expr[m[1]];if(typeof fn=="object")fn=fn[m[2]];if(typeof fn=="string")fn=eval("false||function(a,i){return "+fn+";}");r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r);},not);}}return{r:r,t:t};},dir:function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)matched.push(cur);cur=cur[dir];}return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])if(cur.nodeType==1&&++num==result)break;return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem)r.push(n);}return r;}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8)return;if(jQuery.browser.msie&&elem.setInterval)elem=window;if(!handler.guid)handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=this.proxy(fn,function(){return fn.apply(this,arguments);});handler.data=data;}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){if(typeof jQuery!="undefined"&&!jQuery.event.triggered)return jQuery.event.handle.apply(arguments.callee.elem,arguments);});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener)elem.addEventListener(type,handle,false);else if(elem.attachEvent)elem.attachEvent("on"+type,handle);}}handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8)return;var events=jQuery.data(elem,"events"),ret,index;if(events){if(types==undefined||(typeof types=="string"&&types.charAt(0)=="."))for(var type in events)this.remove(elem,type+(types||""));else{if(types.type){handler=types.handler;types=types.type;}jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];if(events[type]){if(handler)delete events[type][handler.guid];else +for(handler in events[type])if(!parts[1]||events[type][handler].type==parts[1])delete events[type][handler];for(ret in events[type])break;if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===false){if(elem.removeEventListener)elem.removeEventListener(type,jQuery.data(elem,"handle"),false);else if(elem.detachEvent)elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}ret=null;delete events[type];}}});}for(ret in events)break;if(!ret){var handle=jQuery.data(elem,"handle");if(handle)handle.elem=null;jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data);if(type.indexOf("!")>=0){type=type.slice(0,-1);var exclusive=true;}if(!elem){if(this.global[type])jQuery("*").add([window,document]).trigger(type,data);}else{if(elem.nodeType==3||elem.nodeType==8)return undefined;var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(event){data.unshift({type:type,target:elem,preventDefault:function(){},stopPropagation:function(){},timeStamp:now()});data[0][expando]=true;}data[0].type=type;if(exclusive)data[0].exclusive=true;var handle=jQuery.data(elem,"handle");if(handle)val=handle.apply(elem,data);if((!fn||(jQuery.nodeName(elem,'a')&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false)val=false;if(event)data.shift();if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined)val=ret;}if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,'a')&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}this.triggered=false;}return val;},handle:function(event){var val,ret,namespace,all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);namespace=event.type.split(".");event.type=namespace[0];namespace=namespace[1];all=!namespace&&!event.exclusive;handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||handler.type==namespace){event.handler=handler;event.data=handler.data;ret=handler.apply(this,arguments);if(val!==false)val=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}}return val;},fix:function(event){if(event[expando]==true)return event;var originalEvent=event;event={originalEvent:originalEvent};var props="altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target timeStamp toElement type view wheelDelta which".split(" ");for(var i=props.length;i;i--)event[props[i]]=originalEvent[props[i]];event[expando]=true;event.preventDefault=function(){if(originalEvent.preventDefault)originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)originalEvent.stopPropagation();originalEvent.cancelBubble=true;};event.timeStamp=event.timeStamp||now();if(!event.target)event.target=event.srcElement||document;if(event.target.nodeType==3)event.target=event.target.parentNode;if(!event.relatedTarget&&event.fromElement)event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode))event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)event.metaKey=event.ctrlKey;if(!event.which&&event.button)event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;},proxy:function(fn,proxy){proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy;},special:{ready:{setup:function(){bindReady();return;},teardown:function(){return;}},mouseenter:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseenter";return jQuery.event.handle.apply(this,arguments);}},mouseleave:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseleave";return jQuery.event.handle.apply(this,arguments);}}}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments);});return this.each(function(){jQuery.event.add(this,type,one,fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){return this[0]&&jQuery.event.trigger(type,data,this[0],false,fn);},toggle:function(fn){var args=arguments,i=1;while(i<args.length)jQuery.event.proxy(fn,args[i++]);return this.click(jQuery.event.proxy(fn,function(event){this.lastToggle=(this.lastToggle||0)%i;event.preventDefault();return args[this.lastToggle++].apply(this,arguments)||false;}));},hover:function(fnOver,fnOut){return this.bind('mouseenter',fnOver).bind('mouseleave',fnOut);},ready:function(fn){bindReady();if(jQuery.isReady)fn.call(document,jQuery);else +jQuery.readyList.push(function(){return fn.call(this,jQuery);});return this;}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.call(document);});jQuery.readyList=null;}jQuery(document).triggerHandler("ready");}}});var readyBound=false;function bindReady(){if(readyBound)return;readyBound=true;if(document.addEventListener&&!jQuery.browser.opera)document.addEventListener("DOMContentLoaded",jQuery.ready,false);if(jQuery.browser.msie&&window==top)(function(){if(jQuery.isReady)return;try{document.documentElement.doScroll("left");}catch(error){setTimeout(arguments.callee,0);return;}jQuery.ready();})();if(jQuery.browser.opera)document.addEventListener("DOMContentLoaded",function(){if(jQuery.isReady)return;for(var i=0;i<document.styleSheets.length;i++)if(document.styleSheets[i].disabled){setTimeout(arguments.callee,0);return;}jQuery.ready();},false);if(jQuery.browser.safari){var numStyles;(function(){if(jQuery.isReady)return;if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);return;}if(numStyles===undefined)numStyles=jQuery("style, link[rel=stylesheet]").length;if(document.styleSheets.length!=numStyles){setTimeout(arguments.callee,0);return;}jQuery.ready();})();}jQuery.event.add(window,"load",jQuery.ready);}jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,change,select,"+"submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name);};});var withinElement=function(event,elem){var parent=event.relatedTarget;while(parent&&parent!=elem)try{parent=parent.parentNode;}catch(error){parent=elem;}return parent==elem;};jQuery(window).bind("unload",function(){jQuery("*").add(document).unbind();});jQuery.fn.extend({_load:jQuery.fn.load,load:function(url,params,callback){if(typeof url!='string')return this._load(url);var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}callback=callback||function(){};var type="GET";if(params)if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified")self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText);self.each(callback,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{url:location.href,global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null,username:null,password:null,accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!="string")s.data=jQuery.param(s.data);if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre))s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}else if(!s.data||!s.data.match(jsre))s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";s.dataType="json";}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data)s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}if(head)head.removeChild(script);};}if(s.dataType=="script"&&s.cache==null)s.cache=false;if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"");}if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}if(s.global&&!jQuery.active++)jQuery.event.trigger("ajaxStart");var remote=/^(?:\w+:)?\/\/([^\/?#]+)/;if(s.dataType=="script"&&type=="GET"&&remote.test(s.url)&&remote.exec(s.url)[1]!=location.host){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset)script.charset=s.scriptCharset;if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script);}};}head.appendChild(script);return undefined;}var requestDone=false;var xhr=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();if(s.username)xhr.open(type,s.url,s.async,s.username,s.password);else +xhr.open(type,s.url,s.async);try{if(s.data)xhr.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){}if(s.beforeSend&&s.beforeSend(xhr,s)===false){s.global&&jQuery.active--;xhr.abort();return false;}if(s.global)jQuery.event.trigger("ajaxSend",[xhr,s]);var onreadystatechange=function(isTimeout){if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xhr)&&"error"||s.ifModified&&jQuery.httpNotModified(xhr,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s.dataFilter);}catch(e){status="parsererror";}}if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified");}catch(e){}if(s.ifModified&&modRes)jQuery.lastModified[s.url]=modRes;if(!jsonp)success();}else +jQuery.handleError(s,xhr,status);complete();if(s.async)xhr=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)setTimeout(function(){if(xhr){xhr.abort();if(!requestDone)onreadystatechange("timeout");}},s.timeout);}try{xhr.send(s.data);}catch(e){jQuery.handleError(s,xhr,null,e);}if(!s.async)onreadystatechange();function success(){if(s.success)s.success(data,status);if(s.global)jQuery.event.trigger("ajaxSuccess",[xhr,s]);}function complete(){if(s.complete)s.complete(xhr,status);if(s.global)jQuery.event.trigger("ajaxComplete",[xhr,s]);if(s.global&&!--jQuery.active)jQuery.event.trigger("ajaxStop");}return xhr;},handleError:function(s,xhr,status,e){if(s.error)s.error(xhr,status,e);if(s.global)jQuery.event.trigger("ajaxError",[xhr,s,e]);},active:0,httpSuccess:function(xhr){try{return!xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url]||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpData:function(xhr,type,filter){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror")throw"parsererror";if(filter)data=filter(data,type);if(type=="script")jQuery.globalEval(data);if(type=="json")data=eval("("+data+")");return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else +for(var j in a)if(a[j]&&a[j].constructor==Array)jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else +s.push(encodeURIComponent(j)+"="+encodeURIComponent(jQuery.isFunction(a[j])?a[j]():a[j]));return s.join("&").replace(/%20/g,"+");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock||"";if(jQuery.css(this,"display")=="none"){var elem=jQuery("<"+this.tagName+" />").appendTo("body");this.style.display=elem.css("display");if(this.style.display=="none")this.style.display="block";elem.remove();}}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){if(this.nodeType!=1)return false;var opt=jQuery.extend({},optall),p,hidden=jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)return opt.complete.call(this);if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}if(opt.overflow!=null)this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}if(parts[1])end=((parts[1]=="-="?-1:1)*end)+start;e.custom(start,end,unit);}else +e.custom(start,val,"");}});return true;});},queue:function(type,fn){if(jQuery.isFunction(type)||(type&&type.constructor==Array)){fn=type;type="fx";}if(!type||(typeof type=="string"&&!fn))return queue(this[0],type);return this.each(function(){if(fn.constructor==Array)queue(this,type,fn);else{queue(this,type).push(fn);if(queue(this,type).length==1)fn.call(this);}});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue)this.queue([]);this.each(function(){for(var i=timers.length-1;i>=0;i--)if(timers[i].elem==this){if(gotoEnd)timers[i](true);timers.splice(i,1);}});if(!gotoEnd)this.dequeue();return this;}});var queue=function(elem,type,array){if(elem){type=type||"fx";var q=jQuery.data(elem,type+"queue");if(!q||array)q=jQuery.data(elem,type+"queue",jQuery.makeArray(array));}return q;};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length)q[0].call(this);});};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:jQuery.fx.speeds[opt.duration])||jQuery.fx.speeds.def;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false)jQuery(this).dequeue();if(jQuery.isFunction(opt.old))opt.old.call(this);};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],timerId:null,fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)options.orig={};}});jQuery.fx.prototype={update:function(){if(this.options.step)this.options.step.call(this.elem,this.now,this);(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop=="height"||this.prop=="width")this.elem.style.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null)return this.elem[this.prop];var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(gotoEnd){return self.step(gotoEnd);}t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timerId==null){jQuery.timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++)if(!timers[i]())timers.splice(i--,1);if(!timers.length){clearInterval(jQuery.timerId);jQuery.timerId=null;}},13);}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(0,this.cur());if(this.prop=="width"||this.prop=="height")this.elem.style[this.prop]="1px";jQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(gotoEnd){var t=now();if(gotoEnd||t>this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)if(this.options.curAnim[i]!==true)done=false;if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none")this.elem.style.display="block";}if(this.options.hide)this.elem.style.display="none";if(this.options.hide||this.options.show)for(var p in this.options.curAnim)jQuery.attr(this.elem.style,p,this.options.orig[p]);}if(done)this.options.complete.call(this.elem);return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}return true;}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,def:400},step:{scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;},scrollTop:function(fx){fx.elem.scrollTop=fx.now;},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit;}}});jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem)with(jQuery.browser){var parent=elem.parentNode,offsetChild=elem,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522&&!/adobeair/i.test(userAgent),css=jQuery.curCSS,fixed=css(elem,"position")=="fixed";if(elem.getBoundingClientRect){var box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));add(-doc.documentElement.clientLeft,-doc.documentElement.clientTop);}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(offsetParent.tagName)||safari&&!safari2)border(offsetParent);if(!fixed&&css(offsetParent,"position")=="fixed")fixed=true;offsetChild=/^body$/i.test(offsetParent.tagName)?offsetChild:offsetParent;offsetParent=offsetParent.offsetParent;}while(parent&&parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table.*$/i.test(css(parent,"display")))add(-parent.scrollLeft,-parent.scrollTop);if(mozilla&&css(parent,"overflow")!="visible")border(parent);parent=parent.parentNode;}if((safari2&&(fixed||css(offsetChild,"position")=="absolute"))||(mozilla&&css(offsetChild,"position")!="absolute"))add(-doc.body.offsetLeft,-doc.body.offsetTop);if(fixed)add(Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));}results={top:top,left:left};}function border(elem){add(jQuery.curCSS(elem,"borderLeftWidth",true),jQuery.curCSS(elem,"borderTopWidth",true));}function add(l,t){left+=parseInt(l,10)||0;top+=parseInt(t,10)||0;}return results;};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,'marginTop');offset.left-=num(this,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}return results;},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,'position')=='static'))offsetParent=offsetParent.offsetParent;return jQuery(offsetParent);}});jQuery.each(['Left','Top'],function(i,name){var method='scroll'+name;jQuery.fn[method]=function(val){if(!this[0])return;return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val;}):this[0]==window||this[0]==document?self[i?'pageYOffset':'pageXOffset']||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method];};});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom";jQuery.fn["inner"+name]=function(){return this[name.toLowerCase()]()+num(this,"padding"+tl)+num(this,"padding"+br);};jQuery.fn["outer"+name]=function(margin){return this["inner"+name]()+num(this,"border"+tl+"Width")+num(this,"border"+br+"Width")+(margin?num(this,"margin"+tl)+num(this,"margin"+br):0);};});})();
\ No newline at end of file diff --git a/doc/doc_index/0.1/_static/minus.png b/doc/doc_index/0.1/_static/minus.png Binary files differnew file mode 100644 index 00000000..da1c5620 --- /dev/null +++ b/doc/doc_index/0.1/_static/minus.png diff --git a/doc/doc_index/0.1/_static/plus.png b/doc/doc_index/0.1/_static/plus.png Binary files differnew file mode 100644 index 00000000..b3cb3742 --- /dev/null +++ b/doc/doc_index/0.1/_static/plus.png diff --git a/doc/doc_index/0.1/_static/pygments.css b/doc/doc_index/0.1/_static/pygments.css new file mode 100644 index 00000000..1f2d2b61 --- /dev/null +++ b/doc/doc_index/0.1/_static/pygments.css @@ -0,0 +1,61 @@ +.hll { background-color: #ffffcc } +.c { color: #408090; font-style: italic } /* Comment */ +.err { border: 1px solid #FF0000 } /* Error */ +.k { color: #007020; font-weight: bold } /* Keyword */ +.o { color: #666666 } /* Operator */ +.cm { color: #408090; font-style: italic } /* Comment.Multiline */ +.cp { color: #007020 } /* Comment.Preproc */ +.c1 { color: #408090; font-style: italic } /* Comment.Single */ +.cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ +.gd { color: #A00000 } /* Generic.Deleted */ +.ge { font-style: italic } /* Generic.Emph */ +.gr { color: #FF0000 } /* Generic.Error */ +.gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.gi { color: #00A000 } /* Generic.Inserted */ +.go { color: #303030 } /* Generic.Output */ +.gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.gs { font-weight: bold } /* Generic.Strong */ +.gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.gt { color: #0040D0 } /* Generic.Traceback */ +.kc { color: #007020; font-weight: bold } /* Keyword.Constant */ +.kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ +.kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ +.kp { color: #007020 } /* Keyword.Pseudo */ +.kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ +.kt { color: #902000 } /* Keyword.Type */ +.m { color: #208050 } /* Literal.Number */ +.s { color: #4070a0 } /* Literal.String */ +.na { color: #4070a0 } /* Name.Attribute */ +.nb { color: #007020 } /* Name.Builtin */ +.nc { color: #0e84b5; font-weight: bold } /* Name.Class */ +.no { color: #60add5 } /* Name.Constant */ +.nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.ni { color: #d55537; font-weight: bold } /* Name.Entity */ +.ne { color: #007020 } /* Name.Exception */ +.nf { color: #06287e } /* Name.Function */ +.nl { color: #002070; font-weight: bold } /* Name.Label */ +.nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.nt { color: #062873; font-weight: bold } /* Name.Tag */ +.nv { color: #bb60d5 } /* Name.Variable */ +.ow { color: #007020; font-weight: bold } /* Operator.Word */ +.w { color: #bbbbbb } /* Text.Whitespace */ +.mf { color: #208050 } /* Literal.Number.Float */ +.mh { color: #208050 } /* Literal.Number.Hex */ +.mi { color: #208050 } /* Literal.Number.Integer */ +.mo { color: #208050 } /* Literal.Number.Oct */ +.sb { color: #4070a0 } /* Literal.String.Backtick */ +.sc { color: #4070a0 } /* Literal.String.Char */ +.sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ +.s2 { color: #4070a0 } /* Literal.String.Double */ +.se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ +.sh { color: #4070a0 } /* Literal.String.Heredoc */ +.si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ +.sx { color: #c65d09 } /* Literal.String.Other */ +.sr { color: #235388 } /* Literal.String.Regex */ +.s1 { color: #4070a0 } /* Literal.String.Single */ +.ss { color: #517918 } /* Literal.String.Symbol */ +.bp { color: #007020 } /* Name.Builtin.Pseudo */ +.vc { color: #bb60d5 } /* Name.Variable.Class */ +.vg { color: #bb60d5 } /* Name.Variable.Global */ +.vi { color: #bb60d5 } /* Name.Variable.Instance */ +.il { color: #208050 } /* Literal.Number.Integer.Long */
\ No newline at end of file diff --git a/doc/doc_index/0.1/_static/searchtools.js b/doc/doc_index/0.1/_static/searchtools.js new file mode 100644 index 00000000..e0226258 --- /dev/null +++ b/doc/doc_index/0.1/_static/searchtools.js @@ -0,0 +1,467 @@ +/** + * helper function to return a node containing the + * search summary for a given text. keywords is a list + * of stemmed words, hlwords is the list of normal, unstemmed + * words. the first one is used to find the occurance, the + * latter for highlighting it. + */ + +jQuery.makeSearchSummary = function(text, keywords, hlwords) { + var textLower = text.toLowerCase(); + var start = 0; + $.each(keywords, function() { + var i = textLower.indexOf(this.toLowerCase()); + if (i > -1) + start = i; + }); + start = Math.max(start - 120, 0); + var excerpt = ((start > 0) ? '...' : '') + + $.trim(text.substr(start, 240)) + + ((start + 240 - text.length) ? '...' : ''); + var rv = $('<div class="context"></div>').text(excerpt); + $.each(hlwords, function() { + rv = rv.highlightText(this, 'highlight'); + }); + return rv; +} + +/** + * Porter Stemmer + */ +var PorterStemmer = function() { + + var step2list = { + ational: 'ate', + tional: 'tion', + enci: 'ence', + anci: 'ance', + izer: 'ize', + bli: 'ble', + alli: 'al', + entli: 'ent', + eli: 'e', + ousli: 'ous', + ization: 'ize', + ation: 'ate', + ator: 'ate', + alism: 'al', + iveness: 'ive', + fulness: 'ful', + ousness: 'ous', + aliti: 'al', + iviti: 'ive', + biliti: 'ble', + logi: 'log' + }; + + var step3list = { + icate: 'ic', + ative: '', + alize: 'al', + iciti: 'ic', + ical: 'ic', + ful: '', + ness: '' + }; + + var c = "[^aeiou]"; // consonant + var v = "[aeiouy]"; // vowel + var C = c + "[^aeiouy]*"; // consonant sequence + var V = v + "[aeiou]*"; // vowel sequence + + var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0 + var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 + var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 + var s_v = "^(" + C + ")?" + v; // vowel in stem + + this.stemWord = function (w) { + var stem; + var suffix; + var firstch; + var origword = w; + + if (w.length < 3) + return w; + + var re; + var re2; + var re3; + var re4; + + firstch = w.substr(0,1); + if (firstch == "y") + w = firstch.toUpperCase() + w.substr(1); + + // Step 1a + re = /^(.+?)(ss|i)es$/; + re2 = /^(.+?)([^s])s$/; + + if (re.test(w)) + w = w.replace(re,"$1$2"); + else if (re2.test(w)) + w = w.replace(re2,"$1$2"); + + // Step 1b + re = /^(.+?)eed$/; + re2 = /^(.+?)(ed|ing)$/; + if (re.test(w)) { + var fp = re.exec(w); + re = new RegExp(mgr0); + if (re.test(fp[1])) { + re = /.$/; + w = w.replace(re,""); + } + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1]; + re2 = new RegExp(s_v); + if (re2.test(stem)) { + w = stem; + re2 = /(at|bl|iz)$/; + re3 = new RegExp("([^aeiouylsz])\\1$"); + re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re2.test(w)) + w = w + "e"; + else if (re3.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + else if (re4.test(w)) + w = w + "e"; + } + } + + // Step 1c + re = /^(.+?)y$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(s_v); + if (re.test(stem)) + w = stem + "i"; + } + + // Step 2 + re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step2list[suffix]; + } + + // Step 3 + re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step3list[suffix]; + } + + // Step 4 + re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; + re2 = /^(.+?)(s|t)(ion)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + if (re.test(stem)) + w = stem; + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1] + fp[2]; + re2 = new RegExp(mgr1); + if (re2.test(stem)) + w = stem; + } + + // Step 5 + re = /^(.+?)e$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + re2 = new RegExp(meq1); + re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) + w = stem; + } + re = /ll$/; + re2 = new RegExp(mgr1); + if (re.test(w) && re2.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + + // and turn initial Y back to y + if (firstch == "y") + w = firstch.toLowerCase() + w.substr(1); + return w; + } +} + + +/** + * Search Module + */ +var Search = { + + _index : null, + _queued_query : null, + _pulse_status : -1, + + init : function() { + var params = $.getQueryParameters(); + if (params.q) { + var query = params.q[0]; + $('input[name="q"]')[0].value = query; + this.performSearch(query); + } + }, + + /** + * Sets the index + */ + setIndex : function(index) { + var q; + this._index = index; + if ((q = this._queued_query) !== null) { + this._queued_query = null; + Search.query(q); + } + }, + + hasIndex : function() { + return this._index !== null; + }, + + deferQuery : function(query) { + this._queued_query = query; + }, + + stopPulse : function() { + this._pulse_status = 0; + }, + + startPulse : function() { + if (this._pulse_status >= 0) + return; + function pulse() { + Search._pulse_status = (Search._pulse_status + 1) % 4; + var dotString = ''; + for (var i = 0; i < Search._pulse_status; i++) + dotString += '.'; + Search.dots.text(dotString); + if (Search._pulse_status > -1) + window.setTimeout(pulse, 500); + }; + pulse(); + }, + + /** + * perform a search for something + */ + performSearch : function(query) { + // create the required interface elements + this.out = $('#search-results'); + this.title = $('<h2>' + _('Searching') + '</h2>').appendTo(this.out); + this.dots = $('<span></span>').appendTo(this.title); + this.status = $('<p style="display: none"></p>').appendTo(this.out); + this.output = $('<ul class="search"/>').appendTo(this.out); + + $('#search-progress').text(_('Preparing search...')); + this.startPulse(); + + // index already loaded, the browser was quick! + if (this.hasIndex()) + this.query(query); + else + this.deferQuery(query); + }, + + query : function(query) { + // stem the searchterms and add them to the + // correct list + var stemmer = new PorterStemmer(); + var searchterms = []; + var excluded = []; + var hlterms = []; + var tmp = query.split(/\s+/); + var object = (tmp.length == 1) ? tmp[0].toLowerCase() : null; + for (var i = 0; i < tmp.length; i++) { + // stem the word + var word = stemmer.stemWord(tmp[i]).toLowerCase(); + // select the correct list + if (word[0] == '-') { + var toAppend = excluded; + word = word.substr(1); + } + else { + var toAppend = searchterms; + hlterms.push(tmp[i].toLowerCase()); + } + // only add if not already in the list + if (!$.contains(toAppend, word)) + toAppend.push(word); + }; + var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" ")); + + console.debug('SEARCH: searching for:'); + console.info('required: ', searchterms); + console.info('excluded: ', excluded); + + // prepare search + var filenames = this._index.filenames; + var titles = this._index.titles; + var terms = this._index.terms; + var descrefs = this._index.descrefs; + var modules = this._index.modules; + var desctypes = this._index.desctypes; + var fileMap = {}; + var files = null; + var objectResults = []; + var regularResults = []; + $('#search-progress').empty(); + + // lookup as object + if (object != null) { + for (var module in modules) { + if (module.indexOf(object) > -1) { + fn = modules[module]; + descr = _('module, in ') + titles[fn]; + objectResults.push([filenames[fn], module, '#module-'+module, descr]); + } + } + for (var prefix in descrefs) { + for (var name in descrefs[prefix]) { + var fullname = (prefix ? prefix + '.' : '') + name; + if (fullname.toLowerCase().indexOf(object) > -1) { + match = descrefs[prefix][name]; + descr = desctypes[match[1]] + _(', in ') + titles[match[0]]; + objectResults.push([filenames[match[0]], fullname, '#'+fullname, descr]); + } + } + } + } + + // sort results descending + objectResults.sort(function(a, b) { + return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0); + }); + + + // perform the search on the required terms + for (var i = 0; i < searchterms.length; i++) { + var word = searchterms[i]; + // no match but word was a required one + if ((files = terms[word]) == null) + break; + if (files.length == undefined) { + files = [files]; + } + // create the mapping + for (var j = 0; j < files.length; j++) { + var file = files[j]; + if (file in fileMap) + fileMap[file].push(word); + else + fileMap[file] = [word]; + } + } + + // now check if the files don't contain excluded terms + for (var file in fileMap) { + var valid = true; + + // check if all requirements are matched + if (fileMap[file].length != searchterms.length) + continue; + + // ensure that none of the excluded terms is in the + // search result. + for (var i = 0; i < excluded.length; i++) { + if (terms[excluded[i]] == file || + $.contains(terms[excluded[i]] || [], file)) { + valid = false; + break; + } + } + + // if we have still a valid result we can add it + // to the result list + if (valid) + regularResults.push([filenames[file], titles[file], '', null]); + } + + // delete unused variables in order to not waste + // memory until list is retrieved completely + delete filenames, titles, terms; + + // now sort the regular results descending by title + regularResults.sort(function(a, b) { + var left = a[1].toLowerCase(); + var right = b[1].toLowerCase(); + return (left > right) ? -1 : ((left < right) ? 1 : 0); + }); + + // combine both + var results = regularResults.concat(objectResults); + + // print the results + var resultCount = results.length; + function displayNextItem() { + // results left, load the summary and display it + if (results.length) { + var item = results.pop(); + var listItem = $('<li style="display:none"></li>'); + listItem.append($('<a/>').attr( + 'href', + item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX + + highlightstring + item[2]).html(item[1])); + if (item[3]) { + listItem.append($('<span> (' + item[3] + ')</span>')); + Search.output.append(listItem); + listItem.slideDown(5, function() { + displayNextItem(); + }); + } else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) { + $.get('_sources/' + item[0] + '.txt', function(data) { + listItem.append($.makeSearchSummary(data, searchterms, hlterms)); + Search.output.append(listItem); + listItem.slideDown(5, function() { + displayNextItem(); + }); + }); + } else { + // no source available, just display title + Search.output.append(listItem); + listItem.slideDown(5, function() { + displayNextItem(); + }); + } + } + // search finished, update title and status message + else { + Search.stopPulse(); + Search.title.text(_('Search Results')); + if (!resultCount) + Search.status.text(_('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.')); + else + Search.status.text(_('Search finished, found %s page(s) matching the search query.').replace('%s', resultCount)); + Search.status.fadeIn(500); + } + } + displayNextItem(); + } +} + +$(document).ready(function() { + Search.init(); +}); diff --git a/doc/doc_index/0.1/genindex.html b/doc/doc_index/0.1/genindex.html new file mode 100644 index 00000000..51534030 --- /dev/null +++ b/doc/doc_index/0.1/genindex.html @@ -0,0 +1,293 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>Index — GitPython v0.1.7 documentation</title> + <link rel="stylesheet" href="_static/default.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '#', + VERSION: '0.1.7', + COLLAPSE_MODINDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <link rel="top" title="GitPython v0.1.7 documentation" href="index.html" /> + </head> + <body> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="#" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="modindex.html" title="Global Module Index" + accesskey="M">modules</a> |</li> + <li><a href="index.html">GitPython v0.1.7 documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + + <h1 id="index">Index</h1> + + <a href="#A"><strong>A</strong></a> | <a href="#B"><strong>B</strong></a> | <a href="#C"><strong>C</strong></a> | <a href="#D"><strong>D</strong></a> | <a href="#E"><strong>E</strong></a> | <a href="#F"><strong>F</strong></a> | <a href="#G"><strong>G</strong></a> | <a href="#H"><strong>H</strong></a> | <a href="#I"><strong>I</strong></a> | <a href="#K"><strong>K</strong></a> | <a href="#L"><strong>L</strong></a> | <a href="#M"><strong>M</strong></a> | <a href="#N"><strong>N</strong></a> | <a href="#R"><strong>R</strong></a> | <a href="#S"><strong>S</strong></a> | <a href="#T"><strong>T</strong></a> | <a href="#V"><strong>V</strong></a> + + <hr /> + + +<h2 id="A">A</h2> +<table width="100%" class="indextable"><tr><td width="33%" valign="top"> +<dl> + +<dt><a href="reference.html#git.repo.Repo.active_branch">active_branch (git.repo.Repo attribute)</a></dt> +<dt><a href="reference.html#git.actor.Actor">Actor (class in git.actor)</a></dt> +<dt><a href="reference.html#git.commit.Commit.actor">actor() (git.commit.Commit class method)</a></dt> +<dt><a href="reference.html#git.repo.Repo.alternates">alternates (git.repo.Repo attribute)</a></dt></dl></td><td width="33%" valign="top"><dl> +<dt><a href="reference.html#git.repo.Repo.archive_tar">archive_tar() (git.repo.Repo method)</a></dt> +<dt><a href="reference.html#git.repo.Repo.archive_tar_gz">archive_tar_gz() (git.repo.Repo method)</a></dt> +</dl></td></tr></table> + +<h2 id="B">B</h2> +<table width="100%" class="indextable"><tr><td width="33%" valign="top"> +<dl> + +<dt><a href="reference.html#git.blob.Blob.basename">basename (git.blob.Blob attribute)</a></dt> + <dd><dl> + <dt><a href="reference.html#git.tree.Tree.basename">(git.tree.Tree attribute)</a></dt> + </dl></dd> +<dt><a href="reference.html#git.blob.Blob.blame">blame() (git.blob.Blob class method)</a></dt> +<dt><a href="reference.html#git.blob.Blob">Blob (class in git.blob)</a></dt></dl></td><td width="33%" valign="top"><dl> +<dt><a href="reference.html#git.repo.Repo.blob">blob() (git.repo.Repo method)</a></dt> +<dt><a href="reference.html#git.repo.Repo.branches">branches (git.repo.Repo attribute)</a></dt> +</dl></td></tr></table> + +<h2 id="C">C</h2> +<table width="100%" class="indextable"><tr><td width="33%" valign="top"> +<dl> + +<dt><a href="reference.html#git.commit.Commit">Commit (class in git.commit)</a></dt> +<dt><a href="reference.html#git.repo.Repo.commit">commit() (git.repo.Repo method)</a></dt> +<dt><a href="reference.html#git.repo.Repo.commit_count">commit_count() (git.repo.Repo method)</a></dt> +<dt><a href="reference.html#git.repo.Repo.commit_deltas_from">commit_deltas_from() (git.repo.Repo method)</a></dt> +<dt><a href="reference.html#git.repo.Repo.commit_diff">commit_diff() (git.repo.Repo method)</a></dt> +<dt><a href="reference.html#git.repo.Repo.commits">commits() (git.repo.Repo method)</a></dt></dl></td><td width="33%" valign="top"><dl> +<dt><a href="reference.html#git.repo.Repo.commits_between">commits_between() (git.repo.Repo method)</a></dt> +<dt><a href="reference.html#git.repo.Repo.commits_since">commits_since() (git.repo.Repo method)</a></dt> +<dt><a href="reference.html#git.tree.Tree.content_from_string">content_from_string() (git.tree.Tree static method)</a></dt> +<dt><a href="reference.html#git.commit.Commit.count">count() (git.commit.Commit class method)</a></dt> +<dt><a href="reference.html#git.repo.Repo.create">create() (git.repo.Repo class method)</a></dt> +</dl></td></tr></table> + +<h2 id="D">D</h2> +<table width="100%" class="indextable"><tr><td width="33%" valign="top"> +<dl> + +<dt><a href="reference.html#git.repo.Repo.daemon_export">daemon_export (git.repo.Repo attribute)</a></dt> +<dt><a href="reference.html#git.utils.dashify">dashify() (in module git.utils)</a></dt> +<dt><a href="reference.html#git.blob.Blob.data">data (git.blob.Blob attribute)</a></dt> +<dt><a href="reference.html#git.repo.Repo.description">description (git.repo.Repo attribute)</a></dt> +<dt><a href="reference.html#git.diff.Diff">Diff (class in git.diff)</a></dt></dl></td><td width="33%" valign="top"><dl> +<dt><a href="reference.html#git.commit.Commit.diff">diff() (git.commit.Commit class method)</a></dt> + <dd><dl> + <dt><a href="reference.html#git.repo.Repo.diff">(git.repo.Repo method)</a></dt> + </dl></dd> +<dt><a href="reference.html#git.commit.Commit.diffs">diffs (git.commit.Commit attribute)</a></dt> +</dl></td></tr></table> + +<h2 id="E">E</h2> +<table width="100%" class="indextable"><tr><td width="33%" valign="top"> +<dl> + +<dt><a href="reference.html#git.cmd.Git.execute">execute() (git.cmd.Git method)</a></dt></dl></td><td width="33%" valign="top"><dl> +</dl></td></tr></table> + +<h2 id="F">F</h2> +<table width="100%" class="indextable"><tr><td width="33%" valign="top"> +<dl> + +<dt><a href="reference.html#git.commit.Commit.find_all">find_all() (git.commit.Commit class method)</a></dt> + <dd><dl> + <dt><a href="reference.html#git.head.Head.find_all">(git.head.Head class method)</a></dt> + <dt><a href="reference.html#git.tag.Tag.find_all">(git.tag.Tag class method)</a></dt> + </dl></dd> +<dt><a href="reference.html#git.repo.Repo.fork_bare">fork_bare() (git.repo.Repo method)</a></dt></dl></td><td width="33%" valign="top"><dl> +<dt><a href="reference.html#git.actor.Actor.from_string">from_string() (git.actor.Actor class method)</a></dt> + <dd><dl> + <dt><a href="reference.html#git.head.Head.from_string">(git.head.Head class method)</a></dt> + <dt><a href="reference.html#git.tag.Tag.from_string">(git.tag.Tag class method)</a></dt> + </dl></dd> +</dl></td></tr></table> + +<h2 id="G">G</h2> +<table width="100%" class="indextable"><tr><td width="33%" valign="top"> +<dl> + +<dt><a href="reference.html#git.tree.Tree.get">get() (git.tree.Tree method)</a></dt> +<dt><a href="reference.html#git.cmd.Git.get_dir">get_dir (git.cmd.Git attribute)</a></dt> +<dt><a href="reference.html#git.cmd.Git">Git (class in git.cmd)</a></dt> +<dt><a href="reference.html#module-git.actor">git.actor (module)</a></dt> +<dt><a href="reference.html#module-git.blob">git.blob (module)</a></dt> +<dt><a href="reference.html#module-git.cmd">git.cmd (module)</a></dt> +<dt><a href="reference.html#module-git.commit">git.commit (module)</a></dt> +<dt><a href="reference.html#module-git.diff">git.diff (module)</a></dt> +<dt><a href="reference.html#module-git.errors">git.errors (module)</a></dt></dl></td><td width="33%" valign="top"><dl> +<dt><a href="reference.html#module-git.head">git.head (module)</a></dt> +<dt><a href="reference.html#module-git.lazy">git.lazy (module)</a></dt> +<dt><a href="reference.html#module-git.repo">git.repo (module)</a></dt> +<dt><a href="reference.html#module-git.stats">git.stats (module)</a></dt> +<dt><a href="reference.html#module-git.tag">git.tag (module)</a></dt> +<dt><a href="reference.html#module-git.tree">git.tree (module)</a></dt> +<dt><a href="reference.html#module-git.utils">git.utils (module)</a></dt> +<dt><a href="reference.html#git.errors.GitCommandError">GitCommandError</a></dt> +</dl></td></tr></table> + +<h2 id="H">H</h2> +<table width="100%" class="indextable"><tr><td width="33%" valign="top"> +<dl> + +<dt><a href="reference.html#git.head.Head">Head (class in git.head)</a></dt> +<dt><a href="reference.html#git.repo.Repo.heads">heads (git.repo.Repo attribute)</a></dt></dl></td><td width="33%" valign="top"><dl> +</dl></td></tr></table> + +<h2 id="I">I</h2> +<table width="100%" class="indextable"><tr><td width="33%" valign="top"> +<dl> + +<dt><a href="reference.html#git.commit.Commit.id_abbrev">id_abbrev (git.commit.Commit attribute)</a></dt> +<dt><a href="reference.html#git.repo.Repo.init_bare">init_bare() (git.repo.Repo class method)</a></dt> +<dt><a href="reference.html#git.errors.InvalidGitRepositoryError">InvalidGitRepositoryError</a></dt> +<dt><a href="reference.html#git.repo.Repo.is_dirty">is_dirty (git.repo.Repo attribute)</a></dt></dl></td><td width="33%" valign="top"><dl> +<dt><a href="reference.html#git.utils.is_git_dir">is_git_dir() (in module git.utils)</a></dt> +<dt><a href="reference.html#git.tree.Tree.items">items() (git.tree.Tree method)</a></dt> +</dl></td></tr></table> + +<h2 id="K">K</h2> +<table width="100%" class="indextable"><tr><td width="33%" valign="top"> +<dl> + +<dt><a href="reference.html#git.tree.Tree.keys">keys() (git.tree.Tree method)</a></dt></dl></td><td width="33%" valign="top"><dl> +</dl></td></tr></table> + +<h2 id="L">L</h2> +<table width="100%" class="indextable"><tr><td width="33%" valign="top"> +<dl> + +<dt><a href="reference.html#git.lazy.LazyMixin">LazyMixin (class in git.lazy)</a></dt> +<dt><a href="reference.html#git.commit.Commit.list_from_string">list_from_string() (git.commit.Commit class method)</a></dt> + <dd><dl> + <dt><a href="reference.html#git.diff.Diff.list_from_string">(git.diff.Diff class method)</a></dt> + <dt><a href="reference.html#git.head.Head.list_from_string">(git.head.Head class method)</a></dt> + <dt><a href="reference.html#git.stats.Stats.list_from_string">(git.stats.Stats class method)</a></dt> + <dt><a href="reference.html#git.tag.Tag.list_from_string">(git.tag.Tag class method)</a></dt> + </dl></dd></dl></td><td width="33%" valign="top"><dl> +<dt><a href="reference.html#git.repo.Repo.log">log() (git.repo.Repo method)</a></dt> +</dl></td></tr></table> + +<h2 id="M">M</h2> +<table width="100%" class="indextable"><tr><td width="33%" valign="top"> +<dl> + +<dt><a href="reference.html#git.blob.Blob.mime_type">mime_type (git.blob.Blob attribute)</a></dt></dl></td><td width="33%" valign="top"><dl> +</dl></td></tr></table> + +<h2 id="N">N</h2> +<table width="100%" class="indextable"><tr><td width="33%" valign="top"> +<dl> + +<dt><a href="reference.html#git.errors.NoSuchPathError">NoSuchPathError</a></dt></dl></td><td width="33%" valign="top"><dl> +</dl></td></tr></table> + +<h2 id="R">R</h2> +<table width="100%" class="indextable"><tr><td width="33%" valign="top"> +<dl> + +<dt><a href="reference.html#git.repo.Repo">Repo (class in git.repo)</a></dt></dl></td><td width="33%" valign="top"><dl> +</dl></td></tr></table> + +<h2 id="S">S</h2> +<table width="100%" class="indextable"><tr><td width="33%" valign="top"> +<dl> + +<dt><a href="reference.html#git.blob.Blob.size">size (git.blob.Blob attribute)</a></dt> +<dt><a href="reference.html#git.stats.Stats">Stats (class in git.stats)</a></dt> +<dt><a href="reference.html#git.commit.Commit.stats">stats (git.commit.Commit attribute)</a></dt></dl></td><td width="33%" valign="top"><dl> +<dt><a href="reference.html#git.commit.Commit.summary">summary (git.commit.Commit attribute)</a></dt> +</dl></td></tr></table> + +<h2 id="T">T</h2> +<table width="100%" class="indextable"><tr><td width="33%" valign="top"> +<dl> + +<dt><a href="reference.html#git.tag.Tag">Tag (class in git.tag)</a></dt> +<dt><a href="reference.html#git.repo.Repo.tags">tags (git.repo.Repo attribute)</a></dt> +<dt><a href="reference.html#git.utils.touch">touch() (in module git.utils)</a></dt> +<dt><a href="reference.html#git.cmd.Git.transform_kwargs">transform_kwargs() (git.cmd.Git method)</a></dt></dl></td><td width="33%" valign="top"><dl> +<dt><a href="reference.html#git.tree.Tree">Tree (class in git.tree)</a></dt> +<dt><a href="reference.html#git.repo.Repo.tree">tree() (git.repo.Repo method)</a></dt> +</dl></td></tr></table> + +<h2 id="V">V</h2> +<table width="100%" class="indextable"><tr><td width="33%" valign="top"> +<dl> + +<dt><a href="reference.html#git.tree.Tree.values">values() (git.tree.Tree method)</a></dt></dl></td><td width="33%" valign="top"><dl> +</dl></td></tr></table> + + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + + + + <div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> + </div> + <script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="#" title="General Index" + >index</a></li> + <li class="right" > + <a href="modindex.html" title="Global Module Index" + >modules</a> |</li> + <li><a href="index.html">GitPython v0.1.7 documentation</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright Copyright (C) 2008-2010 Michael Trier and contributors. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.5. + </div> + </body> +</html>
\ No newline at end of file diff --git a/doc/doc_index/0.1/index.html b/doc/doc_index/0.1/index.html new file mode 100644 index 00000000..dbce5c6d --- /dev/null +++ b/doc/doc_index/0.1/index.html @@ -0,0 +1,155 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>GitPython Documentation — GitPython v0.1.7 documentation</title> + <link rel="stylesheet" href="_static/default.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '#', + VERSION: '0.1.7', + COLLAPSE_MODINDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <link rel="top" title="GitPython v0.1.7 documentation" href="#" /> + <link rel="next" title="Overview / Install" href="intro.html" /> + </head> + <body> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="modindex.html" title="Global Module Index" + accesskey="M">modules</a> |</li> + <li class="right" > + <a href="intro.html" title="Overview / Install" + accesskey="N">next</a> |</li> + <li><a href="#">GitPython v0.1.7 documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="gitpython-documentation"> +<h1>GitPython Documentation<a class="headerlink" href="#gitpython-documentation" title="Permalink to this headline">¶</a></h1> +<p>Contents:</p> +<ul> +<li class="toctree-l1"><a class="reference external" href="intro.html">Overview / Install</a><ul> +<li class="toctree-l2"><a class="reference external" href="intro.html#requirements">Requirements</a></li> +<li class="toctree-l2"><a class="reference external" href="intro.html#installing-gitpython">Installing GitPython</a></li> +<li class="toctree-l2"><a class="reference external" href="intro.html#getting-started">Getting Started</a></li> +<li class="toctree-l2"><a class="reference external" href="intro.html#api-reference">API Reference</a></li> +<li class="toctree-l2"><a class="reference external" href="intro.html#source-code">Source Code</a></li> +<li class="toctree-l2"><a class="reference external" href="intro.html#license-information">License Information</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference external" href="tutorial.html">GitPython Tutorial</a><ul> +<li class="toctree-l2"><a class="reference external" href="tutorial.html#initialize-a-repo-object">Initialize a Repo object</a></li> +<li class="toctree-l2"><a class="reference external" href="tutorial.html#getting-a-list-of-commits">Getting a list of commits</a></li> +<li class="toctree-l2"><a class="reference external" href="tutorial.html#the-commit-object">The Commit object</a></li> +<li class="toctree-l2"><a class="reference external" href="tutorial.html#the-tree-object">The Tree object</a></li> +<li class="toctree-l2"><a class="reference external" href="tutorial.html#the-blob-object">The Blob object</a></li> +<li class="toctree-l2"><a class="reference external" href="tutorial.html#what-else">What Else?</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference external" href="reference.html">API Reference</a><ul> +<li class="toctree-l2"><a class="reference external" href="reference.html#module-git.actor">Actor</a></li> +<li class="toctree-l2"><a class="reference external" href="reference.html#module-git.blob">Blob</a></li> +<li class="toctree-l2"><a class="reference external" href="reference.html#module-git.cmd">Git</a></li> +<li class="toctree-l2"><a class="reference external" href="reference.html#module-git.commit">Commit</a></li> +<li class="toctree-l2"><a class="reference external" href="reference.html#module-git.diff">Diff</a></li> +<li class="toctree-l2"><a class="reference external" href="reference.html#module-git.errors">Errors</a></li> +<li class="toctree-l2"><a class="reference external" href="reference.html#module-git.head">Head</a></li> +<li class="toctree-l2"><a class="reference external" href="reference.html#module-git.lazy">Lazy</a></li> +<li class="toctree-l2"><a class="reference external" href="reference.html#module-git.repo">Repo</a></li> +<li class="toctree-l2"><a class="reference external" href="reference.html#module-git.stats">Stats</a></li> +<li class="toctree-l2"><a class="reference external" href="reference.html#module-git.tag">Tag</a></li> +<li class="toctree-l2"><a class="reference external" href="reference.html#module-git.tree">Tree</a></li> +<li class="toctree-l2"><a class="reference external" href="reference.html#module-git.utils">Utils</a></li> +</ul> +</li> +</ul> +</div> +<div class="section" id="indices-and-tables"> +<h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline">¶</a></h1> +<ul class="simple"> +<li><a class="reference external" href="genindex.html"><em>Index</em></a></li> +<li><a class="reference external" href="modindex.html"><em>Module Index</em></a></li> +<li><a class="reference external" href="search.html"><em>Search Page</em></a></li> +</ul> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="#">Table Of Contents</a></h3> + <ul> +<li><a class="reference external" href="#">GitPython Documentation</a><ul> +</ul> +</li> +<li><a class="reference external" href="#indices-and-tables">Indices and tables</a></li> +</ul> + + <h4>Next topic</h4> + <p class="topless"><a href="intro.html" + title="next chapter">Overview / Install</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="_sources/index.txt" + rel="nofollow">Show Source</a></li> + </ul> + <div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> + </div> + <script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="modindex.html" title="Global Module Index" + >modules</a> |</li> + <li class="right" > + <a href="intro.html" title="Overview / Install" + >next</a> |</li> + <li><a href="#">GitPython v0.1.7 documentation</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright Copyright (C) 2008-2010 Michael Trier and contributors. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.5. + </div> + </body> +</html>
\ No newline at end of file diff --git a/doc/doc_index/0.1/intro.html b/doc/doc_index/0.1/intro.html new file mode 100644 index 00000000..77d9f685 --- /dev/null +++ b/doc/doc_index/0.1/intro.html @@ -0,0 +1,184 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>Overview / Install — GitPython v0.1.7 documentation</title> + <link rel="stylesheet" href="_static/default.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '#', + VERSION: '0.1.7', + COLLAPSE_MODINDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <link rel="top" title="GitPython v0.1.7 documentation" href="index.html" /> + <link rel="next" title="GitPython Tutorial" href="tutorial.html" /> + <link rel="prev" title="GitPython Documentation" href="index.html" /> + </head> + <body> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="modindex.html" title="Global Module Index" + accesskey="M">modules</a> |</li> + <li class="right" > + <a href="tutorial.html" title="GitPython Tutorial" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="index.html" title="GitPython Documentation" + accesskey="P">previous</a> |</li> + <li><a href="index.html">GitPython v0.1.7 documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="overview-install"> +<span id="intro-toplevel"></span><h1>Overview / Install<a class="headerlink" href="#overview-install" title="Permalink to this headline">¶</a></h1> +<p>GitPython is a python library used to interact with Git repositories.</p> +<p>GitPython is a port of the <a class="reference external" href="http://grit.rubyforge.org">grit</a> library in Ruby created by +Tom Preston-Werner and Chris Wanstrath.</p> +<div class="section" id="requirements"> +<h2>Requirements<a class="headerlink" href="#requirements" title="Permalink to this headline">¶</a></h2> +<ul class="simple"> +<li><a class="reference external" href="http://git-scm.com/">Git</a> tested with 1.5.3.7</li> +<li><a class="reference external" href="http://code.google.com/p/python-nose/">Python Nose</a> - used for running the tests</li> +<li><a class="reference external" href="http://www.voidspace.org.uk/python/mock/">Mock by Michael Foord</a> used for tests. Requires 0.5 or higher</li> +</ul> +</div> +<div class="section" id="installing-gitpython"> +<h2>Installing GitPython<a class="headerlink" href="#installing-gitpython" title="Permalink to this headline">¶</a></h2> +<p>Installing GitPython is easily done using +<a class="reference external" href="http://peak.telecommunity.com/DevCenter/setuptools">setuptools</a>. Assuming it is +installed, just run the following from the command-line:</p> +<div class="highlight-none"><div class="highlight"><pre># easy_install GitPython +</pre></div> +</div> +<p>This command will download the latest version of GitPython from the +<a class="reference external" href="http://pypi.python.org/pypi/GitPython">Python Package Index</a> and install it +to your system. More information about <tt class="docutils literal"><span class="pre">easy_install</span></tt> and pypi can be found +here:</p> +<ul class="simple"> +<li><a class="reference external" href="http://peak.telecommunity.com/DevCenter/setuptools">setuptools</a></li> +<li><a class="reference external" href="http://peak.telecommunity.com/DevCenter/EasyInstall#installation-instructions">install setuptools</a></li> +<li><a class="reference external" href="http://pypi.python.org/pypi/GitPython">pypi</a></li> +</ul> +<p>Alternatively, you can install from the distribution using the <tt class="docutils literal"><span class="pre">setup.py</span></tt> +script:</p> +<div class="highlight-none"><div class="highlight"><pre># python setup.py install +</pre></div> +</div> +</div> +<div class="section" id="getting-started"> +<h2>Getting Started<a class="headerlink" href="#getting-started" title="Permalink to this headline">¶</a></h2> +<ul class="simple"> +<li><a class="reference external" href="tutorial.html#tutorial-toplevel"><em>GitPython Tutorial</em></a> - This tutorial provides a walk-through of some of +the basic functionality and concepts used in GitPython. It, however, is not +exhaustive so you are encouraged to spend some time in the +<a class="reference external" href="reference.html#api-reference-toplevel"><em>API Reference</em></a>.</li> +</ul> +</div> +<div class="section" id="api-reference"> +<h2>API Reference<a class="headerlink" href="#api-reference" title="Permalink to this headline">¶</a></h2> +<p>An organized section of the GitPthon API is at <a class="reference external" href="reference.html#api-reference-toplevel"><em>API Reference</em></a>.</p> +</div> +<div class="section" id="source-code"> +<h2>Source Code<a class="headerlink" href="#source-code" title="Permalink to this headline">¶</a></h2> +<p>GitPython’s git repo is available on Gitorious, which can be browsed at:</p> +<p><a class="reference external" href="http://gitorious.org/git-python">http://gitorious.org/git-python</a></p> +<p>and cloned from:</p> +<p>git://gitorious.org/git-python/mainline.git</p> +</div> +<div class="section" id="license-information"> +<h2>License Information<a class="headerlink" href="#license-information" title="Permalink to this headline">¶</a></h2> +<p>GitPython is licensed under the New BSD License. See the LICENSE file for +more information.</p> +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference external" href="#">Overview / Install</a><ul> +<li><a class="reference external" href="#requirements">Requirements</a></li> +<li><a class="reference external" href="#installing-gitpython">Installing GitPython</a></li> +<li><a class="reference external" href="#getting-started">Getting Started</a></li> +<li><a class="reference external" href="#api-reference">API Reference</a></li> +<li><a class="reference external" href="#source-code">Source Code</a></li> +<li><a class="reference external" href="#license-information">License Information</a></li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="index.html" + title="previous chapter">GitPython Documentation</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="tutorial.html" + title="next chapter">GitPython Tutorial</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="_sources/intro.txt" + rel="nofollow">Show Source</a></li> + </ul> + <div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> + </div> + <script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="modindex.html" title="Global Module Index" + >modules</a> |</li> + <li class="right" > + <a href="tutorial.html" title="GitPython Tutorial" + >next</a> |</li> + <li class="right" > + <a href="index.html" title="GitPython Documentation" + >previous</a> |</li> + <li><a href="index.html">GitPython v0.1.7 documentation</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright Copyright (C) 2008-2010 Michael Trier and contributors. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.5. + </div> + </body> +</html>
\ No newline at end of file diff --git a/doc/doc_index/0.1/modindex.html b/doc/doc_index/0.1/modindex.html new file mode 100644 index 00000000..f21fcac7 --- /dev/null +++ b/doc/doc_index/0.1/modindex.html @@ -0,0 +1,152 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>Global Module Index — GitPython v0.1.7 documentation</title> + <link rel="stylesheet" href="_static/default.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '#', + VERSION: '0.1.7', + COLLAPSE_MODINDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <link rel="top" title="GitPython v0.1.7 documentation" href="index.html" /> + + + + </head> + <body> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="#" title="Global Module Index" + accesskey="M">modules</a> |</li> + <li><a href="index.html">GitPython v0.1.7 documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + + <h1 id="global-module-index">Global Module Index</h1> + <a href="#cap-G"><strong>G</strong></a> + <hr/> + + <table width="100%" class="indextable" cellspacing="0" cellpadding="2"><tr class="pcap"><td></td><td> </td><td></td></tr> + <tr class="cap"><td></td><td><a name="cap-G"><strong>G</strong></a></td><td></td></tr><tr> + <td><img src="_static/minus.png" id="toggle-1" + class="toggler" style="display: none" alt="-" /></td> + <td> + <tt class="xref">git</tt></td><td> + <em></em></td></tr><tr class="cg-1"> + <td></td> + <td> + <a href="reference.html#module-git.actor"><tt class="xref">git.actor</tt></a></td><td> + <em></em></td></tr><tr class="cg-1"> + <td></td> + <td> + <a href="reference.html#module-git.blob"><tt class="xref">git.blob</tt></a></td><td> + <em></em></td></tr><tr class="cg-1"> + <td></td> + <td> + <a href="reference.html#module-git.cmd"><tt class="xref">git.cmd</tt></a></td><td> + <em></em></td></tr><tr class="cg-1"> + <td></td> + <td> + <a href="reference.html#module-git.commit"><tt class="xref">git.commit</tt></a></td><td> + <em></em></td></tr><tr class="cg-1"> + <td></td> + <td> + <a href="reference.html#module-git.diff"><tt class="xref">git.diff</tt></a></td><td> + <em></em></td></tr><tr class="cg-1"> + <td></td> + <td> + <a href="reference.html#module-git.errors"><tt class="xref">git.errors</tt></a></td><td> + <em></em></td></tr><tr class="cg-1"> + <td></td> + <td> + <a href="reference.html#module-git.head"><tt class="xref">git.head</tt></a></td><td> + <em></em></td></tr><tr class="cg-1"> + <td></td> + <td> + <a href="reference.html#module-git.lazy"><tt class="xref">git.lazy</tt></a></td><td> + <em></em></td></tr><tr class="cg-1"> + <td></td> + <td> + <a href="reference.html#module-git.repo"><tt class="xref">git.repo</tt></a></td><td> + <em></em></td></tr><tr class="cg-1"> + <td></td> + <td> + <a href="reference.html#module-git.stats"><tt class="xref">git.stats</tt></a></td><td> + <em></em></td></tr><tr class="cg-1"> + <td></td> + <td> + <a href="reference.html#module-git.tag"><tt class="xref">git.tag</tt></a></td><td> + <em></em></td></tr><tr class="cg-1"> + <td></td> + <td> + <a href="reference.html#module-git.tree"><tt class="xref">git.tree</tt></a></td><td> + <em></em></td></tr><tr class="cg-1"> + <td></td> + <td> + <a href="reference.html#module-git.utils"><tt class="xref">git.utils</tt></a></td><td> + <em></em></td></tr> + </table> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> + </div> + <script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="#" title="Global Module Index" + >modules</a> |</li> + <li><a href="index.html">GitPython v0.1.7 documentation</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright Copyright (C) 2008-2010 Michael Trier and contributors. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.5. + </div> + </body> +</html>
\ No newline at end of file diff --git a/doc/doc_index/0.1/objects.inv b/doc/doc_index/0.1/objects.inv new file mode 100644 index 00000000..34d39a37 --- /dev/null +++ b/doc/doc_index/0.1/objects.inv @@ -0,0 +1,89 @@ +# Sphinx inventory version 1 +# Project: GitPython +# Version: 0.1.7 +git.cmd mod reference.html +git.repo mod reference.html +git.diff mod reference.html +git.errors mod reference.html +git.commit mod reference.html +git.actor mod reference.html +git.tag mod reference.html +git.blob mod reference.html +git.head mod reference.html +git.lazy mod reference.html +git.utils mod reference.html +git.stats mod reference.html +git.tree mod reference.html +git.repo.Repo.heads attribute reference.html +git.commit.Commit.id_abbrev attribute reference.html +git.repo.Repo.init_bare classmethod reference.html +git.repo.Repo.log method reference.html +git.utils.is_git_dir function reference.html +git.head.Head.find_all classmethod reference.html +git.errors.NoSuchPathError exception reference.html +git.repo.Repo.alternates attribute reference.html +git.utils.dashify function reference.html +git.tree.Tree class reference.html +git.repo.Repo.fork_bare method reference.html +git.blob.Blob.size attribute reference.html +git.tree.Tree.items method reference.html +git.commit.Commit.list_from_string classmethod reference.html +git.cmd.Git.execute method reference.html +git.repo.Repo.diff method reference.html +git.blob.Blob.data attribute reference.html +git.commit.Commit.diff classmethod reference.html +git.repo.Repo.commit_diff method reference.html +git.utils.touch function reference.html +git.blob.Blob class reference.html +git.tree.Tree.content_from_string staticmethod reference.html +git.cmd.Git.transform_kwargs method reference.html +git.blob.Blob.blame classmethod reference.html +git.commit.Commit.find_all classmethod reference.html +git.repo.Repo.active_branch attribute reference.html +git.commit.Commit.diffs attribute reference.html +git.repo.Repo class reference.html +git.commit.Commit.summary attribute reference.html +git.commit.Commit.count classmethod reference.html +git.stats.Stats.list_from_string classmethod reference.html +git.repo.Repo.daemon_export attribute reference.html +git.head.Head.from_string classmethod reference.html +git.repo.Repo.tree method reference.html +git.commit.Commit class reference.html +git.blob.Blob.basename attribute reference.html +git.tree.Tree.basename attribute reference.html +git.actor.Actor class reference.html +git.head.Head.list_from_string classmethod reference.html +git.tag.Tag.from_string classmethod reference.html +git.repo.Repo.create classmethod reference.html +git.stats.Stats class reference.html +git.lazy.LazyMixin class reference.html +git.repo.Repo.description attribute reference.html +git.repo.Repo.archive_tar_gz method reference.html +git.commit.Commit.stats attribute reference.html +git.tag.Tag.list_from_string classmethod reference.html +git.repo.Repo.commit_deltas_from method reference.html +git.repo.Repo.is_dirty attribute reference.html +git.tag.Tag class reference.html +git.tag.Tag.find_all classmethod reference.html +git.repo.Repo.branches attribute reference.html +git.repo.Repo.commit method reference.html +git.tree.Tree.keys method reference.html +git.cmd.Git.get_dir attribute reference.html +git.tree.Tree.get method reference.html +git.diff.Diff class reference.html +git.tree.Tree.values method reference.html +git.head.Head class reference.html +git.commit.Commit.actor classmethod reference.html +git.repo.Repo.commits_since method reference.html +git.repo.Repo.tags attribute reference.html +git.errors.GitCommandError exception reference.html +git.actor.Actor.from_string classmethod reference.html +git.errors.InvalidGitRepositoryError exception reference.html +git.cmd.Git class reference.html +git.repo.Repo.commits_between method reference.html +git.repo.Repo.archive_tar method reference.html +git.repo.Repo.commit_count method reference.html +git.repo.Repo.commits method reference.html +git.blob.Blob.mime_type attribute reference.html +git.repo.Repo.blob method reference.html +git.diff.Diff.list_from_string classmethod reference.html diff --git a/doc/doc_index/0.1/reference.html b/doc/doc_index/0.1/reference.html new file mode 100644 index 00000000..ce56826c --- /dev/null +++ b/doc/doc_index/0.1/reference.html @@ -0,0 +1,1073 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>API Reference — GitPython v0.1.7 documentation</title> + <link rel="stylesheet" href="_static/default.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '#', + VERSION: '0.1.7', + COLLAPSE_MODINDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <link rel="top" title="GitPython v0.1.7 documentation" href="index.html" /> + <link rel="prev" title="GitPython Tutorial" href="tutorial.html" /> + </head> + <body> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="modindex.html" title="Global Module Index" + accesskey="M">modules</a> |</li> + <li class="right" > + <a href="tutorial.html" title="GitPython Tutorial" + accesskey="P">previous</a> |</li> + <li><a href="index.html">GitPython v0.1.7 documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="api-reference"> +<span id="api-reference-toplevel"></span><h1>API Reference<a class="headerlink" href="#api-reference" title="Permalink to this headline">¶</a></h1> +<div class="section" id="module-git.actor"> +<h2>Actor<a class="headerlink" href="#module-git.actor" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="git.actor.Actor"> +<em class="property">class </em><tt class="descclassname">git.actor.</tt><tt class="descname">Actor</tt><big>(</big><em>name</em>, <em>email</em><big>)</big><a class="headerlink" href="#git.actor.Actor" title="Permalink to this definition">¶</a></dt> +<dd><p>Actors hold information about a person acting on the repository. They +can be committers and authors or anything with a name and an email as +mentioned in the git log entries.</p> +<dl class="classmethod"> +<dt id="git.actor.Actor.from_string"> +<em class="property">classmethod </em><tt class="descname">from_string</tt><big>(</big><em>string</em><big>)</big><a class="headerlink" href="#git.actor.Actor.from_string" title="Permalink to this definition">¶</a></dt> +<dd><p>Create an Actor from a string.</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">str</span></tt></dt> +<dd>is the string, which is expected to be in regular git format</dd> +<dt>Format</dt> +<dd>John Doe <<a class="reference external" href="mailto:jdoe%40example.com">jdoe<span>@</span>example<span>.</span>com</a>></dd> +<dt>Returns</dt> +<dd>Actor</dd> +</dl> +</dd></dl> + +</dd></dl> + +</div> +<div class="section" id="module-git.blob"> +<h2>Blob<a class="headerlink" href="#module-git.blob" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="git.blob.Blob"> +<em class="property">class </em><tt class="descclassname">git.blob.</tt><tt class="descname">Blob</tt><big>(</big><em>repo</em>, <em>id</em>, <em>mode=None</em>, <em>name=None</em><big>)</big><a class="headerlink" href="#git.blob.Blob" title="Permalink to this definition">¶</a></dt> +<dd><p>A Blob encapsulates a git blob object</p> +<dl class="attribute"> +<dt id="git.blob.Blob.basename"> +<tt class="descname">basename</tt><a class="headerlink" href="#git.blob.Blob.basename" title="Permalink to this definition">¶</a></dt> +<dd><dl class="docutils"> +<dt>Returns</dt> +<dd>The basename of the Blobs file name</dd> +</dl> +</dd></dl> + +<dl class="classmethod"> +<dt id="git.blob.Blob.blame"> +<em class="property">classmethod </em><tt class="descname">blame</tt><big>(</big><em>repo</em>, <em>commit</em>, <em>file</em><big>)</big><a class="headerlink" href="#git.blob.Blob.blame" title="Permalink to this definition">¶</a></dt> +<dd><p>The blame information for the given file at the given commit</p> +<dl class="docutils"> +<dt>Returns</dt> +<dd>list: [git.Commit, list: [<line>]] +A list of tuples associating a Commit object with a list of lines that +changed within the given commit. The Commit objects will be given in order +of appearance.</dd> +</dl> +</dd></dl> + +<dl class="attribute"> +<dt id="git.blob.Blob.data"> +<tt class="descname">data</tt><a class="headerlink" href="#git.blob.Blob.data" title="Permalink to this definition">¶</a></dt> +<dd><p>The binary contents of this blob.</p> +<dl class="docutils"> +<dt>Returns</dt> +<dd>str</dd> +<dt>NOTE</dt> +<dd>The data will be cached after the first access.</dd> +</dl> +</dd></dl> + +<dl class="attribute"> +<dt id="git.blob.Blob.mime_type"> +<tt class="descname">mime_type</tt><a class="headerlink" href="#git.blob.Blob.mime_type" title="Permalink to this definition">¶</a></dt> +<dd><p>The mime type of this file (based on the filename)</p> +<dl class="docutils"> +<dt>Returns</dt> +<dd>str</dd> +<dt>NOTE</dt> +<dd>Defaults to ‘text/plain’ in case the actual file type is unknown.</dd> +</dl> +</dd></dl> + +<dl class="attribute"> +<dt id="git.blob.Blob.size"> +<tt class="descname">size</tt><a class="headerlink" href="#git.blob.Blob.size" title="Permalink to this definition">¶</a></dt> +<dd><p>The size of this blob in bytes</p> +<dl class="docutils"> +<dt>Returns</dt> +<dd>int</dd> +<dt>NOTE</dt> +<dd>The size will be cached after the first access</dd> +</dl> +</dd></dl> + +</dd></dl> + +</div> +<div class="section" id="module-git.cmd"> +<h2>Git<a class="headerlink" href="#module-git.cmd" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="git.cmd.Git"> +<em class="property">class </em><tt class="descclassname">git.cmd.</tt><tt class="descname">Git</tt><big>(</big><em>git_dir=None</em><big>)</big><a class="headerlink" href="#git.cmd.Git" title="Permalink to this definition">¶</a></dt> +<dd><p>The Git class manages communication with the Git binary.</p> +<blockquote> +<p>It provides a convenient interface to calling the Git binary, such as in:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="n">g</span> <span class="o">=</span> <span class="n">Git</span><span class="p">(</span> <span class="n">git_dir</span> <span class="p">)</span> +<span class="n">g</span><span class="o">.</span><span class="n">init</span><span class="p">()</span> <span class="c"># calls 'git init' program</span> +<span class="n">rval</span> <span class="o">=</span> <span class="n">g</span><span class="o">.</span><span class="n">ls_files</span><span class="p">()</span> <span class="c"># calls 'git ls-files' program</span> +</pre></div> +</div> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">Debugging</span></tt></dt> +<dd>Set the GIT_PYTHON_TRACE environment variable print each invocation +of the command to stdout. +Set its value to ‘full’ to see details about the returned values.</dd> +</dl> +</blockquote> +<dl class="method"> +<dt id="git.cmd.Git.execute"> +<tt class="descname">execute</tt><big>(</big><em>command</em>, <em>istream=None</em>, <em>with_keep_cwd=False</em>, <em>with_extended_output=False</em>, <em>with_exceptions=True</em>, <em>with_raw_output=False</em><big>)</big><a class="headerlink" href="#git.cmd.Git.execute" title="Permalink to this definition">¶</a></dt> +<dd><p>Handles executing the command on the shell and consumes and returns +the returned information (stdout)</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">command</span></tt></dt> +<dd>The command argument list to execute. +It should be a string, or a sequence of program arguments. The +program to execute is the first item in the args sequence or string.</dd> +<dt><tt class="docutils literal"><span class="pre">istream</span></tt></dt> +<dd>Standard input filehandle passed to subprocess.Popen.</dd> +<dt><tt class="docutils literal"><span class="pre">with_keep_cwd</span></tt></dt> +<dd>Whether to use the current working directory from os.getcwd(). +GitPython uses get_work_tree() as its working directory by +default and get_git_dir() for bare repositories.</dd> +<dt><tt class="docutils literal"><span class="pre">with_extended_output</span></tt></dt> +<dd>Whether to return a (status, stdout, stderr) tuple.</dd> +<dt><tt class="docutils literal"><span class="pre">with_exceptions</span></tt></dt> +<dd>Whether to raise an exception when git returns a non-zero status.</dd> +<dt><tt class="docutils literal"><span class="pre">with_raw_output</span></tt></dt> +<dd>Whether to avoid stripping off trailing whitespace.</dd> +</dl> +<p>Returns:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="nb">str</span><span class="p">(</span><span class="n">output</span><span class="p">)</span> <span class="c"># extended_output = False (Default)</span> +<span class="nb">tuple</span><span class="p">(</span><span class="nb">int</span><span class="p">(</span><span class="n">status</span><span class="p">),</span> <span class="nb">str</span><span class="p">(</span><span class="n">stdout</span><span class="p">),</span> <span class="nb">str</span><span class="p">(</span><span class="n">stderr</span><span class="p">))</span> <span class="c"># extended_output = True</span> +</pre></div> +</div> +<dl class="docutils"> +<dt>Raise</dt> +<dd>GitCommandError</dd> +<dt>NOTE</dt> +<dd>If you add additional keyword arguments to the signature of this method, +you must update the execute_kwargs tuple housed in this module.</dd> +</dl> +</dd></dl> + +<dl class="attribute"> +<dt id="git.cmd.Git.get_dir"> +<tt class="descname">get_dir</tt><a class="headerlink" href="#git.cmd.Git.get_dir" title="Permalink to this definition">¶</a></dt> +<dd><dl class="docutils"> +<dt>Returns</dt> +<dd>Git directory we are working on</dd> +</dl> +</dd></dl> + +<dl class="method"> +<dt id="git.cmd.Git.transform_kwargs"> +<tt class="descname">transform_kwargs</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#git.cmd.Git.transform_kwargs" title="Permalink to this definition">¶</a></dt> +<dd>Transforms Python style kwargs into git command line options.</dd></dl> + +</dd></dl> + +</div> +<div class="section" id="module-git.commit"> +<h2>Commit<a class="headerlink" href="#module-git.commit" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="git.commit.Commit"> +<em class="property">class </em><tt class="descclassname">git.commit.</tt><tt class="descname">Commit</tt><big>(</big><em>repo</em>, <em>id</em>, <em>tree=None</em>, <em>author=None</em>, <em>authored_date=None</em>, <em>committer=None</em>, <em>committed_date=None</em>, <em>message=None</em>, <em>parents=None</em><big>)</big><a class="headerlink" href="#git.commit.Commit" title="Permalink to this definition">¶</a></dt> +<dd><p>Wraps a git Commit object.</p> +<p>This class will act lazily on some of its attributes and will query the +value on demand only if it involves calling the git binary.</p> +<dl class="classmethod"> +<dt id="git.commit.Commit.actor"> +<em class="property">classmethod </em><tt class="descname">actor</tt><big>(</big><em>line</em><big>)</big><a class="headerlink" href="#git.commit.Commit.actor" title="Permalink to this definition">¶</a></dt> +<dd><p>Parse out the actor (author or committer) info</p> +<dl class="docutils"> +<dt>Returns</dt> +<dd>[Actor, gmtime(acted at time)]</dd> +</dl> +</dd></dl> + +<dl class="classmethod"> +<dt id="git.commit.Commit.count"> +<em class="property">classmethod </em><tt class="descname">count</tt><big>(</big><em>repo</em>, <em>ref</em>, <em>path=''</em><big>)</big><a class="headerlink" href="#git.commit.Commit.count" title="Permalink to this definition">¶</a></dt> +<dd><p>Count the number of commits reachable from this ref</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">repo</span></tt></dt> +<dd>is the Repo</dd> +<dt><tt class="docutils literal"><span class="pre">ref</span></tt></dt> +<dd>is the ref from which to begin (SHA1 or name)</dd> +<dt><tt class="docutils literal"><span class="pre">path</span></tt></dt> +<dd>is an optional path</dd> +<dt>Returns</dt> +<dd>int</dd> +</dl> +</dd></dl> + +<dl class="classmethod"> +<dt id="git.commit.Commit.diff"> +<em class="property">classmethod </em><tt class="descname">diff</tt><big>(</big><em>repo</em>, <em>a</em>, <em>b=None</em>, <em>paths=None</em><big>)</big><a class="headerlink" href="#git.commit.Commit.diff" title="Permalink to this definition">¶</a></dt> +<dd><p>Creates diffs between a tree and the index or between two trees:</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">repo</span></tt></dt> +<dd>is the Repo</dd> +<dt><tt class="docutils literal"><span class="pre">a</span></tt></dt> +<dd>is a named commit</dd> +<dt><tt class="docutils literal"><span class="pre">b</span></tt></dt> +<dd>is an optional named commit. Passing a list assumes you +wish to omit the second named commit and limit the diff to the +given paths.</dd> +<dt><tt class="docutils literal"><span class="pre">paths</span></tt></dt> +<dd>is a list of paths to limit the diff to.</dd> +<dt>Returns</dt> +<dd><p class="first">git.Diff[]:</p> +<div class="last highlight-python"><pre>between tree and the index if only a is given +between two trees if a and b are given and are commits</pre> +</div> +</dd> +</dl> +</dd></dl> + +<dl class="attribute"> +<dt id="git.commit.Commit.diffs"> +<tt class="descname">diffs</tt><a class="headerlink" href="#git.commit.Commit.diffs" title="Permalink to this definition">¶</a></dt> +<dd><dl class="docutils"> +<dt>Returns</dt> +<dd>git.Diff[] +Diffs between this commit and its first parent or all changes if this +commit is the first commit and has no parent.</dd> +</dl> +</dd></dl> + +<dl class="classmethod"> +<dt id="git.commit.Commit.find_all"> +<em class="property">classmethod </em><tt class="descname">find_all</tt><big>(</big><em>repo</em>, <em>ref</em>, <em>path=''</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#git.commit.Commit.find_all" title="Permalink to this definition">¶</a></dt> +<dd><p>Find all commits matching the given criteria. +<tt class="docutils literal"><span class="pre">repo</span></tt></p> +<blockquote> +is the Repo</blockquote> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">ref</span></tt></dt> +<dd>is the ref from which to begin (SHA1 or name)</dd> +<dt><tt class="docutils literal"><span class="pre">path</span></tt></dt> +<dd>is an optinal path, if set only Commits that include the path +will be considered</dd> +<dt><tt class="docutils literal"><span class="pre">kwargs</span></tt></dt> +<dd>optional keyword arguments to git where +<tt class="docutils literal"><span class="pre">max_count</span></tt> is the maximum number of commits to fetch +<tt class="docutils literal"><span class="pre">skip</span></tt> is the number of commits to skip</dd> +<dt>Returns</dt> +<dd>git.Commit[]</dd> +</dl> +</dd></dl> + +<dl class="attribute"> +<dt id="git.commit.Commit.id_abbrev"> +<tt class="descname">id_abbrev</tt><a class="headerlink" href="#git.commit.Commit.id_abbrev" title="Permalink to this definition">¶</a></dt> +<dd><dl class="docutils"> +<dt>Returns</dt> +<dd>First 7 bytes of the commit’s sha id as an abbreviation of the full string.</dd> +</dl> +</dd></dl> + +<dl class="classmethod"> +<dt id="git.commit.Commit.list_from_string"> +<em class="property">classmethod </em><tt class="descname">list_from_string</tt><big>(</big><em>repo</em>, <em>text</em><big>)</big><a class="headerlink" href="#git.commit.Commit.list_from_string" title="Permalink to this definition">¶</a></dt> +<dd><p>Parse out commit information into a list of Commit objects</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">repo</span></tt></dt> +<dd>is the Repo</dd> +<dt><tt class="docutils literal"><span class="pre">text</span></tt></dt> +<dd>is the text output from the git-rev-list command (raw format)</dd> +<dt>Returns</dt> +<dd>git.Commit[]</dd> +</dl> +</dd></dl> + +<dl class="attribute"> +<dt id="git.commit.Commit.stats"> +<tt class="descname">stats</tt><a class="headerlink" href="#git.commit.Commit.stats" title="Permalink to this definition">¶</a></dt> +<dd><p>Create a git stat from changes between this commit and its first parent +or from all changes done if this is the very first commit.</p> +<dl class="docutils"> +<dt>Return</dt> +<dd>git.Stats</dd> +</dl> +</dd></dl> + +<dl class="attribute"> +<dt id="git.commit.Commit.summary"> +<tt class="descname">summary</tt><a class="headerlink" href="#git.commit.Commit.summary" title="Permalink to this definition">¶</a></dt> +<dd><dl class="docutils"> +<dt>Returns</dt> +<dd>First line of the commit message.</dd> +</dl> +</dd></dl> + +</dd></dl> + +</div> +<div class="section" id="module-git.diff"> +<h2>Diff<a class="headerlink" href="#module-git.diff" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="git.diff.Diff"> +<em class="property">class </em><tt class="descclassname">git.diff.</tt><tt class="descname">Diff</tt><big>(</big><em>repo</em>, <em>a_path</em>, <em>b_path</em>, <em>a_commit</em>, <em>b_commit</em>, <em>a_mode</em>, <em>b_mode</em>, <em>new_file</em>, <em>deleted_file</em>, <em>rename_from</em>, <em>rename_to</em>, <em>diff</em><big>)</big><a class="headerlink" href="#git.diff.Diff" title="Permalink to this definition">¶</a></dt> +<dd><p>A Diff contains diff information between two commits.</p> +<dl class="classmethod"> +<dt id="git.diff.Diff.list_from_string"> +<em class="property">classmethod </em><tt class="descname">list_from_string</tt><big>(</big><em>repo</em>, <em>text</em><big>)</big><a class="headerlink" href="#git.diff.Diff.list_from_string" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</dd></dl> + +</div> +<div class="section" id="module-git.errors"> +<h2>Errors<a class="headerlink" href="#module-git.errors" title="Permalink to this headline">¶</a></h2> +<p>Module containing all exceptions thrown througout the git package,</p> +<dl class="exception"> +<dt id="git.errors.GitCommandError"> +<em class="property">exception </em><tt class="descclassname">git.errors.</tt><tt class="descname">GitCommandError</tt><big>(</big><em>command</em>, <em>status</em>, <em>stderr=None</em><big>)</big><a class="headerlink" href="#git.errors.GitCommandError" title="Permalink to this definition">¶</a></dt> +<dd>Thrown if execution of the git command fails with non-zero status code.</dd></dl> + +<dl class="exception"> +<dt id="git.errors.InvalidGitRepositoryError"> +<em class="property">exception </em><tt class="descclassname">git.errors.</tt><tt class="descname">InvalidGitRepositoryError</tt><a class="headerlink" href="#git.errors.InvalidGitRepositoryError" title="Permalink to this definition">¶</a></dt> +<dd>Thrown if the given repository appears to have an invalid format.</dd></dl> + +<dl class="exception"> +<dt id="git.errors.NoSuchPathError"> +<em class="property">exception </em><tt class="descclassname">git.errors.</tt><tt class="descname">NoSuchPathError</tt><a class="headerlink" href="#git.errors.NoSuchPathError" title="Permalink to this definition">¶</a></dt> +<dd>Thrown if a path could not be access by the system.</dd></dl> + +</div> +<div class="section" id="module-git.head"> +<h2>Head<a class="headerlink" href="#module-git.head" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="git.head.Head"> +<em class="property">class </em><tt class="descclassname">git.head.</tt><tt class="descname">Head</tt><big>(</big><em>name</em>, <em>commit</em><big>)</big><a class="headerlink" href="#git.head.Head" title="Permalink to this definition">¶</a></dt> +<dd><p>A Head is a named reference to a Commit. Every Head instance contains a name +and a Commit object.</p> +<p>Examples:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">repo</span> <span class="o">=</span> <span class="n">Repo</span><span class="p">(</span><span class="s">"/path/to/repo"</span><span class="p">)</span> +<span class="gp">>>> </span><span class="n">head</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">heads</span><span class="p">[</span><span class="mf">0</span><span class="p">]</span> + +<span class="gp">>>> </span><span class="n">head</span><span class="o">.</span><span class="n">name</span> +<span class="go">'master'</span> + +<span class="gp">>>> </span><span class="n">head</span><span class="o">.</span><span class="n">commit</span> +<span class="go"><git.Commit "1c09f116cbc2cb4100fb6935bb162daa4723f455"></span> + +<span class="gp">>>> </span><span class="n">head</span><span class="o">.</span><span class="n">commit</span><span class="o">.</span><span class="n">id</span> +<span class="go">'1c09f116cbc2cb4100fb6935bb162daa4723f455'</span> +</pre></div> +</div> +<dl class="classmethod"> +<dt id="git.head.Head.find_all"> +<em class="property">classmethod </em><tt class="descname">find_all</tt><big>(</big><em>repo</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#git.head.Head.find_all" title="Permalink to this definition">¶</a></dt> +<dd><p>Find all Heads in the repository</p> +<dl class="docutils"> +<dt><cite>repo</cite></dt> +<dd>is the Repo</dd> +<dt><cite>kwargs</cite></dt> +<dd>Additional options given as keyword arguments, will be passed +to git-for-each-ref</dd> +<dt>Returns</dt> +<dd><p class="first">git.Head[]</p> +<p class="last">List is sorted by committerdate</p> +</dd> +</dl> +</dd></dl> + +<dl class="classmethod"> +<dt id="git.head.Head.from_string"> +<em class="property">classmethod </em><tt class="descname">from_string</tt><big>(</big><em>repo</em>, <em>line</em><big>)</big><a class="headerlink" href="#git.head.Head.from_string" title="Permalink to this definition">¶</a></dt> +<dd><p>Create a new Head instance from the given string.</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">repo</span></tt></dt> +<dd>is the Repo</dd> +<dt><tt class="docutils literal"><span class="pre">line</span></tt></dt> +<dd>is the formatted head information</dd> +</dl> +<p>Format:</p> +<div class="highlight-python"><pre>name: [a-zA-Z_/]+ +<null byte> +id: [0-9A-Fa-f]{40}</pre> +</div> +<dl class="docutils"> +<dt>Returns</dt> +<dd>git.Head</dd> +</dl> +</dd></dl> + +<dl class="classmethod"> +<dt id="git.head.Head.list_from_string"> +<em class="property">classmethod </em><tt class="descname">list_from_string</tt><big>(</big><em>repo</em>, <em>text</em><big>)</big><a class="headerlink" href="#git.head.Head.list_from_string" title="Permalink to this definition">¶</a></dt> +<dd><p>Parse out head information into a list of head objects</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">repo</span></tt></dt> +<dd>is the Repo</dd> +<dt><tt class="docutils literal"><span class="pre">text</span></tt></dt> +<dd>is the text output from the git-for-each-ref command</dd> +<dt>Returns</dt> +<dd>git.Head[]</dd> +</dl> +</dd></dl> + +</dd></dl> + +</div> +<div class="section" id="module-git.lazy"> +<h2>Lazy<a class="headerlink" href="#module-git.lazy" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="git.lazy.LazyMixin"> +<em class="property">class </em><tt class="descclassname">git.lazy.</tt><tt class="descname">LazyMixin</tt><a class="headerlink" href="#git.lazy.LazyMixin" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</div> +<div class="section" id="module-git.repo"> +<h2>Repo<a class="headerlink" href="#module-git.repo" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="git.repo.Repo"> +<em class="property">class </em><tt class="descclassname">git.repo.</tt><tt class="descname">Repo</tt><big>(</big><em>path=None</em><big>)</big><a class="headerlink" href="#git.repo.Repo" title="Permalink to this definition">¶</a></dt> +<dd><p>Represents a git repository and allows you to query references, +gather commit information, generate diffs, create and clone repositories query +the log.</p> +<dl class="attribute"> +<dt id="git.repo.Repo.active_branch"> +<tt class="descname">active_branch</tt><a class="headerlink" href="#git.repo.Repo.active_branch" title="Permalink to this definition">¶</a></dt> +<dd><p>The name of the currently active branch.</p> +<dl class="docutils"> +<dt>Returns</dt> +<dd>str (the branch name)</dd> +</dl> +</dd></dl> + +<dl class="attribute"> +<dt id="git.repo.Repo.alternates"> +<tt class="descname">alternates</tt><a class="headerlink" href="#git.repo.Repo.alternates" title="Permalink to this definition">¶</a></dt> +<dd>Retrieve a list of alternates paths or set a list paths to be used as alternates</dd></dl> + +<dl class="method"> +<dt id="git.repo.Repo.archive_tar"> +<tt class="descname">archive_tar</tt><big>(</big><em>treeish='master'</em>, <em>prefix=None</em><big>)</big><a class="headerlink" href="#git.repo.Repo.archive_tar" title="Permalink to this definition">¶</a></dt> +<dd><p>Archive the given treeish</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">treeish</span></tt></dt> +<dd>is the treeish name/id (default ‘master’)</dd> +<dt><tt class="docutils literal"><span class="pre">prefix</span></tt></dt> +<dd>is the optional prefix to prepend to each filename in the archive</dd> +</dl> +<p>Examples:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">repo</span><span class="o">.</span><span class="n">archive_tar</span> +<span class="go"><String containing tar archive></span> + +<span class="gp">>>> </span><span class="n">repo</span><span class="o">.</span><span class="n">archive_tar</span><span class="p">(</span><span class="s">'a87ff14'</span><span class="p">)</span> +<span class="go"><String containing tar archive for commit a87ff14></span> + +<span class="gp">>>> </span><span class="n">repo</span><span class="o">.</span><span class="n">archive_tar</span><span class="p">(</span><span class="s">'master'</span><span class="p">,</span> <span class="s">'myproject/'</span><span class="p">)</span> +<span class="go"><String containing tar bytes archive, whose files are prefixed with 'myproject/'></span> +</pre></div> +</div> +<dl class="docutils"> +<dt>Returns</dt> +<dd>str (containing bytes of tar archive)</dd> +</dl> +</dd></dl> + +<dl class="method"> +<dt id="git.repo.Repo.archive_tar_gz"> +<tt class="descname">archive_tar_gz</tt><big>(</big><em>treeish='master'</em>, <em>prefix=None</em><big>)</big><a class="headerlink" href="#git.repo.Repo.archive_tar_gz" title="Permalink to this definition">¶</a></dt> +<dd><p>Archive and gzip the given treeish</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">treeish</span></tt></dt> +<dd>is the treeish name/id (default ‘master’)</dd> +<dt><tt class="docutils literal"><span class="pre">prefix</span></tt></dt> +<dd>is the optional prefix to prepend to each filename in the archive</dd> +</dl> +<p>Examples:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">repo</span><span class="o">.</span><span class="n">archive_tar_gz</span> +<span class="go"><String containing tar.gz archive></span> + +<span class="gp">>>> </span><span class="n">repo</span><span class="o">.</span><span class="n">archive_tar_gz</span><span class="p">(</span><span class="s">'a87ff14'</span><span class="p">)</span> +<span class="go"><String containing tar.gz archive for commit a87ff14></span> + +<span class="gp">>>> </span><span class="n">repo</span><span class="o">.</span><span class="n">archive_tar_gz</span><span class="p">(</span><span class="s">'master'</span><span class="p">,</span> <span class="s">'myproject/'</span><span class="p">)</span> +<span class="go"><String containing tar.gz archive and prefixed with 'myproject/'></span> +</pre></div> +</div> +<dl class="docutils"> +<dt>Returns</dt> +<dd>str (containing the bytes of tar.gz archive)</dd> +</dl> +</dd></dl> + +<dl class="method"> +<dt id="git.repo.Repo.blob"> +<tt class="descname">blob</tt><big>(</big><em>id</em><big>)</big><a class="headerlink" href="#git.repo.Repo.blob" title="Permalink to this definition">¶</a></dt> +<dd><p>The Blob object for the given id</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">id</span></tt></dt> +<dd>is the SHA1 id of the blob</dd> +<dt>Returns</dt> +<dd><tt class="docutils literal"><span class="pre">git.Blob</span></tt></dd> +</dl> +</dd></dl> + +<dl class="attribute"> +<dt id="git.repo.Repo.branches"> +<tt class="descname">branches</tt><a class="headerlink" href="#git.repo.Repo.branches" title="Permalink to this definition">¶</a></dt> +<dd><p>A list of <tt class="docutils literal"><span class="pre">Head</span></tt> objects representing the branch heads in +this repo</p> +<dl class="docutils"> +<dt>Returns</dt> +<dd><tt class="docutils literal"><span class="pre">git.Head[]</span></tt></dd> +</dl> +</dd></dl> + +<dl class="method"> +<dt id="git.repo.Repo.commit"> +<tt class="descname">commit</tt><big>(</big><em>id</em>, <em>path=''</em><big>)</big><a class="headerlink" href="#git.repo.Repo.commit" title="Permalink to this definition">¶</a></dt> +<dd><p>The Commit object for the specified id</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">id</span></tt></dt> +<dd>is the SHA1 identifier of the commit</dd> +<dt><tt class="docutils literal"><span class="pre">path</span></tt></dt> +<dd>is an optional path, if set the returned commit must contain the path.</dd> +<dt>Returns</dt> +<dd><tt class="docutils literal"><span class="pre">git.Commit</span></tt></dd> +</dl> +</dd></dl> + +<dl class="method"> +<dt id="git.repo.Repo.commit_count"> +<tt class="descname">commit_count</tt><big>(</big><em>start='master'</em>, <em>path=''</em><big>)</big><a class="headerlink" href="#git.repo.Repo.commit_count" title="Permalink to this definition">¶</a></dt> +<dd><p>The number of commits reachable by the given branch/commit</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">start</span></tt></dt> +<dd>is the branch/commit name (default ‘master’)</dd> +<dt><tt class="docutils literal"><span class="pre">path</span></tt></dt> +<dd>is an optional path +Commits that do not contain the path will not contribute to the count.</dd> +<dt>Returns</dt> +<dd><tt class="docutils literal"><span class="pre">int</span></tt></dd> +</dl> +</dd></dl> + +<dl class="method"> +<dt id="git.repo.Repo.commit_deltas_from"> +<tt class="descname">commit_deltas_from</tt><big>(</big><em>other_repo</em>, <em>ref='master'</em>, <em>other_ref='master'</em><big>)</big><a class="headerlink" href="#git.repo.Repo.commit_deltas_from" title="Permalink to this definition">¶</a></dt> +<dd><p>Returns a list of commits that is in <tt class="docutils literal"><span class="pre">other_repo</span></tt> but not in self</p> +<dl class="docutils"> +<dt>Returns</dt> +<dd>git.Commit[]</dd> +</dl> +</dd></dl> + +<dl class="method"> +<dt id="git.repo.Repo.commit_diff"> +<tt class="descname">commit_diff</tt><big>(</big><em>commit</em><big>)</big><a class="headerlink" href="#git.repo.Repo.commit_diff" title="Permalink to this definition">¶</a></dt> +<dd><dl class="docutils"> +<dt>The commit diff for the given commit</dt> +<dd><tt class="docutils literal"><span class="pre">commit</span></tt> is the commit name/id</dd> +<dt>Returns</dt> +<dd><tt class="docutils literal"><span class="pre">git.Diff[]</span></tt></dd> +</dl> +</dd></dl> + +<dl class="method"> +<dt id="git.repo.Repo.commits"> +<tt class="descname">commits</tt><big>(</big><em>start='master'</em>, <em>path=''</em>, <em>max_count=10</em>, <em>skip=0</em><big>)</big><a class="headerlink" href="#git.repo.Repo.commits" title="Permalink to this definition">¶</a></dt> +<dd><p>A list of Commit objects representing the history of a given ref/commit</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">start</span></tt></dt> +<dd><blockquote class="first"> +is the branch/commit name (default ‘master’)</blockquote> +<dl class="last docutils"> +<dt><tt class="docutils literal"><span class="pre">path</span></tt></dt> +<dd>is an optional path to limit the returned commits to +Commits that do not contain that path will not be returned.</dd> +<dt><tt class="docutils literal"><span class="pre">max_count</span></tt></dt> +<dd><blockquote class="first"> +is the maximum number of commits to return (default 10)</blockquote> +<dl class="last docutils"> +<dt><tt class="docutils literal"><span class="pre">skip</span></tt></dt> +<dd>is the number of commits to skip (default 0) which will effectively +move your commit-window by the given number.</dd> +</dl> +</dd> +</dl> +</dd> +<dt>Returns</dt> +<dd><tt class="docutils literal"><span class="pre">git.Commit[]</span></tt></dd> +</dl> +</dd></dl> + +<dl class="method"> +<dt id="git.repo.Repo.commits_between"> +<tt class="descname">commits_between</tt><big>(</big><em>frm</em>, <em>to</em><big>)</big><a class="headerlink" href="#git.repo.Repo.commits_between" title="Permalink to this definition">¶</a></dt> +<dd><p>The Commits objects that are reachable via <tt class="docutils literal"><span class="pre">to</span></tt> but not via <tt class="docutils literal"><span class="pre">frm</span></tt> +Commits are returned in chronological order.</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">from</span></tt></dt> +<dd>is the branch/commit name of the younger item</dd> +<dt><tt class="docutils literal"><span class="pre">to</span></tt></dt> +<dd>is the branch/commit name of the older item</dd> +<dt>Returns</dt> +<dd><tt class="docutils literal"><span class="pre">git.Commit[]</span></tt></dd> +</dl> +</dd></dl> + +<dl class="method"> +<dt id="git.repo.Repo.commits_since"> +<tt class="descname">commits_since</tt><big>(</big><em>start='master'</em>, <em>path=''</em>, <em>since='1970-01-01'</em><big>)</big><a class="headerlink" href="#git.repo.Repo.commits_since" title="Permalink to this definition">¶</a></dt> +<dd><p>The Commits objects that are newer than the specified date. +Commits are returned in chronological order.</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">start</span></tt></dt> +<dd>is the branch/commit name (default ‘master’)</dd> +<dt><tt class="docutils literal"><span class="pre">path</span></tt></dt> +<dd>is an optional path to limit the returned commits to.</dd> +<dt><tt class="docutils literal"><span class="pre">since</span></tt></dt> +<dd>is a string representing a date/time</dd> +<dt>Returns</dt> +<dd><tt class="docutils literal"><span class="pre">git.Commit[]</span></tt></dd> +</dl> +</dd></dl> + +<dl class="classmethod"> +<dt id="git.repo.Repo.create"> +<em class="property">classmethod </em><tt class="descname">create</tt><big>(</big><em>path</em>, <em>mkdir=True</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#git.repo.Repo.create" title="Permalink to this definition">¶</a></dt> +<dd><p>Initialize a bare git repository at the given path</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">path</span></tt></dt> +<dd>is the full path to the repo (traditionally ends with /<name>.git)</dd> +<dt><tt class="docutils literal"><span class="pre">mkdir</span></tt></dt> +<dd>if specified will create the repository directory if it doesn’t +already exists. Creates the directory with a mode=0755.</dd> +<dt><tt class="docutils literal"><span class="pre">kwargs</span></tt></dt> +<dd>keyword arguments serving as additional options to the git init command</dd> +</dl> +<p>Examples:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="n">git</span><span class="o">.</span><span class="n">Repo</span><span class="o">.</span><span class="n">init_bare</span><span class="p">(</span><span class="s">'/var/git/myrepo.git'</span><span class="p">)</span> +</pre></div> +</div> +<dl class="docutils"> +<dt>Returns</dt> +<dd><tt class="docutils literal"><span class="pre">git.Repo</span></tt> (the newly created repo)</dd> +</dl> +</dd></dl> + +<dl class="attribute"> +<dt id="git.repo.Repo.daemon_export"> +<tt class="descname">daemon_export</tt><a class="headerlink" href="#git.repo.Repo.daemon_export" title="Permalink to this definition">¶</a></dt> +<dd>If True, git-daemon may export this repository</dd></dl> + +<dl class="attribute"> +<dt id="git.repo.Repo.description"> +<tt class="descname">description</tt><a class="headerlink" href="#git.repo.Repo.description" title="Permalink to this definition">¶</a></dt> +<dd>the project’s description</dd></dl> + +<dl class="method"> +<dt id="git.repo.Repo.diff"> +<tt class="descname">diff</tt><big>(</big><em>a</em>, <em>b</em>, <em>*paths</em><big>)</big><a class="headerlink" href="#git.repo.Repo.diff" title="Permalink to this definition">¶</a></dt> +<dd><p>The diff from commit <tt class="docutils literal"><span class="pre">a</span></tt> to commit <tt class="docutils literal"><span class="pre">b</span></tt>, optionally restricted to the given file(s)</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">a</span></tt></dt> +<dd>is the base commit</dd> +<dt><tt class="docutils literal"><span class="pre">b</span></tt></dt> +<dd>is the other commit</dd> +<dt><tt class="docutils literal"><span class="pre">paths</span></tt></dt> +<dd>is an optional list of file paths on which to restrict the diff</dd> +<dt>Returns</dt> +<dd><tt class="docutils literal"><span class="pre">str</span></tt></dd> +</dl> +</dd></dl> + +<dl class="method"> +<dt id="git.repo.Repo.fork_bare"> +<tt class="descname">fork_bare</tt><big>(</big><em>path</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#git.repo.Repo.fork_bare" title="Permalink to this definition">¶</a></dt> +<dd><p>Fork a bare git repository from this repo</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">path</span></tt></dt> +<dd>is the full path of the new repo (traditionally ends with /<name>.git)</dd> +<dt><tt class="docutils literal"><span class="pre">kwargs</span></tt></dt> +<dd>keyword arguments to be given to the git clone command</dd> +<dt>Returns</dt> +<dd><tt class="docutils literal"><span class="pre">git.Repo</span></tt> (the newly forked repo)</dd> +</dl> +</dd></dl> + +<dl class="attribute"> +<dt id="git.repo.Repo.heads"> +<tt class="descname">heads</tt><a class="headerlink" href="#git.repo.Repo.heads" title="Permalink to this definition">¶</a></dt> +<dd><p>A list of <tt class="docutils literal"><span class="pre">Head</span></tt> objects representing the branch heads in +this repo</p> +<dl class="docutils"> +<dt>Returns</dt> +<dd><tt class="docutils literal"><span class="pre">git.Head[]</span></tt></dd> +</dl> +</dd></dl> + +<dl class="classmethod"> +<dt id="git.repo.Repo.init_bare"> +<em class="property">classmethod </em><tt class="descname">init_bare</tt><big>(</big><em>path</em>, <em>mkdir=True</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#git.repo.Repo.init_bare" title="Permalink to this definition">¶</a></dt> +<dd><p>Initialize a bare git repository at the given path</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">path</span></tt></dt> +<dd>is the full path to the repo (traditionally ends with /<name>.git)</dd> +<dt><tt class="docutils literal"><span class="pre">mkdir</span></tt></dt> +<dd>if specified will create the repository directory if it doesn’t +already exists. Creates the directory with a mode=0755.</dd> +<dt><tt class="docutils literal"><span class="pre">kwargs</span></tt></dt> +<dd>keyword arguments serving as additional options to the git init command</dd> +</dl> +<p>Examples:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="n">git</span><span class="o">.</span><span class="n">Repo</span><span class="o">.</span><span class="n">init_bare</span><span class="p">(</span><span class="s">'/var/git/myrepo.git'</span><span class="p">)</span> +</pre></div> +</div> +<dl class="docutils"> +<dt>Returns</dt> +<dd><tt class="docutils literal"><span class="pre">git.Repo</span></tt> (the newly created repo)</dd> +</dl> +</dd></dl> + +<dl class="attribute"> +<dt id="git.repo.Repo.is_dirty"> +<tt class="descname">is_dirty</tt><a class="headerlink" href="#git.repo.Repo.is_dirty" title="Permalink to this definition">¶</a></dt> +<dd><p>Return the status of the index.</p> +<dl class="docutils"> +<dt>Returns</dt> +<dd><tt class="xref docutils literal"><span class="pre">True</span></tt>, if the index has any uncommitted changes, +otherwise <tt class="xref docutils literal"><span class="pre">False</span></tt></dd> +<dt>NOTE</dt> +<dd>Working tree changes that have not been staged will not be detected !</dd> +</dl> +</dd></dl> + +<dl class="method"> +<dt id="git.repo.Repo.log"> +<tt class="descname">log</tt><big>(</big><em>commit='master'</em>, <em>path=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#git.repo.Repo.log" title="Permalink to this definition">¶</a></dt> +<dd><p>The Commit for a treeish, and all commits leading to it.</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">kwargs</span></tt></dt> +<dd>keyword arguments specifying flags to be used in git-log command, +i.e.: max_count=1 to limit the amount of commits returned</dd> +<dt>Returns</dt> +<dd><tt class="docutils literal"><span class="pre">git.Commit[]</span></tt></dd> +</dl> +</dd></dl> + +<dl class="attribute"> +<dt id="git.repo.Repo.tags"> +<tt class="descname">tags</tt><a class="headerlink" href="#git.repo.Repo.tags" title="Permalink to this definition">¶</a></dt> +<dd><p>A list of <tt class="docutils literal"><span class="pre">Tag</span></tt> objects that are available in this repo</p> +<dl class="docutils"> +<dt>Returns</dt> +<dd><tt class="docutils literal"><span class="pre">git.Tag[]</span></tt></dd> +</dl> +</dd></dl> + +<dl class="method"> +<dt id="git.repo.Repo.tree"> +<tt class="descname">tree</tt><big>(</big><em>treeish='master'</em><big>)</big><a class="headerlink" href="#git.repo.Repo.tree" title="Permalink to this definition">¶</a></dt> +<dd><p>The Tree object for the given treeish reference</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">treeish</span></tt></dt> +<dd>is the reference (default ‘master’)</dd> +</dl> +<p>Examples:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="n">repo</span><span class="o">.</span><span class="n">tree</span><span class="p">(</span><span class="s">'master'</span><span class="p">)</span> +</pre></div> +</div> +<dl class="docutils"> +<dt>Returns</dt> +<dd><tt class="docutils literal"><span class="pre">git.Tree</span></tt></dd> +</dl> +</dd></dl> + +</dd></dl> + +</div> +<div class="section" id="module-git.stats"> +<h2>Stats<a class="headerlink" href="#module-git.stats" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="git.stats.Stats"> +<em class="property">class </em><tt class="descclassname">git.stats.</tt><tt class="descname">Stats</tt><big>(</big><em>repo</em>, <em>total</em>, <em>files</em><big>)</big><a class="headerlink" href="#git.stats.Stats" title="Permalink to this definition">¶</a></dt> +<dd><p>Represents stat information as presented by git at the end of a merge. It is +created from the output of a diff operation.</p> +<p><tt class="docutils literal"><span class="pre">Example</span></tt>:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="n">c</span> <span class="o">=</span> <span class="n">Commit</span><span class="p">(</span> <span class="n">sha1</span> <span class="p">)</span> +<span class="n">s</span> <span class="o">=</span> <span class="n">c</span><span class="o">.</span><span class="n">stats</span> +<span class="n">s</span><span class="o">.</span><span class="n">total</span> <span class="c"># full-stat-dict</span> +<span class="n">s</span><span class="o">.</span><span class="n">files</span> <span class="c"># dict( filepath : stat-dict )</span> +</pre></div> +</div> +<p><tt class="docutils literal"><span class="pre">stat-dict</span></tt></p> +<p>A dictionary with the following keys and values:</p> +<div class="highlight-python"><pre>deletions = number of deleted lines as int +insertions = number of inserted lines as int +lines = total number of lines changed as int, or deletions + insertions</pre> +</div> +<p><tt class="docutils literal"><span class="pre">full-stat-dict</span></tt></p> +<p>In addition to the items in the stat-dict, it features additional information:</p> +<div class="highlight-python"><pre>files = number of changed files as int</pre> +</div> +<dl class="classmethod"> +<dt id="git.stats.Stats.list_from_string"> +<em class="property">classmethod </em><tt class="descname">list_from_string</tt><big>(</big><em>repo</em>, <em>text</em><big>)</big><a class="headerlink" href="#git.stats.Stats.list_from_string" title="Permalink to this definition">¶</a></dt> +<dd><p>Create a Stat object from output retrieved by git-diff.</p> +<dl class="docutils"> +<dt>Returns</dt> +<dd>git.Stat</dd> +</dl> +</dd></dl> + +</dd></dl> + +</div> +<div class="section" id="module-git.tag"> +<h2>Tag<a class="headerlink" href="#module-git.tag" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="git.tag.Tag"> +<em class="property">class </em><tt class="descclassname">git.tag.</tt><tt class="descname">Tag</tt><big>(</big><em>name</em>, <em>commit</em><big>)</big><a class="headerlink" href="#git.tag.Tag" title="Permalink to this definition">¶</a></dt> +<dd><dl class="classmethod"> +<dt id="git.tag.Tag.find_all"> +<em class="property">classmethod </em><tt class="descname">find_all</tt><big>(</big><em>repo</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#git.tag.Tag.find_all" title="Permalink to this definition">¶</a></dt> +<dd><p>Find all Tags in the repository</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">repo</span></tt></dt> +<dd>is the Repo</dd> +<dt><tt class="docutils literal"><span class="pre">kwargs</span></tt></dt> +<dd>Additional options given as keyword arguments, will be passed +to git-for-each-ref</dd> +<dt>Returns</dt> +<dd><p class="first"><tt class="docutils literal"><span class="pre">git.Tag[]</span></tt></p> +<p class="last">List is sorted by committerdate</p> +</dd> +</dl> +</dd></dl> + +<dl class="classmethod"> +<dt id="git.tag.Tag.from_string"> +<em class="property">classmethod </em><tt class="descname">from_string</tt><big>(</big><em>repo</em>, <em>line</em><big>)</big><a class="headerlink" href="#git.tag.Tag.from_string" title="Permalink to this definition">¶</a></dt> +<dd><p>Create a new Tag instance from the given string.</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">repo</span></tt></dt> +<dd>is the Repo</dd> +<dt><tt class="docutils literal"><span class="pre">line</span></tt></dt> +<dd>is the formatted tag information</dd> +</dl> +<p>Format:</p> +<div class="highlight-python"><pre>name: [a-zA-Z_/]+ +<null byte> +id: [0-9A-Fa-f]{40}</pre> +</div> +<dl class="docutils"> +<dt>Returns</dt> +<dd>git.Tag</dd> +</dl> +</dd></dl> + +<dl class="classmethod"> +<dt id="git.tag.Tag.list_from_string"> +<em class="property">classmethod </em><tt class="descname">list_from_string</tt><big>(</big><em>repo</em>, <em>text</em><big>)</big><a class="headerlink" href="#git.tag.Tag.list_from_string" title="Permalink to this definition">¶</a></dt> +<dd><p>Parse out tag information into an array of Tag objects</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">repo</span></tt></dt> +<dd>is the Repo</dd> +<dt><tt class="docutils literal"><span class="pre">text</span></tt></dt> +<dd>is the text output from the git-for-each command</dd> +<dt>Returns</dt> +<dd>git.Tag[]</dd> +</dl> +</dd></dl> + +</dd></dl> + +</div> +<div class="section" id="module-git.tree"> +<h2>Tree<a class="headerlink" href="#module-git.tree" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="git.tree.Tree"> +<em class="property">class </em><tt class="descclassname">git.tree.</tt><tt class="descname">Tree</tt><big>(</big><em>repo</em>, <em>id</em>, <em>mode=None</em>, <em>name=None</em><big>)</big><a class="headerlink" href="#git.tree.Tree" title="Permalink to this definition">¶</a></dt> +<dd><dl class="attribute"> +<dt id="git.tree.Tree.basename"> +<tt class="descname">basename</tt><a class="headerlink" href="#git.tree.Tree.basename" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="staticmethod"> +<dt id="git.tree.Tree.content_from_string"> +<em class="property">static </em><tt class="descname">content_from_string</tt><big>(</big><em>repo</em>, <em>text</em><big>)</big><a class="headerlink" href="#git.tree.Tree.content_from_string" title="Permalink to this definition">¶</a></dt> +<dd><p>Parse a content item and create the appropriate object</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">repo</span></tt></dt> +<dd><blockquote class="first"> +is the Repo</blockquote> +<dl class="last docutils"> +<dt><tt class="docutils literal"><span class="pre">text</span></tt></dt> +<dd>is the single line containing the items data in <cite>git ls-tree</cite> format</dd> +</dl> +</dd> +<dt>Returns</dt> +<dd><tt class="docutils literal"><span class="pre">git.Blob</span></tt> or <tt class="docutils literal"><span class="pre">git.Tree</span></tt></dd> +</dl> +</dd></dl> + +<dl class="method"> +<dt id="git.tree.Tree.get"> +<tt class="descname">get</tt><big>(</big><em>key</em><big>)</big><a class="headerlink" href="#git.tree.Tree.get" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="git.tree.Tree.items"> +<tt class="descname">items</tt><big>(</big><big>)</big><a class="headerlink" href="#git.tree.Tree.items" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="git.tree.Tree.keys"> +<tt class="descname">keys</tt><big>(</big><big>)</big><a class="headerlink" href="#git.tree.Tree.keys" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="git.tree.Tree.values"> +<tt class="descname">values</tt><big>(</big><big>)</big><a class="headerlink" href="#git.tree.Tree.values" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</dd></dl> + +</div> +<div class="section" id="module-git.utils"> +<h2>Utils<a class="headerlink" href="#module-git.utils" title="Permalink to this headline">¶</a></h2> +<dl class="function"> +<dt id="git.utils.dashify"> +<tt class="descclassname">git.utils.</tt><tt class="descname">dashify</tt><big>(</big><em>string</em><big>)</big><a class="headerlink" href="#git.utils.dashify" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> +<dt id="git.utils.is_git_dir"> +<tt class="descclassname">git.utils.</tt><tt class="descname">is_git_dir</tt><big>(</big><em>d</em><big>)</big><a class="headerlink" href="#git.utils.is_git_dir" title="Permalink to this definition">¶</a></dt> +<dd>This is taken from the git setup.c:is_git_directory +function.</dd></dl> + +<dl class="function"> +<dt id="git.utils.touch"> +<tt class="descclassname">git.utils.</tt><tt class="descname">touch</tt><big>(</big><em>filename</em><big>)</big><a class="headerlink" href="#git.utils.touch" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference external" href="#">API Reference</a><ul> +<li><a class="reference external" href="#module-git.actor">Actor</a></li> +<li><a class="reference external" href="#module-git.blob">Blob</a></li> +<li><a class="reference external" href="#module-git.cmd">Git</a></li> +<li><a class="reference external" href="#module-git.commit">Commit</a></li> +<li><a class="reference external" href="#module-git.diff">Diff</a></li> +<li><a class="reference external" href="#module-git.errors">Errors</a></li> +<li><a class="reference external" href="#module-git.head">Head</a></li> +<li><a class="reference external" href="#module-git.lazy">Lazy</a></li> +<li><a class="reference external" href="#module-git.repo">Repo</a></li> +<li><a class="reference external" href="#module-git.stats">Stats</a></li> +<li><a class="reference external" href="#module-git.tag">Tag</a></li> +<li><a class="reference external" href="#module-git.tree">Tree</a></li> +<li><a class="reference external" href="#module-git.utils">Utils</a></li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="tutorial.html" + title="previous chapter">GitPython Tutorial</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="_sources/reference.txt" + rel="nofollow">Show Source</a></li> + </ul> + <div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> + </div> + <script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="modindex.html" title="Global Module Index" + >modules</a> |</li> + <li class="right" > + <a href="tutorial.html" title="GitPython Tutorial" + >previous</a> |</li> + <li><a href="index.html">GitPython v0.1.7 documentation</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright Copyright (C) 2008-2010 Michael Trier and contributors. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.5. + </div> + </body> +</html>
\ No newline at end of file diff --git a/doc/doc_index/0.1/search.html b/doc/doc_index/0.1/search.html new file mode 100644 index 00000000..7a5e8c4b --- /dev/null +++ b/doc/doc_index/0.1/search.html @@ -0,0 +1,97 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>Search — GitPython v0.1.7 documentation</title> + <link rel="stylesheet" href="_static/default.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '#', + VERSION: '0.1.7', + COLLAPSE_MODINDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <script type="text/javascript" src="_static/searchtools.js"></script> + <link rel="top" title="GitPython v0.1.7 documentation" href="index.html" /> + </head> + <body> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="modindex.html" title="Global Module Index" + accesskey="M">modules</a> |</li> + <li><a href="index.html">GitPython v0.1.7 documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <h1 id="search-documentation">Search</h1> + <div id="fallback" class="admonition warning"> + <script type="text/javascript">$('#fallback').hide();</script> + <p> + Please activate JavaScript to enable the search + functionality. + </p> + </div> + <p> + From here you can search these documents. Enter your search + words into the box below and click "search". Note that the search + function will automatically search for all of the words. Pages + containing fewer words won't appear in the result list. + </p> + <form action="" method="get"> + <input type="text" name="q" value="" /> + <input type="submit" value="search" /> + <span id="search-progress" style="padding-left: 10px"></span> + </form> + + <div id="search-results"> + + </div> + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="modindex.html" title="Global Module Index" + >modules</a> |</li> + <li><a href="index.html">GitPython v0.1.7 documentation</a> »</li> + </ul> + </div> + + <div class="footer"> + © Copyright Copyright (C) 2008-2010 Michael Trier and contributors. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.5. + </div> + <script type="text/javascript" src="searchindex.js"></script> + + </body> +</html>
\ No newline at end of file diff --git a/doc/doc_index/0.1/searchindex.js b/doc/doc_index/0.1/searchindex.js new file mode 100644 index 00000000..1810e81a --- /dev/null +++ b/doc/doc_index/0.1/searchindex.js @@ -0,0 +1 @@ +Search.setIndex({desctypes:{"0":"attribute","1":"classmethod","2":"method","3":"function","4":"exception","5":"class","6":"staticmethod"},terms:{all:2,code:[0,1,2],chain:3,queri:2,"9faa1b7a7339db85692f91ad4b922554624a3ef7":3,consum:2,prefix:2,concept:1,abil:3,follow:[1,2],whose:2,"40d3057d09a7a4d61059bca9dca5ae698de58cb":3,list_from_str:2,readabl:3,gitpthon:1,init:2,program:2,istream:2,under:1,"3031ad0d119bd5010648cf8c038e2bbe21969ecb":3,b_path:2,sourc:[0,1],everi:2,string:[2,3],fals:2,mime_typ:[2,3],util:[0,2],veri:2,subprocess:[2,3],brows:1,cmd:2,michael:[1,3],item:[2,3],stderr:2,ten:3,"271074302aee04eb0394a4706c74f0c2eb504746":3,second:2,pass:2,download:1,port:1,index:[0,1,2],what:[0,3],appear:2,mainlin:1,section:1,rval:2,access:[2,3],delet:2,abbrevi:2,version:[1,3],"new":[1,2],method:[2,3],full:2,gener:2,here:1,let:3,path:[2,3],sinc:2,valu:[2,3],search:0,convers:3,popen:2,amount:2,chang:[2,3],via:2,repositori:[1,2,3],new_fil:2,modul:[0,2,3],filenam:2,unix:3,api:[0,1,2],foord:1,instal:[0,1],total:2,unit:3,from:[1,2,3],commun:2,two:2,few:3,call:[2,3],criteria:2,taken:2,type:2,more:[1,3],sort:2,commit_count:2,trail:2,flag:2,wanstrath:1,hold:2,cach:2,must:2,init_bar:2,none:2,retriev:2,hous:2,setup:[1,2,3],work:[2,3],histori:2,kwarg:2,can:[1,2,3],root:3,fetch:2,encapsul:2,tar:[2,3],"310ebc9a0904531438bdde831fd6a27c6b6be58":3,indic:0,max_count:[2,3],rename_from:2,tag:[0,2,3],want:3,gitpython:[0,1,2,3],end:2,filepath:2,treeish:2,how:3,subdirectori:3,chri:1,updat:2,clone:[1,2],after:2,trier:3,mai:[2,3],data:[2,3],e17c7e11aed9e94d2159e549a99b966912ce1091:3,classmethod:2,correspond:3,django:3,inform:[0,1,2,3],environ:2,allow:[2,3],order:2,move:2,a_mod:2,through:[1,3],gitignor:3,id_abbrev:2,pointer:3,paramet:3,style:2,mtrier:3,fork_bar:2,git_python_trac:2,window:2,onc:3,non:2,"return":[2,3],thei:[2,3],python:[1,2,3],initi:[0,2,3],"9643dcf549f34fbd09503d4c941a5d04157570f":3,mention:2,mybranch:3,from_str:2,name:[2,3],anyth:2,nosuchpatherror:2,gitcommanderror:2,easili:1,a91c45eee0b41bf3cdaad3418ca3850664c4a4b4:3,mode:[2,3],each:2,debug:2,found:1,list:[0,2,3],filehandl:2,"static":2,expect:2,daemon_export:2,out:2,variabl:2,accomplish:3,newli:2,rev:2,e69de29bb2d1d6434b8b29ae775ad8c2e48c5391:3,content:[0,2,3],print:2,ls_file:2,ref:2,ancestri:3,committerd:2,uncommit:2,lazymixin:2,getcwd:2,differ:3,committ:[2,3],standard:2,base:2,mime:2,dictionari:[2,3],ask:3,org:1,"byte":2,thrown:2,could:2,omit:2,thing:3,find_al:2,licens:[0,1,3],first:[2,3],oper:2,"0d236f3d9f20d5e5db86daefe1e3ba1ce68e3a97":3,directli:3,mkdir:2,arrai:2,number:[2,3],restrict:2,date:[2,3],alreadi:2,done:[1,2],construct:3,size:[2,3],given:2,script:1,unknown:2,interact:1,commit_diff:2,system:[1,2,3],messag:[2,3],tradition:2,master:[2,3],a_path:2,john:2,shell:2,b19574431a073333ea09346eafd64e7b1908ef49:3,option:2,tom:1,setuptool:1,specifi:[2,3],sha1:2,pars:2,than:2,serv:2,conveni:[2,3],keyword:2,provid:[1,2,3],tree:[0,2,3],zero:2,project:2,commits_between:2,str:2,entri:2,"function":[1,2],sai:3,preston:1,argument:[2,3],a87ff14:2,myproject:2,raw:2,have:[2,3],tabl:0,need:3,"null":2,b_commit:2,lib:3,self:2,note:[2,3],also:3,exampl:[2,3],which:[1,2,3],singl:2,begin:[2,3],a_commit:2,distribut:1,object:[0,2,3],regular:2,bsd:1,"class":2,lazili:2,syntax:3,doc:3,gather:2,doe:2,clean:3,text:[2,3],get_dir:2,identifi:2,b_mode:2,find:[2,3],involv:2,current:2,onli:2,just:[1,3],pretti:3,activ:2,should:2,with_extended_output:2,dict:[2,3],active_branch:2,count:2,contribut:2,variou:3,get:[0,1,2,3],pypi:1,repo:[0,1,2,3],git_dir:2,requir:[0,1],organ:1,througout:2,email:2,sha:2,stuff:3,a58386dd101f6eb7f33499317e5508726dfd5e4f:3,contain:[2,3],commits_sinc:2,where:2,get_git_dir:2,summari:2,"1c09f116cbc2cb4100fb6935bb162daa4723f455":2,set:2,see:[1,2],bare:[2,3],arg:2,fail:2,"9f649ef5448f9666d78356a2f66ba07c5fb27229":3,gmail:3,commit_deltas_from:2,statu:2,detect:2,dashifi:2,record:3,execute_kwarg:2,written:3,between:2,"import":3,a006b5b1a8115185a228b7514cdcd46fed90dc92:3,attribut:[2,3],altern:[1,2],signatur:2,kei:2,blame:[2,3],lazi:[0,2],addit:[2,3],howev:1,etc:3,tutori:[0,1,3],c1c7214dde86f76bc3e18806ac1f47c38b2b7a30:3,com:[2,3],fix:3,strftime:3,asctim:3,ez_setup:3,overview:[0,1],walk:1,werner:1,diff:[0,2],assum:[1,2],content_from_str:2,addition:3,three:3,frm:2,bd795df2d0e07d10e0298670005c0e9d9a5ed867:3,basic:1,rubi:1,ani:[2,3],"6870991011cc8d9853a7a8a6f02061512c6a8190":3,demand:2,present:2,"case":2,archive_tar:2,packag:[1,2],plain:2,properti:3,abov:3,error:[0,2],invoc:2,"207c0c4418115df0d30820ab1a9acd2ea4bf4431":3,stdout:2,readm:3,archiv:2,conf:3,parent:[2,3],develop:3,author:[2,3],make:3,binari:2,instanc:[2,3],document:0,higher:1,exhaust:[1,3],http:1,optin:2,effect:2,rais:2,user:3,implement:3,travers:3,appropri:2,off:2,older:2,myrepo:2,except:2,person:2,without:3,command:[1,2,3],thi:[1,2,3],gzip:[2,3],model:3,spend:1,latest:[1,3],jdoe:2,protocol:3,execut:2,invalid:2,human:3,touch:2,wed:3,is_git_directori:2,add:2,blob:[0,2,3],with_raw_output:2,els:[0,3],match:2,grit:1,format:[2,3],handl:[2,3],"980e72ae16b5378009ba5dfd6772b59fe7ccd2df":3,c1c7214dde86f76bc3e18806ac1f47c38b2b7a3:3,know:3,associ:2,insert:2,daemon:2,like:3,specif:3,whitespac:2,manifest:3,nose:1,output:2,page:[0,3],often:3,"6797c1421052efe2ded9efdbb498b37aeae16415":3,some:[1,2,3],other_repo:2,"export":2,librari:1,lead:2,avoid:2,with_except:2,"__getattr__":3,transform_kwarg:2,archive_tar_gz:2,refer:[0,1,2],encourag:1,run:1,deleted_fil:2,gmtime:2,get_work_tre:2,step:3,with_keep_cwd:2,stage:2,sub:3,about:[1,2,3],actual:2,chronolog:2,"6a91a439ea968bf2f5ce8bb1cd8ddf5bf2cad6c7":3,manag:2,act:[2,3],commit:[0,2,3],is_dirti:2,basenam:2,within:2,easy_instal:1,eaa0090ec96b054e425603480519e7cf587adfc3:3,been:2,strip:2,wrap:2,your:[1,2,3],merg:2,git:[0,1,2,3],log:[2,3],struct_tim:3,transform:2,avail:[1,2,3],start:[0,1,2,3],"563413aedbeda425d8d9dcbb744247d0c3e8a0ac":3,interfac:2,includ:2,lot:3,"var":[2,3],rename_to:2,fork:2,head:[0,2,3],form:3,tupl:2,skip:[2,3],newer:2,parlanc:3,line:[1,2,3],nfrom:3,"true":2,info:2,input:2,invalidgitrepositoryerror:2,whether:2,wish:2,maximum:[2,3],url:3,below:3,limit:2,otherwis:2,similar:3,reachabl:[2,3],featur:2,creat:[1,2,3],"int":2,certain:3,doesn:2,repres:[2,3],exist:2,file:[1,2,3],check:3,probabl:3,committed_d:[2,3],when:2,detail:2,actor:[0,2,3],prepend:2,"default":[2,3],other:[2,3],branch:[2,3],test:[1,3],you:[1,2,3],"7da4e346bb0a682e99312c48a1f452796d3fb988":3,mock:1,nice:3,stat:[0,2,3],sequenc:2,is_git_dir:2,other_ref:2,consid:2,authored_d:[2,3],c6f6ee37d328987bc6fb47a33fed16c7886df857:3,younger:2,extended_output:2,directori:[2,3],descript:2,gitori:1,time:[1,2,3],escap:3},titles:["GitPython Documentation","Overview / Install","API Reference","GitPython Tutorial"],modules:{"git.cmd":2,"git.repo":2,"git.diff":2,"git.errors":2,"git.commit":2,"git.actor":2,"git.tag":2,"git.blob":2,"git.head":2,"git.lazy":2,"git.utils":2,"git.stats":2,"git.tree":2},descrefs:{"git.diff.Diff":{list_from_string:[2,1]},"git.repo":{Repo:[2,5]},"git.errors":{GitCommandError:[2,4],NoSuchPathError:[2,4],InvalidGitRepositoryError:[2,4]},"git.commit":{Commit:[2,5]},"git.stats.Stats":{list_from_string:[2,1]},"git.tree.Tree":{get:[2,2],keys:[2,2],items:[2,2],basename:[2,0],content_from_string:[2,6],values:[2,2]},"git.actor":{Actor:[2,5]},"git.tag":{Tag:[2,5]},"git.lazy":{LazyMixin:[2,5]},"git.blob.Blob":{blame:[2,1],basename:[2,0],data:[2,0],mime_type:[2,0],size:[2,0]},"git.repo.Repo":{fork_bare:[2,2],is_dirty:[2,0],daemon_export:[2,0],diff:[2,2],alternates:[2,0],commit_deltas_from:[2,2],heads:[2,0],log:[2,2],create:[2,1],commit_diff:[2,2],blob:[2,2],active_branch:[2,0],archive_tar_gz:[2,2],commits_since:[2,2],description:[2,0],tags:[2,0],commits:[2,2],commit_count:[2,2],init_bare:[2,1],branches:[2,0],archive_tar:[2,2],tree:[2,2],commits_between:[2,2],commit:[2,2]},"git.blob":{Blob:[2,5]},"git.commit.Commit":{count:[2,1],diffs:[2,0],stats:[2,0],actor:[2,1],summary:[2,0],find_all:[2,1],diff:[2,1],id_abbrev:[2,0],list_from_string:[2,1]},"git.head":{Head:[2,5]},"git.actor.Actor":{from_string:[2,1]},"git.cmd":{Git:[2,5]},"git.stats":{Stats:[2,5]},"git.tag.Tag":{from_string:[2,1],list_from_string:[2,1],find_all:[2,1]},"git.diff":{Diff:[2,5]},"git.head.Head":{from_string:[2,1],find_all:[2,1],list_from_string:[2,1]},"git.cmd.Git":{execute:[2,2],transform_kwargs:[2,2],get_dir:[2,0]},"git.utils":{touch:[2,3],is_git_dir:[2,3],dashify:[2,3]},"git.tree":{Tree:[2,5]}},filenames:["index","intro","reference","tutorial"]})
\ No newline at end of file diff --git a/doc/doc_index/0.1/tutorial.html b/doc/doc_index/0.1/tutorial.html new file mode 100644 index 00000000..58725d14 --- /dev/null +++ b/doc/doc_index/0.1/tutorial.html @@ -0,0 +1,352 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>GitPython Tutorial — GitPython v0.1.7 documentation</title> + <link rel="stylesheet" href="_static/default.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '#', + VERSION: '0.1.7', + COLLAPSE_MODINDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <link rel="top" title="GitPython v0.1.7 documentation" href="index.html" /> + <link rel="next" title="API Reference" href="reference.html" /> + <link rel="prev" title="Overview / Install" href="intro.html" /> + </head> + <body> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="modindex.html" title="Global Module Index" + accesskey="M">modules</a> |</li> + <li class="right" > + <a href="reference.html" title="API Reference" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="intro.html" title="Overview / Install" + accesskey="P">previous</a> |</li> + <li><a href="index.html">GitPython v0.1.7 documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="gitpython-tutorial"> +<span id="tutorial-toplevel"></span><h1>GitPython Tutorial<a class="headerlink" href="#gitpython-tutorial" title="Permalink to this headline">¶</a></h1> +<p>GitPython provides object model access to your git repository. Once you have +created a repository object, you can traverse it to find parent commit(s), +trees, blobs, etc.</p> +<div class="section" id="initialize-a-repo-object"> +<h2>Initialize a Repo object<a class="headerlink" href="#initialize-a-repo-object" title="Permalink to this headline">¶</a></h2> +<p>The first step is to create a <tt class="docutils literal"><span class="pre">Repo</span></tt> object to represent your repository.</p> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">git</span> <span class="kn">import</span> <span class="o">*</span> +<span class="gp">>>> </span><span class="n">repo</span> <span class="o">=</span> <span class="n">Repo</span><span class="p">(</span><span class="s">"/Users/mtrier/Development/git-python"</span><span class="p">)</span> +</pre></div> +</div> +<p>In the above example, the directory <tt class="docutils literal"><span class="pre">/Users/mtrier/Development/git-python</span></tt> +is my working repository and contains the <tt class="docutils literal"><span class="pre">.git</span></tt> directory. You can also +initialize GitPython with a bare repository.</p> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">repo</span> <span class="o">=</span> <span class="n">Repo</span><span class="o">.</span><span class="n">create</span><span class="p">(</span><span class="s">"/var/git/git-python.git"</span><span class="p">)</span> +</pre></div> +</div> +</div> +<div class="section" id="getting-a-list-of-commits"> +<h2>Getting a list of commits<a class="headerlink" href="#getting-a-list-of-commits" title="Permalink to this headline">¶</a></h2> +<p>From the <tt class="docutils literal"><span class="pre">Repo</span></tt> object, you can get a list of <tt class="docutils literal"><span class="pre">Commit</span></tt> +objects.</p> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">repo</span><span class="o">.</span><span class="n">commits</span><span class="p">()</span> +<span class="go">[<git.Commit "207c0c4418115df0d30820ab1a9acd2ea4bf4431">,</span> +<span class="go"> <git.Commit "a91c45eee0b41bf3cdaad3418ca3850664c4a4b4">,</span> +<span class="go"> <git.Commit "e17c7e11aed9e94d2159e549a99b966912ce1091">,</span> +<span class="go"> <git.Commit "bd795df2d0e07d10e0298670005c0e9d9a5ed867">]</span> +</pre></div> +</div> +<p>Called without arguments, <tt class="docutils literal"><span class="pre">Repo.commits</span></tt> returns a list of up to ten commits +reachable by the master branch (starting at the latest commit). You can ask +for commits beginning at a different branch, commit, tag, etc.</p> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">repo</span><span class="o">.</span><span class="n">commits</span><span class="p">(</span><span class="s">'mybranch'</span><span class="p">)</span> +<span class="gp">>>> </span><span class="n">repo</span><span class="o">.</span><span class="n">commits</span><span class="p">(</span><span class="s">'40d3057d09a7a4d61059bca9dca5ae698de58cbe'</span><span class="p">)</span> +<span class="gp">>>> </span><span class="n">repo</span><span class="o">.</span><span class="n">commits</span><span class="p">(</span><span class="s">'v0.1'</span><span class="p">)</span> +</pre></div> +</div> +<p>You can specify the maximum number of commits to return.</p> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">repo</span><span class="o">.</span><span class="n">commits</span><span class="p">(</span><span class="s">'master'</span><span class="p">,</span> <span class="n">max_count</span><span class="o">=</span><span class="mf">100</span><span class="p">)</span> +</pre></div> +</div> +<p>If you need paging, you can specify a number of commits to skip.</p> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">repo</span><span class="o">.</span><span class="n">commits</span><span class="p">(</span><span class="s">'master'</span><span class="p">,</span> <span class="n">max_count</span><span class="o">=</span><span class="mf">10</span><span class="p">,</span> <span class="n">skip</span><span class="o">=</span><span class="mf">20</span><span class="p">)</span> +</pre></div> +</div> +<p>The above will return commits 21-30 from the commit list.</p> +</div> +<div class="section" id="the-commit-object"> +<h2>The Commit object<a class="headerlink" href="#the-commit-object" title="Permalink to this headline">¶</a></h2> +<p>Commit objects contain information about a specific commit.</p> +<blockquote> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">head</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">commits</span><span class="p">()[</span><span class="mf">0</span><span class="p">]</span> +</pre></div> +</div> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">head</span><span class="o">.</span><span class="n">id</span> +<span class="go">'207c0c4418115df0d30820ab1a9acd2ea4bf4431'</span> +</pre></div> +</div> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">head</span><span class="o">.</span><span class="n">parents</span> +<span class="go">[<git.Commit "a91c45eee0b41bf3cdaad3418ca3850664c4a4b4">]</span> +</pre></div> +</div> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">head</span><span class="o">.</span><span class="n">tree</span> +<span class="go"><git.Tree "563413aedbeda425d8d9dcbb744247d0c3e8a0ac"></span> +</pre></div> +</div> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">head</span><span class="o">.</span><span class="n">author</span> +<span class="go"><git.Actor "Michael Trier <mtrier@gmail.com>"></span> +</pre></div> +</div> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">head</span><span class="o">.</span><span class="n">authored_date</span> +<span class="go">(2008, 5, 7, 5, 0, 56, 2, 128, 0)</span> +</pre></div> +</div> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">head</span><span class="o">.</span><span class="n">committer</span> +<span class="go"><git.Actor "Michael Trier <mtrier@gmail.com>"></span> +</pre></div> +</div> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">head</span><span class="o">.</span><span class="n">committed_date</span> +<span class="go">(2008, 5, 7, 5, 0, 56, 2, 128, 0)</span> +</pre></div> +</div> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">head</span><span class="o">.</span><span class="n">message</span> +<span class="go">'cleaned up a lot of test information. Fixed escaping so it works with</span> +<span class="go">subprocess.'</span> +</pre></div> +</div> +</blockquote> +<p>Note: date time is represented in a <a class="reference external" href="http://docs.python.org/library/time.html">struct_time</a> format. Conversion to +human readable form can be accomplished with the various time module methods.</p> +<blockquote> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="kn">import</span> <span class="nn">time</span> +<span class="gp">>>> </span><span class="n">time</span><span class="o">.</span><span class="n">asctime</span><span class="p">(</span><span class="n">head</span><span class="o">.</span><span class="n">committed_date</span><span class="p">)</span> +<span class="go">'Wed May 7 05:56:02 2008'</span> +</pre></div> +</div> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">time</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="s">"%a, </span><span class="si">%d</span><span class="s"> %b %Y %H:%M"</span><span class="p">,</span> <span class="n">head</span><span class="o">.</span><span class="n">committed_date</span><span class="p">)</span> +<span class="go">'Wed, 7 May 2008 05:56'</span> +</pre></div> +</div> +</blockquote> +<p>You can traverse a commit’s ancestry by chaining calls to <tt class="docutils literal"><span class="pre">parents</span></tt>.</p> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">repo</span><span class="o">.</span><span class="n">commits</span><span class="p">()[</span><span class="mf">0</span><span class="p">]</span><span class="o">.</span><span class="n">parents</span><span class="p">[</span><span class="mf">0</span><span class="p">]</span><span class="o">.</span><span class="n">parents</span><span class="p">[</span><span class="mf">0</span><span class="p">]</span><span class="o">.</span><span class="n">parents</span><span class="p">[</span><span class="mf">0</span><span class="p">]</span> +</pre></div> +</div> +<p>The above corresponds to <tt class="docutils literal"><span class="pre">master^^^</span></tt> or <tt class="docutils literal"><span class="pre">master~3</span></tt> in git parlance.</p> +</div> +<div class="section" id="the-tree-object"> +<h2>The Tree object<a class="headerlink" href="#the-tree-object" title="Permalink to this headline">¶</a></h2> +<p>A tree records pointers to the contents of a directory. Let’s say you want +the root tree of the latest commit on the master branch.</p> +<blockquote> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">tree</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">commits</span><span class="p">()[</span><span class="mf">0</span><span class="p">]</span><span class="o">.</span><span class="n">tree</span> +<span class="go"><git.Tree "a006b5b1a8115185a228b7514cdcd46fed90dc92"></span> +</pre></div> +</div> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">tree</span><span class="o">.</span><span class="n">id</span> +<span class="go">'a006b5b1a8115185a228b7514cdcd46fed90dc92'</span> +</pre></div> +</div> +</blockquote> +<p>Once you have a tree, you can get the contents.</p> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">contents</span> <span class="o">=</span> <span class="n">tree</span><span class="o">.</span><span class="n">values</span><span class="p">()</span> +<span class="go">[<git.Blob "6a91a439ea968bf2f5ce8bb1cd8ddf5bf2cad6c7">,</span> +<span class="go"> <git.Blob "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391">,</span> +<span class="go"> <git.Tree "eaa0090ec96b054e425603480519e7cf587adfc3">,</span> +<span class="go"> <git.Blob "980e72ae16b5378009ba5dfd6772b59fe7ccd2df">]</span> +</pre></div> +</div> +<p>The tree is implements a dictionary protocol so it can be used and acts just +like a dictionary with some additional properties.</p> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">tree</span><span class="o">.</span><span class="n">items</span><span class="p">()</span> +<span class="go">[('lib', <git.Tree "310ebc9a0904531438bdde831fd6a27c6b6be58e">),</span> +<span class="go"> ('LICENSE', <git.Blob "6797c1421052efe2ded9efdbb498b37aeae16415">),</span> +<span class="go"> ('doc', <git.Tree "a58386dd101f6eb7f33499317e5508726dfd5e4f">),</span> +<span class="go"> ('MANIFEST.in', <git.Blob "7da4e346bb0a682e99312c48a1f452796d3fb988">),</span> +<span class="go"> ('.gitignore', <git.Blob "6870991011cc8d9853a7a8a6f02061512c6a8190">),</span> +<span class="go"> ('test', <git.Tree "c6f6ee37d328987bc6fb47a33fed16c7886df857">),</span> +<span class="go"> ('VERSION', <git.Blob "9faa1b7a7339db85692f91ad4b922554624a3ef7">),</span> +<span class="go"> ('AUTHORS', <git.Blob "9f649ef5448f9666d78356a2f66ba07c5fb27229">),</span> +<span class="go"> ('README', <git.Blob "9643dcf549f34fbd09503d4c941a5d04157570fe">),</span> +<span class="go"> ('ez_setup.py', <git.Blob "3031ad0d119bd5010648cf8c038e2bbe21969ecb">),</span> +<span class="go"> ('setup.py', <git.Blob "271074302aee04eb0394a4706c74f0c2eb504746">),</span> +<span class="go"> ('CHANGES', <git.Blob "0d236f3d9f20d5e5db86daefe1e3ba1ce68e3a97">)]</span> +</pre></div> +</div> +<p>This tree contains three <tt class="docutils literal"><span class="pre">Blob</span></tt> objects and one <tt class="docutils literal"><span class="pre">Tree</span></tt> object. The trees +are subdirectories and the blobs are files. Trees below the root have +additional attributes.</p> +<blockquote> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">contents</span> <span class="o">=</span> <span class="n">tree</span><span class="p">[</span><span class="s">"lib"</span><span class="p">]</span> +<span class="go"><git.Tree "c1c7214dde86f76bc3e18806ac1f47c38b2b7a3"></span> +</pre></div> +</div> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">contents</span><span class="o">.</span><span class="n">name</span> +<span class="go">'test'</span> +</pre></div> +</div> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">contents</span><span class="o">.</span><span class="n">mode</span> +<span class="go">'040000'</span> +</pre></div> +</div> +</blockquote> +<p>There is a convenience method that allows you to get a named sub-object +from a tree with a syntax similar to how paths are written in an unix +system.</p> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">tree</span><span class="o">/</span><span class="s">"lib"</span> +<span class="go"><git.Tree "c1c7214dde86f76bc3e18806ac1f47c38b2b7a30"></span> +</pre></div> +</div> +<p>You can also get a tree directly from the repository if you know its name.</p> +<blockquote> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">repo</span><span class="o">.</span><span class="n">tree</span><span class="p">()</span> +<span class="go"><git.Tree "master"></span> +</pre></div> +</div> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">repo</span><span class="o">.</span><span class="n">tree</span><span class="p">(</span><span class="s">"c1c7214dde86f76bc3e18806ac1f47c38b2b7a30"</span><span class="p">)</span> +<span class="go"><git.Tree "c1c7214dde86f76bc3e18806ac1f47c38b2b7a30"></span> +</pre></div> +</div> +</blockquote> +</div> +<div class="section" id="the-blob-object"> +<h2>The Blob object<a class="headerlink" href="#the-blob-object" title="Permalink to this headline">¶</a></h2> +<p>A blob represents a file. Trees often contain blobs.</p> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">blob</span> <span class="o">=</span> <span class="n">tree</span><span class="p">[</span><span class="s">'urls.py'</span><span class="p">]</span> +<span class="go"><git.Blob "b19574431a073333ea09346eafd64e7b1908ef49"></span> +</pre></div> +</div> +<p>A blob has certain attributes.</p> +<blockquote> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">blob</span><span class="o">.</span><span class="n">name</span> +<span class="go">'urls.py'</span> +</pre></div> +</div> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">blob</span><span class="o">.</span><span class="n">mode</span> +<span class="go">'100644'</span> +</pre></div> +</div> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">blob</span><span class="o">.</span><span class="n">mime_type</span> +<span class="go">'text/x-python'</span> +</pre></div> +</div> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">blob</span><span class="o">.</span><span class="n">size</span> +<span class="go">415</span> +</pre></div> +</div> +</blockquote> +<p>You can get the data of a blob as a string.</p> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">blob</span><span class="o">.</span><span class="n">data</span> +<span class="go">"from django.conf.urls.defaults import *\nfrom django.conf..."</span> +</pre></div> +</div> +<p>You can also get a blob directly from the repo if you know its name.</p> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">repo</span><span class="o">.</span><span class="n">blob</span><span class="p">(</span><span class="s">"b19574431a073333ea09346eafd64e7b1908ef49"</span><span class="p">)</span> +<span class="go"><git.Blob "b19574431a073333ea09346eafd64e7b1908ef49"></span> +</pre></div> +</div> +</div> +<div class="section" id="what-else"> +<h2>What Else?<a class="headerlink" href="#what-else" title="Permalink to this headline">¶</a></h2> +<p>There is more stuff in there, like the ability to tar or gzip repos, stats, +log, blame, and probably a few other things. Additionally calls to the git +instance are handled through a <tt class="docutils literal"><span class="pre">__getattr__</span></tt> construct, which makes +available any git commands directly, with a nice conversion of Python dicts +to command line parameters.</p> +<p>Check the unit tests, they’re pretty exhaustive.</p> +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference external" href="#">GitPython Tutorial</a><ul> +<li><a class="reference external" href="#initialize-a-repo-object">Initialize a Repo object</a></li> +<li><a class="reference external" href="#getting-a-list-of-commits">Getting a list of commits</a></li> +<li><a class="reference external" href="#the-commit-object">The Commit object</a></li> +<li><a class="reference external" href="#the-tree-object">The Tree object</a></li> +<li><a class="reference external" href="#the-blob-object">The Blob object</a></li> +<li><a class="reference external" href="#what-else">What Else?</a></li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="intro.html" + title="previous chapter">Overview / Install</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="reference.html" + title="next chapter">API Reference</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="_sources/tutorial.txt" + rel="nofollow">Show Source</a></li> + </ul> + <div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> + </div> + <script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="modindex.html" title="Global Module Index" + >modules</a> |</li> + <li class="right" > + <a href="reference.html" title="API Reference" + >next</a> |</li> + <li class="right" > + <a href="intro.html" title="Overview / Install" + >previous</a> |</li> + <li><a href="index.html">GitPython v0.1.7 documentation</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright Copyright (C) 2008-2010 Michael Trier and contributors. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.5. + </div> + </body> +</html>
\ No newline at end of file diff --git a/doc/index.rst b/doc/doc_index/0.2/_sources/index.txt index d05a8c98..d05a8c98 100644 --- a/doc/index.rst +++ b/doc/doc_index/0.2/_sources/index.txt diff --git a/doc/intro.rst b/doc/doc_index/0.2/_sources/intro.txt index d4106b19..476ab4ec 100644 --- a/doc/intro.rst +++ b/doc/doc_index/0.2/_sources/intro.txt @@ -15,7 +15,7 @@ Requirements ============ * Git_ tested with 1.5.3.7 -* Requires Git_ 1.7.0 or newer +* Requires Git_ 1.6.5.4 or newer if index.add function is to be used * `Python Nose`_ - used for running the tests * `Mock by Michael Foord`_ used for tests. Requires 0.5 diff --git a/doc/reference.rst b/doc/doc_index/0.2/_sources/reference.txt index 9cc32b71..9cc32b71 100644 --- a/doc/reference.rst +++ b/doc/doc_index/0.2/_sources/reference.txt diff --git a/doc/roadmap.rst b/doc/doc_index/0.2/_sources/roadmap.txt index a6bdc3a0..a6bdc3a0 100644 --- a/doc/roadmap.rst +++ b/doc/doc_index/0.2/_sources/roadmap.txt diff --git a/doc/tutorial.rst b/doc/doc_index/0.2/_sources/tutorial.txt index 37dd8d32..37dd8d32 100644 --- a/doc/tutorial.rst +++ b/doc/doc_index/0.2/_sources/tutorial.txt diff --git a/doc/doc_index/0.2/_static/basic.css b/doc/doc_index/0.2/_static/basic.css new file mode 100644 index 00000000..a04d6545 --- /dev/null +++ b/doc/doc_index/0.2/_static/basic.css @@ -0,0 +1,417 @@ +/** + * Sphinx stylesheet -- basic theme + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + */ + +/* -- main layout ----------------------------------------------------------- */ + +div.clearer { + clear: both; +} + +/* -- relbar ---------------------------------------------------------------- */ + +div.related { + width: 100%; + font-size: 90%; +} + +div.related h3 { + display: none; +} + +div.related ul { + margin: 0; + padding: 0 0 0 10px; + list-style: none; +} + +div.related li { + display: inline; +} + +div.related li.right { + float: right; + margin-right: 5px; +} + +/* -- sidebar --------------------------------------------------------------- */ + +div.sphinxsidebarwrapper { + padding: 10px 5px 0 10px; +} + +div.sphinxsidebar { + float: left; + width: 230px; + margin-left: -100%; + font-size: 90%; +} + +div.sphinxsidebar ul { + list-style: none; +} + +div.sphinxsidebar ul ul, +div.sphinxsidebar ul.want-points { + margin-left: 20px; + list-style: square; +} + +div.sphinxsidebar ul ul { + margin-top: 0; + margin-bottom: 0; +} + +div.sphinxsidebar form { + margin-top: 10px; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + +img { + border: 0; +} + +/* -- search page ----------------------------------------------------------- */ + +ul.search { + margin: 10px 0 0 20px; + padding: 0; +} + +ul.search li { + padding: 5px 0 5px 20px; + background-image: url(file.png); + background-repeat: no-repeat; + background-position: 0 7px; +} + +ul.search li a { + font-weight: bold; +} + +ul.search li div.context { + color: #888; + margin: 2px 0 0 30px; + text-align: left; +} + +ul.keywordmatches li.goodmatch a { + font-weight: bold; +} + +/* -- index page ------------------------------------------------------------ */ + +table.contentstable { + width: 90%; +} + +table.contentstable p.biglink { + line-height: 150%; +} + +a.biglink { + font-size: 1.3em; +} + +span.linkdescr { + font-style: italic; + padding-top: 5px; + font-size: 90%; +} + +/* -- general index --------------------------------------------------------- */ + +table.indextable td { + text-align: left; + vertical-align: top; +} + +table.indextable dl, table.indextable dd { + margin-top: 0; + margin-bottom: 0; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +/* -- general body styles --------------------------------------------------- */ + +a.headerlink { + visibility: hidden; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink { + visibility: visible; +} + +div.body p.caption { + text-align: inherit; +} + +div.body td { + text-align: left; +} + +.field-list ul { + padding-left: 1em; +} + +.first { + margin-top: 0 !important; +} + +p.rubric { + margin-top: 30px; + font-weight: bold; +} + +/* -- sidebars -------------------------------------------------------------- */ + +div.sidebar { + margin: 0 0 0.5em 1em; + border: 1px solid #ddb; + padding: 7px 7px 0 7px; + background-color: #ffe; + width: 40%; + float: right; +} + +p.sidebar-title { + font-weight: bold; +} + +/* -- topics ---------------------------------------------------------------- */ + +div.topic { + border: 1px solid #ccc; + padding: 7px 7px 0 7px; + margin: 10px 0 10px 0; +} + +p.topic-title { + font-size: 1.1em; + font-weight: bold; + margin-top: 10px; +} + +/* -- admonitions ----------------------------------------------------------- */ + +div.admonition { + margin-top: 10px; + margin-bottom: 10px; + padding: 7px; +} + +div.admonition dt { + font-weight: bold; +} + +div.admonition dl { + margin-bottom: 0; +} + +p.admonition-title { + margin: 0px 10px 5px 0px; + font-weight: bold; +} + +div.body p.centered { + text-align: center; + margin-top: 25px; +} + +/* -- tables ---------------------------------------------------------------- */ + +table.docutils { + border: 0; + border-collapse: collapse; +} + +table.docutils td, table.docutils th { + padding: 1px 8px 1px 0; + border-top: 0; + border-left: 0; + border-right: 0; + border-bottom: 1px solid #aaa; +} + +table.field-list td, table.field-list th { + border: 0 !important; +} + +table.footnote td, table.footnote th { + border: 0 !important; +} + +th { + text-align: left; + padding-right: 5px; +} + +/* -- other body styles ----------------------------------------------------- */ + +dl { + margin-bottom: 15px; +} + +dd p { + margin-top: 0px; +} + +dd ul, dd table { + margin-bottom: 10px; +} + +dd { + margin-top: 3px; + margin-bottom: 10px; + margin-left: 30px; +} + +dt:target, .highlight { + background-color: #fbe54e; +} + +dl.glossary dt { + font-weight: bold; + font-size: 1.1em; +} + +.field-list ul { + margin: 0; + padding-left: 1em; +} + +.field-list p { + margin: 0; +} + +.refcount { + color: #060; +} + +.optional { + font-size: 1.3em; +} + +.versionmodified { + font-style: italic; +} + +.system-message { + background-color: #fda; + padding: 5px; + border: 3px solid red; +} + +.footnote:target { + background-color: #ffa +} + +.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; +} + +.line-block .line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; +} + +/* -- code displays --------------------------------------------------------- */ + +pre { + overflow: auto; +} + +td.linenos pre { + padding: 5px 0px; + border: 0; + background-color: transparent; + color: #aaa; +} + +table.highlighttable { + margin-left: 0.5em; +} + +table.highlighttable td { + padding: 0 0.5em 0 0.5em; +} + +tt.descname { + background-color: transparent; + font-weight: bold; + font-size: 1.2em; +} + +tt.descclassname { + background-color: transparent; +} + +tt.xref, a tt { + background-color: transparent; + font-weight: bold; +} + +h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt { + background-color: transparent; +} + +/* -- math display ---------------------------------------------------------- */ + +img.math { + vertical-align: middle; +} + +div.body div.math p { + text-align: center; +} + +span.eqno { + float: right; +} + +/* -- printout stylesheet --------------------------------------------------- */ + +@media print { + div.document, + div.documentwrapper, + div.bodywrapper { + margin: 0 !important; + width: 100%; + } + + div.sphinxsidebar, + div.related, + div.footer, + #top-link { + display: none; + } +} diff --git a/doc/doc_index/0.2/_static/default.css b/doc/doc_index/0.2/_static/default.css new file mode 100644 index 00000000..37257440 --- /dev/null +++ b/doc/doc_index/0.2/_static/default.css @@ -0,0 +1,230 @@ +/** + * Sphinx stylesheet -- default theme + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + */ + +@import url("basic.css"); + +/* -- page layout ----------------------------------------------------------- */ + +body { + font-family: sans-serif; + font-size: 100%; + background-color: #11303d; + color: #000; + margin: 0; + padding: 0; +} + +div.document { + background-color: #1c4e63; +} + +div.documentwrapper { + float: left; + width: 100%; +} + +div.bodywrapper { + margin: 0 0 0 230px; +} + +div.body { + background-color: #ffffff; + color: #000000; + padding: 0 20px 30px 20px; +} + +div.footer { + color: #ffffff; + width: 100%; + padding: 9px 0 9px 0; + text-align: center; + font-size: 75%; +} + +div.footer a { + color: #ffffff; + text-decoration: underline; +} + +div.related { + background-color: #133f52; + line-height: 30px; + color: #ffffff; +} + +div.related a { + color: #ffffff; +} + +div.sphinxsidebar { +} + +div.sphinxsidebar h3 { + font-family: 'Trebuchet MS', sans-serif; + color: #ffffff; + font-size: 1.4em; + font-weight: normal; + margin: 0; + padding: 0; +} + +div.sphinxsidebar h3 a { + color: #ffffff; +} + +div.sphinxsidebar h4 { + font-family: 'Trebuchet MS', sans-serif; + color: #ffffff; + font-size: 1.3em; + font-weight: normal; + margin: 5px 0 0 0; + padding: 0; +} + +div.sphinxsidebar p { + color: #ffffff; +} + +div.sphinxsidebar p.topless { + margin: 5px 10px 10px 10px; +} + +div.sphinxsidebar ul { + margin: 10px; + padding: 0; + color: #ffffff; +} + +div.sphinxsidebar a { + color: #98dbcc; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + +/* -- body styles ----------------------------------------------------------- */ + +a { + color: #355f7c; + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +div.body p, div.body dd, div.body li { + text-align: justify; + line-height: 130%; +} + +div.body h1, +div.body h2, +div.body h3, +div.body h4, +div.body h5, +div.body h6 { + font-family: 'Trebuchet MS', sans-serif; + background-color: #f2f2f2; + font-weight: normal; + color: #20435c; + border-bottom: 1px solid #ccc; + margin: 20px -20px 10px -20px; + padding: 3px 0 3px 10px; +} + +div.body h1 { margin-top: 0; font-size: 200%; } +div.body h2 { font-size: 160%; } +div.body h3 { font-size: 140%; } +div.body h4 { font-size: 120%; } +div.body h5 { font-size: 110%; } +div.body h6 { font-size: 100%; } + +a.headerlink { + color: #c60f0f; + font-size: 0.8em; + padding: 0 4px 0 4px; + text-decoration: none; +} + +a.headerlink:hover { + background-color: #c60f0f; + color: white; +} + +div.body p, div.body dd, div.body li { + text-align: justify; + line-height: 130%; +} + +div.admonition p.admonition-title + p { + display: inline; +} + +div.admonition p { + margin-bottom: 5px; +} + +div.admonition pre { + margin-bottom: 5px; +} + +div.admonition ul, div.admonition ol { + margin-bottom: 5px; +} + +div.note { + background-color: #eee; + border: 1px solid #ccc; +} + +div.seealso { + background-color: #ffc; + border: 1px solid #ff6; +} + +div.topic { + background-color: #eee; +} + +div.warning { + background-color: #ffe4e4; + border: 1px solid #f66; +} + +p.admonition-title { + display: inline; +} + +p.admonition-title:after { + content: ":"; +} + +pre { + padding: 5px; + background-color: #eeffcc; + color: #333333; + line-height: 120%; + border: 1px solid #ac9; + border-left: none; + border-right: none; +} + +tt { + background-color: #ecf0f3; + padding: 0 1px 0 1px; + font-size: 0.95em; +} + +.warning tt { + background: #efc2c2; +} + +.note tt { + background: #d6d6d6; +}
\ No newline at end of file diff --git a/doc/doc_index/0.2/_static/doctools.js b/doc/doc_index/0.2/_static/doctools.js new file mode 100644 index 00000000..9447678c --- /dev/null +++ b/doc/doc_index/0.2/_static/doctools.js @@ -0,0 +1,232 @@ +/// XXX: make it cross browser + +/** + * make the code below compatible with browsers without + * an installed firebug like debugger + */ +if (!window.console || !console.firebug) { + var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", + "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"]; + window.console = {}; + for (var i = 0; i < names.length; ++i) + window.console[names[i]] = function() {} +} + +/** + * small helper function to urldecode strings + */ +jQuery.urldecode = function(x) { + return decodeURIComponent(x).replace(/\+/g, ' '); +} + +/** + * small helper function to urlencode strings + */ +jQuery.urlencode = encodeURIComponent; + +/** + * This function returns the parsed url parameters of the + * current request. Multiple values per key are supported, + * it will always return arrays of strings for the value parts. + */ +jQuery.getQueryParameters = function(s) { + if (typeof s == 'undefined') + s = document.location.search; + var parts = s.substr(s.indexOf('?') + 1).split('&'); + var result = {}; + for (var i = 0; i < parts.length; i++) { + var tmp = parts[i].split('=', 2); + var key = jQuery.urldecode(tmp[0]); + var value = jQuery.urldecode(tmp[1]); + if (key in result) + result[key].push(value); + else + result[key] = [value]; + } + return result; +} + +/** + * small function to check if an array contains + * a given item. + */ +jQuery.contains = function(arr, item) { + for (var i = 0; i < arr.length; i++) { + if (arr[i] == item) + return true; + } + return false; +} + +/** + * highlight a given string on a jquery object by wrapping it in + * span elements with the given class name. + */ +jQuery.fn.highlightText = function(text, className) { + function highlight(node) { + if (node.nodeType == 3) { + var val = node.nodeValue; + var pos = val.toLowerCase().indexOf(text); + if (pos >= 0 && !jQuery.className.has(node.parentNode, className)) { + var span = document.createElement("span"); + span.className = className; + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + node.parentNode.insertBefore(span, node.parentNode.insertBefore( + document.createTextNode(val.substr(pos + text.length)), + node.nextSibling)); + node.nodeValue = val.substr(0, pos); + } + } + else if (!jQuery(node).is("button, select, textarea")) { + jQuery.each(node.childNodes, function() { + highlight(this) + }); + } + } + return this.each(function() { + highlight(this); + }); +} + +/** + * Small JavaScript module for the documentation. + */ +var Documentation = { + + init : function() { + this.fixFirefoxAnchorBug(); + this.highlightSearchWords(); + this.initModIndex(); + }, + + /** + * i18n support + */ + TRANSLATIONS : {}, + PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; }, + LOCALE : 'unknown', + + // gettext and ngettext don't access this so that the functions + // can savely bound to a different name (_ = Documentation.gettext) + gettext : function(string) { + var translated = Documentation.TRANSLATIONS[string]; + if (typeof translated == 'undefined') + return string; + return (typeof translated == 'string') ? translated : translated[0]; + }, + + ngettext : function(singular, plural, n) { + var translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated == 'undefined') + return (n == 1) ? singular : plural; + return translated[Documentation.PLURALEXPR(n)]; + }, + + addTranslations : function(catalog) { + for (var key in catalog.messages) + this.TRANSLATIONS[key] = catalog.messages[key]; + this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); + this.LOCALE = catalog.locale; + }, + + /** + * add context elements like header anchor links + */ + addContextElements : function() { + $('div[id] > :header:first').each(function() { + $('<a class="headerlink">\u00B6</a>'). + attr('href', '#' + this.id). + attr('title', _('Permalink to this headline')). + appendTo(this); + }); + $('dt[id]').each(function() { + $('<a class="headerlink">\u00B6</a>'). + attr('href', '#' + this.id). + attr('title', _('Permalink to this definition')). + appendTo(this); + }); + }, + + /** + * workaround a firefox stupidity + */ + fixFirefoxAnchorBug : function() { + if (document.location.hash && $.browser.mozilla) + window.setTimeout(function() { + document.location.href += ''; + }, 10); + }, + + /** + * highlight the search words provided in the url in the text + */ + highlightSearchWords : function() { + var params = $.getQueryParameters(); + var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; + if (terms.length) { + var body = $('div.body'); + window.setTimeout(function() { + $.each(terms, function() { + body.highlightText(this.toLowerCase(), 'highlight'); + }); + }, 10); + $('<li class="highlight-link"><a href="javascript:Documentation.' + + 'hideSearchWords()">' + _('Hide Search Matches') + '</a></li>') + .appendTo($('.sidebar .this-page-menu')); + } + }, + + /** + * init the modindex toggle buttons + */ + initModIndex : function() { + var togglers = $('img.toggler').click(function() { + var src = $(this).attr('src'); + var idnum = $(this).attr('id').substr(7); + console.log($('tr.cg-' + idnum).toggle()); + if (src.substr(-9) == 'minus.png') + $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); + else + $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); + }).css('display', ''); + if (DOCUMENTATION_OPTIONS.COLLAPSE_MODINDEX) { + togglers.click(); + } + }, + + /** + * helper function to hide the search marks again + */ + hideSearchWords : function() { + $('.sidebar .this-page-menu li.highlight-link').fadeOut(300); + $('span.highlight').removeClass('highlight'); + }, + + /** + * make the url absolute + */ + makeURL : function(relativeURL) { + return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; + }, + + /** + * get the current relative url + */ + getCurrentURL : function() { + var path = document.location.pathname; + var parts = path.split(/\//); + $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { + if (this == '..') + parts.pop(); + }); + var url = parts.join('/'); + return path.substring(url.lastIndexOf('/') + 1, path.length - 1); + } +}; + +// quick alias for translations +_ = Documentation.gettext; + +$(document).ready(function() { + Documentation.init(); +}); diff --git a/doc/doc_index/0.2/_static/file.png b/doc/doc_index/0.2/_static/file.png Binary files differnew file mode 100644 index 00000000..d18082e3 --- /dev/null +++ b/doc/doc_index/0.2/_static/file.png diff --git a/doc/doc_index/0.2/_static/jquery.js b/doc/doc_index/0.2/_static/jquery.js new file mode 100644 index 00000000..82b98e1d --- /dev/null +++ b/doc/doc_index/0.2/_static/jquery.js @@ -0,0 +1,32 @@ +/* + * jQuery 1.2.6 - New Wave Javascript + * + * Copyright (c) 2008 John Resig (jquery.com) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * $Date: 2008-05-24 14:22:17 -0400 (Sat, 24 May 2008) $ + * $Rev: 5685 $ + */ +(function(){var _jQuery=window.jQuery,_$=window.$;var jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);};var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,isSimple=/^.[^:#\[\.]*$/,undefined;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this;}if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1])selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem){if(elem.id!=match[3])return jQuery().find(selector);return jQuery(elem);}selector=[];}}else +return jQuery(context).find(selector);}else if(jQuery.isFunction(selector))return jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(jQuery.makeArray(selector));},jquery:"1.2.6",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){var ret=-1;return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function(name,value,type){var options=name;if(name.constructor==String)if(value===undefined)return this[0]&&jQuery[type||"attr"](this[0],name);else{options={};options[name]=value;}return this.each(function(i){for(name in options)jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));});},css:function(key,value){if((key=='width'||key=='height')&&parseFloat(value)<0)value=undefined;return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!="object"&&text!=null)return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return ret;},wrapAll:function(html){if(this[0])jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1)this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1)this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem);});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems);},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0];}else +return this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)this[expando]=null;});if(events===true)this.find("*").andSelf().each(function(i){if(this.nodeType==3)return;var events=jQuery.data(this,"events");for(var type in events)for(var handler in events[type])jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,this));},not:function(selector){if(selector.constructor==String)if(isSimple.test(selector))return this.pushStack(jQuery.multiFilter(selector,this,true));else +selector=jQuery.multiFilter(selector,this);var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector=='string'?jQuery(selector):jQuery.makeArray(selector))));},is:function(selector){return!!selector&&jQuery.multiFilter(selector,this).length>0;},hasClass:function(selector){return this.is("."+selector);},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0)return null;for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery.browser.msie&&!option.attributes.value.specified?option.text:option.value;if(one)return value;values.push(value);}}return values;}else +return(this[0].value||"").replace(/\r/g,"");}return undefined;}if(value.constructor==Number)value+='';return this.each(function(){if(this.nodeType!=1)return;if(value.constructor==Array&&/radio|checkbox/.test(this.type))this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0);else if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length)this.selectedIndex=-1;}else +this.value=value;});},html:function(value){return value==undefined?(this[0]?this[0].innerHTML:null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length)data=jQuery.data(this[0],key);return data===undefined&&parts[1]?this.data(parts[0]):data;}else +return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse)elems.reverse();}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr"))obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script"))scripts=scripts.add(elem);else{if(elem.nodeType==1)scripts=scripts.add(jQuery("script",elem).remove());callback.call(obj,elem);}});scripts.each(evalScript);});}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src)jQuery.ajax({url:elem.src,async:false,dataType:"script"});else +jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)elem.parentNode.removeChild(elem);}function now(){return+new Date;}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2;}if(typeof target!="object"&&typeof target!="function")target={};if(length==i){target=this;--i;}for(;i<length;i++)if((options=arguments[i])!=null)for(var name in options){var src=target[name],copy=options[name];if(target===copy)continue;if(deep&©&&typeof copy=="object"&&!copy.nodeType)target[name]=jQuery.extend(deep,src||(copy.length!=null?[]:{}),copy);else if(copy!==undefined)target[name]=copy;}return target;};var expando="jQuery"+now(),uuid=0,windowData={},exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{};jQuery.extend({noConflict:function(deep){window.$=_$;if(deep)window.jQuery=_jQuery;return jQuery;},isFunction:function(fn){return!!fn&&typeof fn!="string"&&!fn.nodeName&&fn.constructor!=Array&&/^[\s[]?function/.test(fn+"");},isXMLDoc:function(elem){return elem.documentElement&&!elem.body||elem.tagName&&elem.ownerDocument&&!elem.ownerDocument.body;},globalEval:function(data){data=jQuery.trim(data);if(data){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.browser.msie)script.text=data;else +script.appendChild(document.createTextNode(data));head.insertBefore(script,head.firstChild);head.removeChild(script);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id)id=elem[expando]=++uuid;if(name&&!jQuery.cache[id])jQuery.cache[id]={};if(data!==undefined)jQuery.cache[id][name]=data;return name?jQuery.cache[id][name]:id;},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id])break;if(!name)jQuery.removeData(elem);}}else{try{delete elem[expando];}catch(e){if(elem.removeAttribute)elem.removeAttribute(expando);}delete jQuery.cache[id];}},each:function(object,callback,args){var name,i=0,length=object.length;if(args){if(length==undefined){for(name in object)if(callback.apply(object[name],args)===false)break;}else +for(;i<length;)if(callback.apply(object[i++],args)===false)break;}else{if(length==undefined){for(name in object)if(callback.call(object[name],name,object[name])===false)break;}else +for(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}return object;},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value))value=value.call(elem,i);return value&&value.constructor==Number&&type=="curCSS"&&!exclude.test(name)?value+"px":value;},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className))elem.className+=(elem.className?" ":"")+className;});},remove:function(elem,classNames){if(elem.nodeType==1)elem.className=classNames!=undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return!jQuery.className.has(classNames,className);}).join(" "):"";},has:function(elem,className){return jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}callback.call(elem);for(var name in options)elem.style[name]=old[name];},css:function(elem,name,force){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});val-=Math.round(padding+border);}if(jQuery(elem).is(":visible"))getWH();else +jQuery.swap(elem,props,getWH);return Math.max(0,val);}return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style;function color(elem){if(!jQuery.browser.safari)return false;var ret=defaultView.getComputedStyle(elem,null);return!ret||ret.getPropertyValue("color")=="";}if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret;}if(jQuery.browser.opera&&name=="display"){var save=style.outline;style.outline="0 solid black";style.outline=save;}if(name.match(/float/i))name=styleFloat;if(!force&&style&&style[name])ret=style[name];else if(defaultView.getComputedStyle){if(name.match(/float/i))name="float";name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle&&!color(elem))ret=computedStyle.getPropertyValue(name);else{var swap=[],stack=[],a=elem,i=0;for(;a&&color(a);a=a.parentNode)stack.unshift(a);for(;i<stack.length;i++)if(color(stack[i])){swap[i]=stack[i].style.display;stack[i].style.display="block";}ret=name=="display"&&swap[stack.length-1]!=null?"none":(computedStyle&&computedStyle.getPropertyValue(name))||"";for(i=0;i<swap.length;i++)if(swap[i]!=null)stack[i].style.display=swap[i];}if(name=="opacity"&&ret=="")ret="1";}else if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase();});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=ret||0;ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft;}}return ret;},clean:function(elems,context){var ret=[];context=context||document;if(typeof context.createElement=='undefined')context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;jQuery.each(elems,function(i,elem){if(!elem)return;if(elem.constructor==Number)elem+='';if(typeof elem=="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">";});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||jQuery.browser.msie&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)div=div.lastChild;if(jQuery.browser.msie){var tbody=!tags.indexOf("<table")&&tags.indexOf("<tbody")<0?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&tags.indexOf("<tbody")<0?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j)if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length)tbody[j].parentNode.removeChild(tbody[j]);if(/^\s/.test(elem))div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);}elem=jQuery.makeArray(div.childNodes);}if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select")))return;if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options)ret.push(elem);else +ret=jQuery.merge(ret,elem);});return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8)return undefined;var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined,msie=jQuery.browser.msie;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&jQuery.browser.safari)elem.parentNode.selectedIndex;if(name in elem&¬xml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)throw"type property can't be changed";elem[name]=value;}if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name))return elem.getAttributeNode(name).nodeValue;return elem[name];}if(msie&¬xml&&name=="style")return jQuery.attr(elem.style,"cssText",value);if(set)elem.setAttribute(name,""+value);var attr=msie&¬xml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}if(msie&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(value)+''=="NaN"?"":"alpha(opacity="+value*100+")");}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+'':"";}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(set)elem[name]=value;return elem[name];},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||array.split||array.setInterval||array.call)ret[0]=array;else +while(i)ret[--i]=array[i];}return ret;},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++)if(array[i]===elem)return i;return-1;},merge:function(first,second){var i=0,elem,pos=first.length;if(jQuery.browser.msie){while(elem=second[i++])if(elem.nodeType!=8)first[pos++]=elem;}else +while(elem=second[i++])first[pos++]=elem;return first;},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i]);}}}catch(e){ret=array;}return ret;},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++)if(!inv!=!callback(elems[i],i))ret.push(elems[i]);return ret;},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!=null)ret[ret.length]=value;}return ret.concat.apply([],ret);}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};var styleFloat=jQuery.browser.msie?"styleFloat":"cssFloat";jQuery.extend({boxModel:!jQuery.browser.msie||document.compatMode=="CSS1Compat",props:{"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing"}});jQuery.each({parent:function(elem){return elem.parentNode;},parents:function(elem){return jQuery.dir(elem,"parentNode");},next:function(elem){return jQuery.nth(elem,2,"nextSibling");},prev:function(elem){return jQuery.nth(elem,2,"previousSibling");},nextAll:function(elem){return jQuery.dir(elem,"nextSibling");},prevAll:function(elem){return jQuery.dir(elem,"previousSibling");},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},children:function(elem){return jQuery.sibling(elem.firstChild);},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string")ret=jQuery.multiFilter(selector,ret);return this.pushStack(jQuery.unique(ret));};});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(){var args=arguments;return this.each(function(){for(var i=0,length=args.length;i<length;i++)jQuery(args[i])[original](this);});};});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1)this.removeAttribute(name);},addClass:function(classNames){jQuery.className.add(this,classNames);},removeClass:function(classNames){jQuery.className.remove(this,classNames);},toggleClass:function(classNames){jQuery.className[jQuery.className.has(this,classNames)?"remove":"add"](this,classNames);},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).r.length){jQuery("*",this).add(this).each(function(){jQuery.event.remove(this);jQuery.removeData(this);});if(this.parentNode)this.parentNode.removeChild(this);}},empty:function(){jQuery(">*",this).remove();while(this.firstChild)this.removeChild(this.firstChild);}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body["client"+name]||jQuery.browser.safari&&window["inner"+name]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(Math.max(document.body["scroll"+name],document.documentElement["scroll"+name]),Math.max(document.body["offset"+name],document.documentElement["offset"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+"px");};});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);},"#":function(a,i,m){return a.getAttribute("id")==m[2];},":":{lt:function(a,i,m){return i<m[3]-0;},gt:function(a,i,m){return i>m[3]-0;},nth:function(a,i,m){return m[3]-0==i;},eq:function(a,i,m){return m[3]-0==i;},first:function(a,i){return i==0;},last:function(a,i,m,r){return i==r.length-1;},even:function(a,i){return i%2==0;},odd:function(a,i){return i%2;},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a;},"last-child":function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;},"only-child":function(a){return!jQuery.nth(a.parentNode.lastChild,2,"previousSibling");},parent:function(a){return a.firstChild;},empty:function(a){return!a.firstChild;},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;},visible:function(a){return"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";},hidden:function(a){return"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";},enabled:function(a){return!a.disabled;},disabled:function(a){return a.disabled;},checked:function(a){return a.checked;},selected:function(a){return a.selected||jQuery.attr(a,"selected");},text:function(a){return"text"==a.type;},radio:function(a){return"radio"==a.type;},checkbox:function(a){return"checkbox"==a.type;},file:function(a){return"file"==a.type;},password:function(a){return"password"==a.type;},submit:function(a){return"submit"==a.type;},image:function(a){return"image"==a.type;},reset:function(a){return"reset"==a.type;},button:function(a){return"button"==a.type||jQuery.nodeName(a,"button");},input:function(a){return/input|select|textarea|button/i.test(a.nodeName);},has:function(a,i,m){return jQuery.find(m[3],a).length;},header:function(a){return/h\d/i.test(a.nodeName);},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}return cur;},find:function(t,context){if(typeof t!="string")return[t];if(context&&context.nodeType!=1&&context.nodeType!=9)return[];context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false,re=quickChild,m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)for(var c=ret[i].firstChild;c;c=c.nextSibling)if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName))r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j<rl;j++){var n=m=="~"||m=="+"?ret[j].nextSibling:ret[j].firstChild;for(;n;n=n.nextSibling)if(n.nodeType==1){var id=jQuery.data(n);if(m=="~"&&merge[id])break;if(!nodeName||n.nodeName.toUpperCase()==nodeName){if(m=="~")merge[id]=true;r.push(n);}if(m=="+")break;}}ret=r;t=jQuery.trim(t.replace(re,""));foundToken=true;}}if(t&&!foundToken){if(!t.indexOf(",")){if(context==ret[0])ret.shift();done=jQuery.merge(done,ret);r=ret=[context];t=" "+t.substr(1,t.length);}else{var re2=quickID;var m=re2.exec(t);if(m){m=[0,m[2],m[3],m[1]];}else{re2=quickClass;m=re2.exec(t);}m[2]=m[2].replace(/\\/g,"");var elem=ret[ret.length-1];if(m[1]=="#"&&elem&&elem.getElementById&&!jQuery.isXMLDoc(elem)){var oid=elem.getElementById(m[2]);if((jQuery.browser.msie||jQuery.browser.opera)&&oid&&typeof oid.id=="string"&&oid.id!=m[2])oid=jQuery('[@id="'+m[2]+'"]',elem)[0];ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[];}else{for(var i=0;ret[i];i++){var tag=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];if(tag=="*"&&ret[i].nodeName.toLowerCase()=="object")tag="param";r=jQuery.merge(r,ret[i].getElementsByTagName(tag));}if(m[1]==".")r=jQuery.classFilter(r,m[2]);if(m[1]=="#"){var tmp=[];for(var i=0;r[i];i++)if(r[i].getAttribute("id")==m[2]){tmp=[r[i]];break;}r=tmp;}ret=r;}t=t.replace(re2,"");}}if(t){var val=jQuery.filter(t,r);ret=r=val.r;t=jQuery.trim(val.t);}}if(t)ret=[];if(ret&&context==ret[0])ret.shift();done=jQuery.merge(done,ret);return done;},classFilter:function(r,m,not){m=" "+m+" ";var tmp=[];for(var i=0;r[i];i++){var pass=(" "+r[i].className+" ").indexOf(m)>=0;if(!not&&pass||not&&!pass)tmp.push(r[i]);}return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}if(!m)break;if(m[1]==":"&&m[2]=="not")r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3]);else if(m[1]==".")r=jQuery.classFilter(r,m[2],not);else if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i<rl;i++){var a=r[i],z=a[jQuery.props[m[2]]||m[2]];if(z==null||/href|src|selected/.test(m[2]))z=jQuery.attr(a,m[2])||'';if((type==""&&!!z||type=="="&&z==m[5]||type=="!="&&z!=m[5]||type=="^="&&z&&!z.indexOf(m[5])||type=="$="&&z.substr(z.length-m[5].length)==m[5]||(type=="*="||type=="~=")&&z.indexOf(m[5])>=0)^not)tmp.push(a);}r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"0n+"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i<rl;i++){var node=r[i],parentNode=node.parentNode,id=jQuery.data(parentNode);if(!merge[id]){var c=1;for(var n=parentNode.firstChild;n;n=n.nextSibling)if(n.nodeType==1)n.nodeIndex=c++;merge[id]=true;}var add=false;if(first==0){if(node.nodeIndex==last)add=true;}else if((node.nodeIndex-last)%first==0&&(node.nodeIndex-last)/first>=0)add=true;if(add^not)tmp.push(node);}r=tmp;}else{var fn=jQuery.expr[m[1]];if(typeof fn=="object")fn=fn[m[2]];if(typeof fn=="string")fn=eval("false||function(a,i){return "+fn+";}");r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r);},not);}}return{r:r,t:t};},dir:function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)matched.push(cur);cur=cur[dir];}return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])if(cur.nodeType==1&&++num==result)break;return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem)r.push(n);}return r;}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8)return;if(jQuery.browser.msie&&elem.setInterval)elem=window;if(!handler.guid)handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=this.proxy(fn,function(){return fn.apply(this,arguments);});handler.data=data;}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){if(typeof jQuery!="undefined"&&!jQuery.event.triggered)return jQuery.event.handle.apply(arguments.callee.elem,arguments);});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener)elem.addEventListener(type,handle,false);else if(elem.attachEvent)elem.attachEvent("on"+type,handle);}}handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8)return;var events=jQuery.data(elem,"events"),ret,index;if(events){if(types==undefined||(typeof types=="string"&&types.charAt(0)=="."))for(var type in events)this.remove(elem,type+(types||""));else{if(types.type){handler=types.handler;types=types.type;}jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];if(events[type]){if(handler)delete events[type][handler.guid];else +for(handler in events[type])if(!parts[1]||events[type][handler].type==parts[1])delete events[type][handler];for(ret in events[type])break;if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===false){if(elem.removeEventListener)elem.removeEventListener(type,jQuery.data(elem,"handle"),false);else if(elem.detachEvent)elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}ret=null;delete events[type];}}});}for(ret in events)break;if(!ret){var handle=jQuery.data(elem,"handle");if(handle)handle.elem=null;jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data);if(type.indexOf("!")>=0){type=type.slice(0,-1);var exclusive=true;}if(!elem){if(this.global[type])jQuery("*").add([window,document]).trigger(type,data);}else{if(elem.nodeType==3||elem.nodeType==8)return undefined;var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(event){data.unshift({type:type,target:elem,preventDefault:function(){},stopPropagation:function(){},timeStamp:now()});data[0][expando]=true;}data[0].type=type;if(exclusive)data[0].exclusive=true;var handle=jQuery.data(elem,"handle");if(handle)val=handle.apply(elem,data);if((!fn||(jQuery.nodeName(elem,'a')&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false)val=false;if(event)data.shift();if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined)val=ret;}if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,'a')&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}this.triggered=false;}return val;},handle:function(event){var val,ret,namespace,all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);namespace=event.type.split(".");event.type=namespace[0];namespace=namespace[1];all=!namespace&&!event.exclusive;handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||handler.type==namespace){event.handler=handler;event.data=handler.data;ret=handler.apply(this,arguments);if(val!==false)val=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}}return val;},fix:function(event){if(event[expando]==true)return event;var originalEvent=event;event={originalEvent:originalEvent};var props="altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target timeStamp toElement type view wheelDelta which".split(" ");for(var i=props.length;i;i--)event[props[i]]=originalEvent[props[i]];event[expando]=true;event.preventDefault=function(){if(originalEvent.preventDefault)originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)originalEvent.stopPropagation();originalEvent.cancelBubble=true;};event.timeStamp=event.timeStamp||now();if(!event.target)event.target=event.srcElement||document;if(event.target.nodeType==3)event.target=event.target.parentNode;if(!event.relatedTarget&&event.fromElement)event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode))event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)event.metaKey=event.ctrlKey;if(!event.which&&event.button)event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;},proxy:function(fn,proxy){proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy;},special:{ready:{setup:function(){bindReady();return;},teardown:function(){return;}},mouseenter:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseenter";return jQuery.event.handle.apply(this,arguments);}},mouseleave:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseleave";return jQuery.event.handle.apply(this,arguments);}}}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments);});return this.each(function(){jQuery.event.add(this,type,one,fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){return this[0]&&jQuery.event.trigger(type,data,this[0],false,fn);},toggle:function(fn){var args=arguments,i=1;while(i<args.length)jQuery.event.proxy(fn,args[i++]);return this.click(jQuery.event.proxy(fn,function(event){this.lastToggle=(this.lastToggle||0)%i;event.preventDefault();return args[this.lastToggle++].apply(this,arguments)||false;}));},hover:function(fnOver,fnOut){return this.bind('mouseenter',fnOver).bind('mouseleave',fnOut);},ready:function(fn){bindReady();if(jQuery.isReady)fn.call(document,jQuery);else +jQuery.readyList.push(function(){return fn.call(this,jQuery);});return this;}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.call(document);});jQuery.readyList=null;}jQuery(document).triggerHandler("ready");}}});var readyBound=false;function bindReady(){if(readyBound)return;readyBound=true;if(document.addEventListener&&!jQuery.browser.opera)document.addEventListener("DOMContentLoaded",jQuery.ready,false);if(jQuery.browser.msie&&window==top)(function(){if(jQuery.isReady)return;try{document.documentElement.doScroll("left");}catch(error){setTimeout(arguments.callee,0);return;}jQuery.ready();})();if(jQuery.browser.opera)document.addEventListener("DOMContentLoaded",function(){if(jQuery.isReady)return;for(var i=0;i<document.styleSheets.length;i++)if(document.styleSheets[i].disabled){setTimeout(arguments.callee,0);return;}jQuery.ready();},false);if(jQuery.browser.safari){var numStyles;(function(){if(jQuery.isReady)return;if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);return;}if(numStyles===undefined)numStyles=jQuery("style, link[rel=stylesheet]").length;if(document.styleSheets.length!=numStyles){setTimeout(arguments.callee,0);return;}jQuery.ready();})();}jQuery.event.add(window,"load",jQuery.ready);}jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,change,select,"+"submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name);};});var withinElement=function(event,elem){var parent=event.relatedTarget;while(parent&&parent!=elem)try{parent=parent.parentNode;}catch(error){parent=elem;}return parent==elem;};jQuery(window).bind("unload",function(){jQuery("*").add(document).unbind();});jQuery.fn.extend({_load:jQuery.fn.load,load:function(url,params,callback){if(typeof url!='string')return this._load(url);var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}callback=callback||function(){};var type="GET";if(params)if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified")self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText);self.each(callback,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{url:location.href,global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null,username:null,password:null,accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!="string")s.data=jQuery.param(s.data);if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre))s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}else if(!s.data||!s.data.match(jsre))s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";s.dataType="json";}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data)s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}if(head)head.removeChild(script);};}if(s.dataType=="script"&&s.cache==null)s.cache=false;if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"");}if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}if(s.global&&!jQuery.active++)jQuery.event.trigger("ajaxStart");var remote=/^(?:\w+:)?\/\/([^\/?#]+)/;if(s.dataType=="script"&&type=="GET"&&remote.test(s.url)&&remote.exec(s.url)[1]!=location.host){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset)script.charset=s.scriptCharset;if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script);}};}head.appendChild(script);return undefined;}var requestDone=false;var xhr=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();if(s.username)xhr.open(type,s.url,s.async,s.username,s.password);else +xhr.open(type,s.url,s.async);try{if(s.data)xhr.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){}if(s.beforeSend&&s.beforeSend(xhr,s)===false){s.global&&jQuery.active--;xhr.abort();return false;}if(s.global)jQuery.event.trigger("ajaxSend",[xhr,s]);var onreadystatechange=function(isTimeout){if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xhr)&&"error"||s.ifModified&&jQuery.httpNotModified(xhr,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s.dataFilter);}catch(e){status="parsererror";}}if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified");}catch(e){}if(s.ifModified&&modRes)jQuery.lastModified[s.url]=modRes;if(!jsonp)success();}else +jQuery.handleError(s,xhr,status);complete();if(s.async)xhr=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)setTimeout(function(){if(xhr){xhr.abort();if(!requestDone)onreadystatechange("timeout");}},s.timeout);}try{xhr.send(s.data);}catch(e){jQuery.handleError(s,xhr,null,e);}if(!s.async)onreadystatechange();function success(){if(s.success)s.success(data,status);if(s.global)jQuery.event.trigger("ajaxSuccess",[xhr,s]);}function complete(){if(s.complete)s.complete(xhr,status);if(s.global)jQuery.event.trigger("ajaxComplete",[xhr,s]);if(s.global&&!--jQuery.active)jQuery.event.trigger("ajaxStop");}return xhr;},handleError:function(s,xhr,status,e){if(s.error)s.error(xhr,status,e);if(s.global)jQuery.event.trigger("ajaxError",[xhr,s,e]);},active:0,httpSuccess:function(xhr){try{return!xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url]||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpData:function(xhr,type,filter){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror")throw"parsererror";if(filter)data=filter(data,type);if(type=="script")jQuery.globalEval(data);if(type=="json")data=eval("("+data+")");return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else +for(var j in a)if(a[j]&&a[j].constructor==Array)jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else +s.push(encodeURIComponent(j)+"="+encodeURIComponent(jQuery.isFunction(a[j])?a[j]():a[j]));return s.join("&").replace(/%20/g,"+");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock||"";if(jQuery.css(this,"display")=="none"){var elem=jQuery("<"+this.tagName+" />").appendTo("body");this.style.display=elem.css("display");if(this.style.display=="none")this.style.display="block";elem.remove();}}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){if(this.nodeType!=1)return false;var opt=jQuery.extend({},optall),p,hidden=jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)return opt.complete.call(this);if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}if(opt.overflow!=null)this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}if(parts[1])end=((parts[1]=="-="?-1:1)*end)+start;e.custom(start,end,unit);}else +e.custom(start,val,"");}});return true;});},queue:function(type,fn){if(jQuery.isFunction(type)||(type&&type.constructor==Array)){fn=type;type="fx";}if(!type||(typeof type=="string"&&!fn))return queue(this[0],type);return this.each(function(){if(fn.constructor==Array)queue(this,type,fn);else{queue(this,type).push(fn);if(queue(this,type).length==1)fn.call(this);}});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue)this.queue([]);this.each(function(){for(var i=timers.length-1;i>=0;i--)if(timers[i].elem==this){if(gotoEnd)timers[i](true);timers.splice(i,1);}});if(!gotoEnd)this.dequeue();return this;}});var queue=function(elem,type,array){if(elem){type=type||"fx";var q=jQuery.data(elem,type+"queue");if(!q||array)q=jQuery.data(elem,type+"queue",jQuery.makeArray(array));}return q;};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length)q[0].call(this);});};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:jQuery.fx.speeds[opt.duration])||jQuery.fx.speeds.def;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false)jQuery(this).dequeue();if(jQuery.isFunction(opt.old))opt.old.call(this);};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],timerId:null,fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)options.orig={};}});jQuery.fx.prototype={update:function(){if(this.options.step)this.options.step.call(this.elem,this.now,this);(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop=="height"||this.prop=="width")this.elem.style.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null)return this.elem[this.prop];var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(gotoEnd){return self.step(gotoEnd);}t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timerId==null){jQuery.timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++)if(!timers[i]())timers.splice(i--,1);if(!timers.length){clearInterval(jQuery.timerId);jQuery.timerId=null;}},13);}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(0,this.cur());if(this.prop=="width"||this.prop=="height")this.elem.style[this.prop]="1px";jQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(gotoEnd){var t=now();if(gotoEnd||t>this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)if(this.options.curAnim[i]!==true)done=false;if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none")this.elem.style.display="block";}if(this.options.hide)this.elem.style.display="none";if(this.options.hide||this.options.show)for(var p in this.options.curAnim)jQuery.attr(this.elem.style,p,this.options.orig[p]);}if(done)this.options.complete.call(this.elem);return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}return true;}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,def:400},step:{scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;},scrollTop:function(fx){fx.elem.scrollTop=fx.now;},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit;}}});jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem)with(jQuery.browser){var parent=elem.parentNode,offsetChild=elem,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522&&!/adobeair/i.test(userAgent),css=jQuery.curCSS,fixed=css(elem,"position")=="fixed";if(elem.getBoundingClientRect){var box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));add(-doc.documentElement.clientLeft,-doc.documentElement.clientTop);}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(offsetParent.tagName)||safari&&!safari2)border(offsetParent);if(!fixed&&css(offsetParent,"position")=="fixed")fixed=true;offsetChild=/^body$/i.test(offsetParent.tagName)?offsetChild:offsetParent;offsetParent=offsetParent.offsetParent;}while(parent&&parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table.*$/i.test(css(parent,"display")))add(-parent.scrollLeft,-parent.scrollTop);if(mozilla&&css(parent,"overflow")!="visible")border(parent);parent=parent.parentNode;}if((safari2&&(fixed||css(offsetChild,"position")=="absolute"))||(mozilla&&css(offsetChild,"position")!="absolute"))add(-doc.body.offsetLeft,-doc.body.offsetTop);if(fixed)add(Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));}results={top:top,left:left};}function border(elem){add(jQuery.curCSS(elem,"borderLeftWidth",true),jQuery.curCSS(elem,"borderTopWidth",true));}function add(l,t){left+=parseInt(l,10)||0;top+=parseInt(t,10)||0;}return results;};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,'marginTop');offset.left-=num(this,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}return results;},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,'position')=='static'))offsetParent=offsetParent.offsetParent;return jQuery(offsetParent);}});jQuery.each(['Left','Top'],function(i,name){var method='scroll'+name;jQuery.fn[method]=function(val){if(!this[0])return;return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val;}):this[0]==window||this[0]==document?self[i?'pageYOffset':'pageXOffset']||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method];};});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom";jQuery.fn["inner"+name]=function(){return this[name.toLowerCase()]()+num(this,"padding"+tl)+num(this,"padding"+br);};jQuery.fn["outer"+name]=function(margin){return this["inner"+name]()+num(this,"border"+tl+"Width")+num(this,"border"+br+"Width")+(margin?num(this,"margin"+tl)+num(this,"margin"+br):0);};});})();
\ No newline at end of file diff --git a/doc/doc_index/0.2/_static/minus.png b/doc/doc_index/0.2/_static/minus.png Binary files differnew file mode 100644 index 00000000..da1c5620 --- /dev/null +++ b/doc/doc_index/0.2/_static/minus.png diff --git a/doc/doc_index/0.2/_static/plus.png b/doc/doc_index/0.2/_static/plus.png Binary files differnew file mode 100644 index 00000000..b3cb3742 --- /dev/null +++ b/doc/doc_index/0.2/_static/plus.png diff --git a/doc/doc_index/0.2/_static/pygments.css b/doc/doc_index/0.2/_static/pygments.css new file mode 100644 index 00000000..1f2d2b61 --- /dev/null +++ b/doc/doc_index/0.2/_static/pygments.css @@ -0,0 +1,61 @@ +.hll { background-color: #ffffcc } +.c { color: #408090; font-style: italic } /* Comment */ +.err { border: 1px solid #FF0000 } /* Error */ +.k { color: #007020; font-weight: bold } /* Keyword */ +.o { color: #666666 } /* Operator */ +.cm { color: #408090; font-style: italic } /* Comment.Multiline */ +.cp { color: #007020 } /* Comment.Preproc */ +.c1 { color: #408090; font-style: italic } /* Comment.Single */ +.cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ +.gd { color: #A00000 } /* Generic.Deleted */ +.ge { font-style: italic } /* Generic.Emph */ +.gr { color: #FF0000 } /* Generic.Error */ +.gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.gi { color: #00A000 } /* Generic.Inserted */ +.go { color: #303030 } /* Generic.Output */ +.gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.gs { font-weight: bold } /* Generic.Strong */ +.gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.gt { color: #0040D0 } /* Generic.Traceback */ +.kc { color: #007020; font-weight: bold } /* Keyword.Constant */ +.kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ +.kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ +.kp { color: #007020 } /* Keyword.Pseudo */ +.kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ +.kt { color: #902000 } /* Keyword.Type */ +.m { color: #208050 } /* Literal.Number */ +.s { color: #4070a0 } /* Literal.String */ +.na { color: #4070a0 } /* Name.Attribute */ +.nb { color: #007020 } /* Name.Builtin */ +.nc { color: #0e84b5; font-weight: bold } /* Name.Class */ +.no { color: #60add5 } /* Name.Constant */ +.nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.ni { color: #d55537; font-weight: bold } /* Name.Entity */ +.ne { color: #007020 } /* Name.Exception */ +.nf { color: #06287e } /* Name.Function */ +.nl { color: #002070; font-weight: bold } /* Name.Label */ +.nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.nt { color: #062873; font-weight: bold } /* Name.Tag */ +.nv { color: #bb60d5 } /* Name.Variable */ +.ow { color: #007020; font-weight: bold } /* Operator.Word */ +.w { color: #bbbbbb } /* Text.Whitespace */ +.mf { color: #208050 } /* Literal.Number.Float */ +.mh { color: #208050 } /* Literal.Number.Hex */ +.mi { color: #208050 } /* Literal.Number.Integer */ +.mo { color: #208050 } /* Literal.Number.Oct */ +.sb { color: #4070a0 } /* Literal.String.Backtick */ +.sc { color: #4070a0 } /* Literal.String.Char */ +.sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ +.s2 { color: #4070a0 } /* Literal.String.Double */ +.se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ +.sh { color: #4070a0 } /* Literal.String.Heredoc */ +.si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ +.sx { color: #c65d09 } /* Literal.String.Other */ +.sr { color: #235388 } /* Literal.String.Regex */ +.s1 { color: #4070a0 } /* Literal.String.Single */ +.ss { color: #517918 } /* Literal.String.Symbol */ +.bp { color: #007020 } /* Name.Builtin.Pseudo */ +.vc { color: #bb60d5 } /* Name.Variable.Class */ +.vg { color: #bb60d5 } /* Name.Variable.Global */ +.vi { color: #bb60d5 } /* Name.Variable.Instance */ +.il { color: #208050 } /* Literal.Number.Integer.Long */
\ No newline at end of file diff --git a/doc/doc_index/0.2/_static/searchtools.js b/doc/doc_index/0.2/_static/searchtools.js new file mode 100644 index 00000000..e0226258 --- /dev/null +++ b/doc/doc_index/0.2/_static/searchtools.js @@ -0,0 +1,467 @@ +/** + * helper function to return a node containing the + * search summary for a given text. keywords is a list + * of stemmed words, hlwords is the list of normal, unstemmed + * words. the first one is used to find the occurance, the + * latter for highlighting it. + */ + +jQuery.makeSearchSummary = function(text, keywords, hlwords) { + var textLower = text.toLowerCase(); + var start = 0; + $.each(keywords, function() { + var i = textLower.indexOf(this.toLowerCase()); + if (i > -1) + start = i; + }); + start = Math.max(start - 120, 0); + var excerpt = ((start > 0) ? '...' : '') + + $.trim(text.substr(start, 240)) + + ((start + 240 - text.length) ? '...' : ''); + var rv = $('<div class="context"></div>').text(excerpt); + $.each(hlwords, function() { + rv = rv.highlightText(this, 'highlight'); + }); + return rv; +} + +/** + * Porter Stemmer + */ +var PorterStemmer = function() { + + var step2list = { + ational: 'ate', + tional: 'tion', + enci: 'ence', + anci: 'ance', + izer: 'ize', + bli: 'ble', + alli: 'al', + entli: 'ent', + eli: 'e', + ousli: 'ous', + ization: 'ize', + ation: 'ate', + ator: 'ate', + alism: 'al', + iveness: 'ive', + fulness: 'ful', + ousness: 'ous', + aliti: 'al', + iviti: 'ive', + biliti: 'ble', + logi: 'log' + }; + + var step3list = { + icate: 'ic', + ative: '', + alize: 'al', + iciti: 'ic', + ical: 'ic', + ful: '', + ness: '' + }; + + var c = "[^aeiou]"; // consonant + var v = "[aeiouy]"; // vowel + var C = c + "[^aeiouy]*"; // consonant sequence + var V = v + "[aeiou]*"; // vowel sequence + + var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0 + var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 + var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 + var s_v = "^(" + C + ")?" + v; // vowel in stem + + this.stemWord = function (w) { + var stem; + var suffix; + var firstch; + var origword = w; + + if (w.length < 3) + return w; + + var re; + var re2; + var re3; + var re4; + + firstch = w.substr(0,1); + if (firstch == "y") + w = firstch.toUpperCase() + w.substr(1); + + // Step 1a + re = /^(.+?)(ss|i)es$/; + re2 = /^(.+?)([^s])s$/; + + if (re.test(w)) + w = w.replace(re,"$1$2"); + else if (re2.test(w)) + w = w.replace(re2,"$1$2"); + + // Step 1b + re = /^(.+?)eed$/; + re2 = /^(.+?)(ed|ing)$/; + if (re.test(w)) { + var fp = re.exec(w); + re = new RegExp(mgr0); + if (re.test(fp[1])) { + re = /.$/; + w = w.replace(re,""); + } + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1]; + re2 = new RegExp(s_v); + if (re2.test(stem)) { + w = stem; + re2 = /(at|bl|iz)$/; + re3 = new RegExp("([^aeiouylsz])\\1$"); + re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re2.test(w)) + w = w + "e"; + else if (re3.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + else if (re4.test(w)) + w = w + "e"; + } + } + + // Step 1c + re = /^(.+?)y$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(s_v); + if (re.test(stem)) + w = stem + "i"; + } + + // Step 2 + re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step2list[suffix]; + } + + // Step 3 + re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step3list[suffix]; + } + + // Step 4 + re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; + re2 = /^(.+?)(s|t)(ion)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + if (re.test(stem)) + w = stem; + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1] + fp[2]; + re2 = new RegExp(mgr1); + if (re2.test(stem)) + w = stem; + } + + // Step 5 + re = /^(.+?)e$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + re2 = new RegExp(meq1); + re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) + w = stem; + } + re = /ll$/; + re2 = new RegExp(mgr1); + if (re.test(w) && re2.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + + // and turn initial Y back to y + if (firstch == "y") + w = firstch.toLowerCase() + w.substr(1); + return w; + } +} + + +/** + * Search Module + */ +var Search = { + + _index : null, + _queued_query : null, + _pulse_status : -1, + + init : function() { + var params = $.getQueryParameters(); + if (params.q) { + var query = params.q[0]; + $('input[name="q"]')[0].value = query; + this.performSearch(query); + } + }, + + /** + * Sets the index + */ + setIndex : function(index) { + var q; + this._index = index; + if ((q = this._queued_query) !== null) { + this._queued_query = null; + Search.query(q); + } + }, + + hasIndex : function() { + return this._index !== null; + }, + + deferQuery : function(query) { + this._queued_query = query; + }, + + stopPulse : function() { + this._pulse_status = 0; + }, + + startPulse : function() { + if (this._pulse_status >= 0) + return; + function pulse() { + Search._pulse_status = (Search._pulse_status + 1) % 4; + var dotString = ''; + for (var i = 0; i < Search._pulse_status; i++) + dotString += '.'; + Search.dots.text(dotString); + if (Search._pulse_status > -1) + window.setTimeout(pulse, 500); + }; + pulse(); + }, + + /** + * perform a search for something + */ + performSearch : function(query) { + // create the required interface elements + this.out = $('#search-results'); + this.title = $('<h2>' + _('Searching') + '</h2>').appendTo(this.out); + this.dots = $('<span></span>').appendTo(this.title); + this.status = $('<p style="display: none"></p>').appendTo(this.out); + this.output = $('<ul class="search"/>').appendTo(this.out); + + $('#search-progress').text(_('Preparing search...')); + this.startPulse(); + + // index already loaded, the browser was quick! + if (this.hasIndex()) + this.query(query); + else + this.deferQuery(query); + }, + + query : function(query) { + // stem the searchterms and add them to the + // correct list + var stemmer = new PorterStemmer(); + var searchterms = []; + var excluded = []; + var hlterms = []; + var tmp = query.split(/\s+/); + var object = (tmp.length == 1) ? tmp[0].toLowerCase() : null; + for (var i = 0; i < tmp.length; i++) { + // stem the word + var word = stemmer.stemWord(tmp[i]).toLowerCase(); + // select the correct list + if (word[0] == '-') { + var toAppend = excluded; + word = word.substr(1); + } + else { + var toAppend = searchterms; + hlterms.push(tmp[i].toLowerCase()); + } + // only add if not already in the list + if (!$.contains(toAppend, word)) + toAppend.push(word); + }; + var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" ")); + + console.debug('SEARCH: searching for:'); + console.info('required: ', searchterms); + console.info('excluded: ', excluded); + + // prepare search + var filenames = this._index.filenames; + var titles = this._index.titles; + var terms = this._index.terms; + var descrefs = this._index.descrefs; + var modules = this._index.modules; + var desctypes = this._index.desctypes; + var fileMap = {}; + var files = null; + var objectResults = []; + var regularResults = []; + $('#search-progress').empty(); + + // lookup as object + if (object != null) { + for (var module in modules) { + if (module.indexOf(object) > -1) { + fn = modules[module]; + descr = _('module, in ') + titles[fn]; + objectResults.push([filenames[fn], module, '#module-'+module, descr]); + } + } + for (var prefix in descrefs) { + for (var name in descrefs[prefix]) { + var fullname = (prefix ? prefix + '.' : '') + name; + if (fullname.toLowerCase().indexOf(object) > -1) { + match = descrefs[prefix][name]; + descr = desctypes[match[1]] + _(', in ') + titles[match[0]]; + objectResults.push([filenames[match[0]], fullname, '#'+fullname, descr]); + } + } + } + } + + // sort results descending + objectResults.sort(function(a, b) { + return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0); + }); + + + // perform the search on the required terms + for (var i = 0; i < searchterms.length; i++) { + var word = searchterms[i]; + // no match but word was a required one + if ((files = terms[word]) == null) + break; + if (files.length == undefined) { + files = [files]; + } + // create the mapping + for (var j = 0; j < files.length; j++) { + var file = files[j]; + if (file in fileMap) + fileMap[file].push(word); + else + fileMap[file] = [word]; + } + } + + // now check if the files don't contain excluded terms + for (var file in fileMap) { + var valid = true; + + // check if all requirements are matched + if (fileMap[file].length != searchterms.length) + continue; + + // ensure that none of the excluded terms is in the + // search result. + for (var i = 0; i < excluded.length; i++) { + if (terms[excluded[i]] == file || + $.contains(terms[excluded[i]] || [], file)) { + valid = false; + break; + } + } + + // if we have still a valid result we can add it + // to the result list + if (valid) + regularResults.push([filenames[file], titles[file], '', null]); + } + + // delete unused variables in order to not waste + // memory until list is retrieved completely + delete filenames, titles, terms; + + // now sort the regular results descending by title + regularResults.sort(function(a, b) { + var left = a[1].toLowerCase(); + var right = b[1].toLowerCase(); + return (left > right) ? -1 : ((left < right) ? 1 : 0); + }); + + // combine both + var results = regularResults.concat(objectResults); + + // print the results + var resultCount = results.length; + function displayNextItem() { + // results left, load the summary and display it + if (results.length) { + var item = results.pop(); + var listItem = $('<li style="display:none"></li>'); + listItem.append($('<a/>').attr( + 'href', + item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX + + highlightstring + item[2]).html(item[1])); + if (item[3]) { + listItem.append($('<span> (' + item[3] + ')</span>')); + Search.output.append(listItem); + listItem.slideDown(5, function() { + displayNextItem(); + }); + } else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) { + $.get('_sources/' + item[0] + '.txt', function(data) { + listItem.append($.makeSearchSummary(data, searchterms, hlterms)); + Search.output.append(listItem); + listItem.slideDown(5, function() { + displayNextItem(); + }); + }); + } else { + // no source available, just display title + Search.output.append(listItem); + listItem.slideDown(5, function() { + displayNextItem(); + }); + } + } + // search finished, update title and status message + else { + Search.stopPulse(); + Search.title.text(_('Search Results')); + if (!resultCount) + Search.status.text(_('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.')); + else + Search.status.text(_('Search finished, found %s page(s) matching the search query.').replace('%s', resultCount)); + Search.status.fadeIn(500); + } + } + displayNextItem(); + } +} + +$(document).ready(function() { + Search.init(); +}); diff --git a/doc/doc_index/0.2/genindex.html b/doc/doc_index/0.2/genindex.html new file mode 100644 index 00000000..866800c3 --- /dev/null +++ b/doc/doc_index/0.2/genindex.html @@ -0,0 +1,89 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>Index — GitPython v0.2.0 Beta documentation</title> + <link rel="stylesheet" href="_static/default.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '#', + VERSION: '0.2.0 Beta', + COLLAPSE_MODINDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <link rel="top" title="GitPython v0.2.0 Beta documentation" href="index.html" /> + </head> + <body> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="#" title="General Index" + accesskey="I">index</a></li> + <li><a href="index.html">GitPython v0.2.0 Beta documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + + <h1 id="index">Index</h1> + + + + <hr /> + + + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + + + + <div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> + </div> + <script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="#" title="General Index" + >index</a></li> + <li><a href="index.html">GitPython v0.2.0 Beta documentation</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright Copyright (C) 2008, 2009 Michael Trier and contributors. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.5. + </div> + </body> +</html>
\ No newline at end of file diff --git a/doc/doc_index/0.2/index.html b/doc/doc_index/0.2/index.html new file mode 100644 index 00000000..957b026d --- /dev/null +++ b/doc/doc_index/0.2/index.html @@ -0,0 +1,161 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>GitPython Documentation — GitPython v0.2.0 Beta documentation</title> + <link rel="stylesheet" href="_static/default.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '#', + VERSION: '0.2.0 Beta', + COLLAPSE_MODINDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <link rel="top" title="GitPython v0.2.0 Beta documentation" href="#" /> + <link rel="next" title="Overview / Install" href="intro.html" /> + </head> + <body> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="intro.html" title="Overview / Install" + accesskey="N">next</a> |</li> + <li><a href="#">GitPython v0.2.0 Beta documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="gitpython-documentation"> +<h1>GitPython Documentation<a class="headerlink" href="#gitpython-documentation" title="Permalink to this headline">¶</a></h1> +<ul> +<li class="toctree-l1"><a class="reference external" href="intro.html">Overview / Install</a><ul> +<li class="toctree-l2"><a class="reference external" href="intro.html#requirements">Requirements</a></li> +<li class="toctree-l2"><a class="reference external" href="intro.html#installing-gitpython">Installing GitPython</a></li> +<li class="toctree-l2"><a class="reference external" href="intro.html#getting-started">Getting Started</a></li> +<li class="toctree-l2"><a class="reference external" href="intro.html#api-reference">API Reference</a></li> +<li class="toctree-l2"><a class="reference external" href="intro.html#source-code">Source Code</a></li> +<li class="toctree-l2"><a class="reference external" href="intro.html#mailing-list">Mailing List</a></li> +<li class="toctree-l2"><a class="reference external" href="intro.html#issue-tracker">Issue Tracker</a></li> +<li class="toctree-l2"><a class="reference external" href="intro.html#license-information">License Information</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference external" href="tutorial.html">GitPython Tutorial</a><ul> +<li class="toctree-l2"><a class="reference external" href="tutorial.html#initialize-a-repo-object">Initialize a Repo object</a></li> +<li class="toctree-l2"><a class="reference external" href="tutorial.html#examining-references">Examining References</a></li> +<li class="toctree-l2"><a class="reference external" href="tutorial.html#modifying-references">Modifying References</a></li> +<li class="toctree-l2"><a class="reference external" href="tutorial.html#understanding-objects">Understanding Objects</a></li> +<li class="toctree-l2"><a class="reference external" href="tutorial.html#the-commit-object">The Commit object</a></li> +<li class="toctree-l2"><a class="reference external" href="tutorial.html#the-tree-object">The Tree object</a></li> +<li class="toctree-l2"><a class="reference external" href="tutorial.html#the-index-object">The Index Object</a></li> +<li class="toctree-l2"><a class="reference external" href="tutorial.html#handling-remotes">Handling Remotes</a></li> +<li class="toctree-l2"><a class="reference external" href="tutorial.html#obtaining-diff-information">Obtaining Diff Information</a></li> +<li class="toctree-l2"><a class="reference external" href="tutorial.html#switching-branches">Switching Branches</a></li> +<li class="toctree-l2"><a class="reference external" href="tutorial.html#using-git-directly">Using git directly</a></li> +<li class="toctree-l2"><a class="reference external" href="tutorial.html#and-even-more">And even more ...</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference external" href="reference.html">API Reference</a><ul> +<li class="toctree-l2"><a class="reference external" href="reference.html#actor">Actor</a></li> +<li class="toctree-l2"><a class="reference external" href="reference.html#objects-base">Objects.Base</a></li> +<li class="toctree-l2"><a class="reference external" href="reference.html#objects-blob">Objects.Blob</a></li> +<li class="toctree-l2"><a class="reference external" href="reference.html#objects-commit">Objects.Commit</a></li> +<li class="toctree-l2"><a class="reference external" href="reference.html#objects-tag">Objects.Tag</a></li> +<li class="toctree-l2"><a class="reference external" href="reference.html#objects-tree">Objects.Tree</a></li> +<li class="toctree-l2"><a class="reference external" href="reference.html#objects-utils">Objects.Utils</a></li> +<li class="toctree-l2"><a class="reference external" href="reference.html#gitcmd">GitCmd</a></li> +<li class="toctree-l2"><a class="reference external" href="reference.html#config">Config</a></li> +<li class="toctree-l2"><a class="reference external" href="reference.html#diff">Diff</a></li> +<li class="toctree-l2"><a class="reference external" href="reference.html#errors">Errors</a></li> +<li class="toctree-l2"><a class="reference external" href="reference.html#index">Index</a></li> +<li class="toctree-l2"><a class="reference external" href="reference.html#refs">Refs</a></li> +<li class="toctree-l2"><a class="reference external" href="reference.html#remote">Remote</a></li> +<li class="toctree-l2"><a class="reference external" href="reference.html#repo">Repo</a></li> +<li class="toctree-l2"><a class="reference external" href="reference.html#stats">Stats</a></li> +<li class="toctree-l2"><a class="reference external" href="reference.html#utils">Utils</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference external" href="roadmap.html">Roadmap</a></li> +</ul> +</div> +<div class="section" id="indices-and-tables"> +<h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline">¶</a></h1> +<ul class="simple"> +<li><a class="reference external" href="genindex.html"><em>Index</em></a></li> +<li><a class="reference external" href="modindex.html"><em>Module Index</em></a></li> +<li><a class="reference external" href="search.html"><em>Search Page</em></a></li> +</ul> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="#">Table Of Contents</a></h3> + <ul> +<li><a class="reference external" href="#">GitPython Documentation</a><ul> +</ul> +</li> +<li><a class="reference external" href="#indices-and-tables">Indices and tables</a></li> +</ul> + + <h4>Next topic</h4> + <p class="topless"><a href="intro.html" + title="next chapter">Overview / Install</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="_sources/index.txt" + rel="nofollow">Show Source</a></li> + </ul> + <div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> + </div> + <script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="intro.html" title="Overview / Install" + >next</a> |</li> + <li><a href="#">GitPython v0.2.0 Beta documentation</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright Copyright (C) 2008, 2009 Michael Trier and contributors. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.5. + </div> + </body> +</html>
\ No newline at end of file diff --git a/doc/doc_index/0.2/intro.html b/doc/doc_index/0.2/intro.html new file mode 100644 index 00000000..2cb9d6dd --- /dev/null +++ b/doc/doc_index/0.2/intro.html @@ -0,0 +1,196 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>Overview / Install — GitPython v0.2.0 Beta documentation</title> + <link rel="stylesheet" href="_static/default.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '#', + VERSION: '0.2.0 Beta', + COLLAPSE_MODINDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <link rel="top" title="GitPython v0.2.0 Beta documentation" href="index.html" /> + <link rel="next" title="GitPython Tutorial" href="tutorial.html" /> + <link rel="prev" title="GitPython Documentation" href="index.html" /> + </head> + <body> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="tutorial.html" title="GitPython Tutorial" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="index.html" title="GitPython Documentation" + accesskey="P">previous</a> |</li> + <li><a href="index.html">GitPython v0.2.0 Beta documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="overview-install"> +<span id="intro-toplevel"></span><h1>Overview / Install<a class="headerlink" href="#overview-install" title="Permalink to this headline">¶</a></h1> +<p>GitPython is a python library used to interact with Git repositories.</p> +<p>GitPython was a port of the <a class="reference external" href="http://grit.rubyforge.org">grit</a> library in Ruby created by +Tom Preston-Werner and Chris Wanstrath, but grew beyond its heritage through its improved design and performance.</p> +<div class="section" id="requirements"> +<h2>Requirements<a class="headerlink" href="#requirements" title="Permalink to this headline">¶</a></h2> +<ul class="simple"> +<li><a class="reference external" href="http://git-scm.com/">Git</a> tested with 1.5.3.7</li> +<li>Requires <a class="reference external" href="http://git-scm.com/">Git</a> 1.6.5.4 or newer if index.add function is to be used</li> +<li><a class="reference external" href="http://code.google.com/p/python-nose/">Python Nose</a> - used for running the tests</li> +<li><a class="reference external" href="http://www.voidspace.org.uk/python/mock.html">Mock by Michael Foord</a> used for tests. Requires 0.5</li> +</ul> +</div> +<div class="section" id="installing-gitpython"> +<h2>Installing GitPython<a class="headerlink" href="#installing-gitpython" title="Permalink to this headline">¶</a></h2> +<p>Installing GitPython is easily done using +<a class="reference external" href="http://peak.telecommunity.com/DevCenter/setuptools">setuptools</a>. Assuming it is +installed, just run the following from the command-line:</p> +<div class="highlight-none"><div class="highlight"><pre># easy_install GitPython +</pre></div> +</div> +<p>This command will download the latest version of GitPython from the +<a class="reference external" href="http://pypi.python.org/pypi/GitPython">Python Package Index</a> and install it +to your system. More information about <tt class="docutils literal"><span class="pre">easy_install</span></tt> and pypi can be found +here:</p> +<ul class="simple"> +<li><a class="reference external" href="http://peak.telecommunity.com/DevCenter/setuptools">setuptools</a></li> +<li><a class="reference external" href="http://peak.telecommunity.com/DevCenter/EasyInstall#installation-instructions">install setuptools</a></li> +<li><a class="reference external" href="http://pypi.python.org/pypi/SQLAlchemy">pypi</a></li> +</ul> +<p>Alternatively, you can install from the distribution using the <tt class="docutils literal"><span class="pre">setup.py</span></tt> +script:</p> +<div class="highlight-none"><div class="highlight"><pre># python setup.py install +</pre></div> +</div> +</div> +<div class="section" id="getting-started"> +<h2>Getting Started<a class="headerlink" href="#getting-started" title="Permalink to this headline">¶</a></h2> +<ul class="simple"> +<li><a class="reference external" href="tutorial.html#tutorial-label"><em>GitPython Tutorial</em></a> - This tutorial provides a walk-through of some of +the basic functionality and concepts used in GitPython. It, however, is not +exhaustive so you are encouraged to spend some time in the +<a class="reference external" href="reference.html#api-reference-toplevel"><em>API Reference</em></a>.</li> +</ul> +</div> +<div class="section" id="api-reference"> +<h2>API Reference<a class="headerlink" href="#api-reference" title="Permalink to this headline">¶</a></h2> +<p>An organized section of the GitPthon API is at <a class="reference external" href="reference.html#api-reference-toplevel"><em>API Reference</em></a>.</p> +</div> +<div class="section" id="source-code"> +<h2>Source Code<a class="headerlink" href="#source-code" title="Permalink to this headline">¶</a></h2> +<p>GitPython’s git repo is available on Gitorious and GitHub, which can be browsed at:</p> +<blockquote> +<ul class="simple"> +<li><a class="reference external" href="http://gitorious.org/projects/git-python/">http://gitorious.org/projects/git-python/</a></li> +<li><a class="reference external" href="http://github.com/Byron/GitPython">http://github.com/Byron/GitPython</a></li> +</ul> +</blockquote> +<p>and cloned using:</p> +<div class="highlight-python"><pre>$ git clone git://gitorious.org/git-python/mainline.git git-python +$ git clone git://github.com/Byron/GitPython.git git-python</pre> +</div> +</div> +<div class="section" id="mailing-list"> +<h2>Mailing List<a class="headerlink" href="#mailing-list" title="Permalink to this headline">¶</a></h2> +<p><a class="reference external" href="http://groups.google.com/group/git-python">http://groups.google.com/group/git-python</a></p> +</div> +<div class="section" id="issue-tracker"> +<h2>Issue Tracker<a class="headerlink" href="#issue-tracker" title="Permalink to this headline">¶</a></h2> +<p><a class="reference external" href="http://byronimo.lighthouseapp.com/projects/51787-gitpython/milestones">http://byronimo.lighthouseapp.com/projects/51787-gitpython/milestones</a></p> +</div> +<div class="section" id="license-information"> +<h2>License Information<a class="headerlink" href="#license-information" title="Permalink to this headline">¶</a></h2> +<p>GitPython is licensed under the New BSD License. See the LICENSE file for +more information.</p> +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference external" href="#">Overview / Install</a><ul> +<li><a class="reference external" href="#requirements">Requirements</a></li> +<li><a class="reference external" href="#installing-gitpython">Installing GitPython</a></li> +<li><a class="reference external" href="#getting-started">Getting Started</a></li> +<li><a class="reference external" href="#api-reference">API Reference</a></li> +<li><a class="reference external" href="#source-code">Source Code</a></li> +<li><a class="reference external" href="#mailing-list">Mailing List</a></li> +<li><a class="reference external" href="#issue-tracker">Issue Tracker</a></li> +<li><a class="reference external" href="#license-information">License Information</a></li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="index.html" + title="previous chapter">GitPython Documentation</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="tutorial.html" + title="next chapter">GitPython Tutorial</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="_sources/intro.txt" + rel="nofollow">Show Source</a></li> + </ul> + <div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> + </div> + <script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="tutorial.html" title="GitPython Tutorial" + >next</a> |</li> + <li class="right" > + <a href="index.html" title="GitPython Documentation" + >previous</a> |</li> + <li><a href="index.html">GitPython v0.2.0 Beta documentation</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright Copyright (C) 2008, 2009 Michael Trier and contributors. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.5. + </div> + </body> +</html>
\ No newline at end of file diff --git a/doc/doc_index/0.2/objects.inv b/doc/doc_index/0.2/objects.inv new file mode 100644 index 00000000..7d252e3a --- /dev/null +++ b/doc/doc_index/0.2/objects.inv @@ -0,0 +1,3 @@ +# Sphinx inventory version 1 +# Project: GitPython +# Version: 0.2.0 diff --git a/doc/doc_index/0.2/reference.html b/doc/doc_index/0.2/reference.html new file mode 100644 index 00000000..41241318 --- /dev/null +++ b/doc/doc_index/0.2/reference.html @@ -0,0 +1,181 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>API Reference — GitPython v0.2.0 Beta documentation</title> + <link rel="stylesheet" href="_static/default.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '#', + VERSION: '0.2.0 Beta', + COLLAPSE_MODINDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <link rel="top" title="GitPython v0.2.0 Beta documentation" href="index.html" /> + <link rel="next" title="Roadmap" href="roadmap.html" /> + <link rel="prev" title="GitPython Tutorial" href="tutorial.html" /> + </head> + <body> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="roadmap.html" title="Roadmap" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="tutorial.html" title="GitPython Tutorial" + accesskey="P">previous</a> |</li> + <li><a href="index.html">GitPython v0.2.0 Beta documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="api-reference"> +<span id="api-reference-toplevel"></span><h1>API Reference<a class="headerlink" href="#api-reference" title="Permalink to this headline">¶</a></h1> +<div class="section" id="actor"> +<h2>Actor<a class="headerlink" href="#actor" title="Permalink to this headline">¶</a></h2> +</div> +<div class="section" id="objects-base"> +<h2>Objects.Base<a class="headerlink" href="#objects-base" title="Permalink to this headline">¶</a></h2> +</div> +<div class="section" id="objects-blob"> +<h2>Objects.Blob<a class="headerlink" href="#objects-blob" title="Permalink to this headline">¶</a></h2> +</div> +<div class="section" id="objects-commit"> +<h2>Objects.Commit<a class="headerlink" href="#objects-commit" title="Permalink to this headline">¶</a></h2> +</div> +<div class="section" id="objects-tag"> +<h2>Objects.Tag<a class="headerlink" href="#objects-tag" title="Permalink to this headline">¶</a></h2> +</div> +<div class="section" id="objects-tree"> +<h2>Objects.Tree<a class="headerlink" href="#objects-tree" title="Permalink to this headline">¶</a></h2> +</div> +<div class="section" id="objects-utils"> +<h2>Objects.Utils<a class="headerlink" href="#objects-utils" title="Permalink to this headline">¶</a></h2> +</div> +<div class="section" id="gitcmd"> +<h2>GitCmd<a class="headerlink" href="#gitcmd" title="Permalink to this headline">¶</a></h2> +</div> +<div class="section" id="config"> +<h2>Config<a class="headerlink" href="#config" title="Permalink to this headline">¶</a></h2> +</div> +<div class="section" id="diff"> +<h2>Diff<a class="headerlink" href="#diff" title="Permalink to this headline">¶</a></h2> +</div> +<div class="section" id="errors"> +<h2>Errors<a class="headerlink" href="#errors" title="Permalink to this headline">¶</a></h2> +</div> +<div class="section" id="index"> +<h2>Index<a class="headerlink" href="#index" title="Permalink to this headline">¶</a></h2> +</div> +<div class="section" id="refs"> +<h2>Refs<a class="headerlink" href="#refs" title="Permalink to this headline">¶</a></h2> +</div> +<div class="section" id="remote"> +<h2>Remote<a class="headerlink" href="#remote" title="Permalink to this headline">¶</a></h2> +</div> +<div class="section" id="repo"> +<h2>Repo<a class="headerlink" href="#repo" title="Permalink to this headline">¶</a></h2> +</div> +<div class="section" id="stats"> +<h2>Stats<a class="headerlink" href="#stats" title="Permalink to this headline">¶</a></h2> +</div> +<div class="section" id="utils"> +<h2>Utils<a class="headerlink" href="#utils" title="Permalink to this headline">¶</a></h2> +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference external" href="#">API Reference</a><ul> +<li><a class="reference external" href="#actor">Actor</a></li> +<li><a class="reference external" href="#objects-base">Objects.Base</a></li> +<li><a class="reference external" href="#objects-blob">Objects.Blob</a></li> +<li><a class="reference external" href="#objects-commit">Objects.Commit</a></li> +<li><a class="reference external" href="#objects-tag">Objects.Tag</a></li> +<li><a class="reference external" href="#objects-tree">Objects.Tree</a></li> +<li><a class="reference external" href="#objects-utils">Objects.Utils</a></li> +<li><a class="reference external" href="#gitcmd">GitCmd</a></li> +<li><a class="reference external" href="#config">Config</a></li> +<li><a class="reference external" href="#diff">Diff</a></li> +<li><a class="reference external" href="#errors">Errors</a></li> +<li><a class="reference external" href="#index">Index</a></li> +<li><a class="reference external" href="#refs">Refs</a></li> +<li><a class="reference external" href="#remote">Remote</a></li> +<li><a class="reference external" href="#repo">Repo</a></li> +<li><a class="reference external" href="#stats">Stats</a></li> +<li><a class="reference external" href="#utils">Utils</a></li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="tutorial.html" + title="previous chapter">GitPython Tutorial</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="roadmap.html" + title="next chapter">Roadmap</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="_sources/reference.txt" + rel="nofollow">Show Source</a></li> + </ul> + <div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> + </div> + <script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="roadmap.html" title="Roadmap" + >next</a> |</li> + <li class="right" > + <a href="tutorial.html" title="GitPython Tutorial" + >previous</a> |</li> + <li><a href="index.html">GitPython v0.2.0 Beta documentation</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright Copyright (C) 2008, 2009 Michael Trier and contributors. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.5. + </div> + </body> +</html>
\ No newline at end of file diff --git a/doc/doc_index/0.2/roadmap.html b/doc/doc_index/0.2/roadmap.html new file mode 100644 index 00000000..c98de752 --- /dev/null +++ b/doc/doc_index/0.2/roadmap.html @@ -0,0 +1,97 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>Roadmap — GitPython v0.2.0 Beta documentation</title> + <link rel="stylesheet" href="_static/default.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '#', + VERSION: '0.2.0 Beta', + COLLAPSE_MODINDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <link rel="top" title="GitPython v0.2.0 Beta documentation" href="index.html" /> + <link rel="prev" title="API Reference" href="reference.html" /> + </head> + <body> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="reference.html" title="API Reference" + accesskey="P">previous</a> |</li> + <li><a href="index.html">GitPython v0.2.0 Beta documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="roadmap"> +<h1>Roadmap<a class="headerlink" href="#roadmap" title="Permalink to this headline">¶</a></h1> +<p>The full list of milestones including associated tasks can be found on lighthouse: <a class="reference external" href="http://byronimo.lighthouseapp.com/projects/51787-gitpython/milestones">http://byronimo.lighthouseapp.com/projects/51787-gitpython/milestones</a></p> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h4>Previous topic</h4> + <p class="topless"><a href="reference.html" + title="previous chapter">API Reference</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="_sources/roadmap.txt" + rel="nofollow">Show Source</a></li> + </ul> + <div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> + </div> + <script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="reference.html" title="API Reference" + >previous</a> |</li> + <li><a href="index.html">GitPython v0.2.0 Beta documentation</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright Copyright (C) 2008, 2009 Michael Trier and contributors. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.5. + </div> + </body> +</html>
\ No newline at end of file diff --git a/doc/doc_index/0.2/search.html b/doc/doc_index/0.2/search.html new file mode 100644 index 00000000..76a76483 --- /dev/null +++ b/doc/doc_index/0.2/search.html @@ -0,0 +1,91 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>Search — GitPython v0.2.0 Beta documentation</title> + <link rel="stylesheet" href="_static/default.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '#', + VERSION: '0.2.0 Beta', + COLLAPSE_MODINDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <script type="text/javascript" src="_static/searchtools.js"></script> + <link rel="top" title="GitPython v0.2.0 Beta documentation" href="index.html" /> + </head> + <body> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + accesskey="I">index</a></li> + <li><a href="index.html">GitPython v0.2.0 Beta documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <h1 id="search-documentation">Search</h1> + <div id="fallback" class="admonition warning"> + <script type="text/javascript">$('#fallback').hide();</script> + <p> + Please activate JavaScript to enable the search + functionality. + </p> + </div> + <p> + From here you can search these documents. Enter your search + words into the box below and click "search". Note that the search + function will automatically search for all of the words. Pages + containing fewer words won't appear in the result list. + </p> + <form action="" method="get"> + <input type="text" name="q" value="" /> + <input type="submit" value="search" /> + <span id="search-progress" style="padding-left: 10px"></span> + </form> + + <div id="search-results"> + + </div> + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + >index</a></li> + <li><a href="index.html">GitPython v0.2.0 Beta documentation</a> »</li> + </ul> + </div> + + <div class="footer"> + © Copyright Copyright (C) 2008, 2009 Michael Trier and contributors. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.5. + </div> + <script type="text/javascript" src="searchindex.js"></script> + + </body> +</html>
\ No newline at end of file diff --git a/doc/doc_index/0.2/searchindex.js b/doc/doc_index/0.2/searchindex.js new file mode 100644 index 00000000..29e22d67 --- /dev/null +++ b/doc/doc_index/0.2/searchindex.js @@ -0,0 +1 @@ +Search.setIndex({desctypes:{},terms:{all:3,code:[0,1],chain:3,queri:3,concept:1,abil:3,follow:[1,3],content:3,graph:3,readabl:3,gitpthon:1,init:3,tracker:[0,1],skip:3,new_repo:3,sourc:[0,1],string:3,fals:3,util:[0,2],whether:3,implicitli:3,subprocess:3,brows:1,level:3,michael:[1,3],iter:3,item:3,adjust:3,dir:3,prevent:3,htc:3,direct:3,my_new_branch:3,second:3,design:1,iter_commit:3,pass:3,download:1,port:1,even:[0,3],index:[0,1,2,3],what:3,sub:3,compar:3,mainlin:1,section:[1,3],access:3,delet:3,version:1,"new":[1,3],method:3,"6825a94104164d9f0f5632607bebd2a32a3579e5":3,full:4,hash:3,iteritem:3,gener:3,lighthouseapp:[1,4],sophist:3,here:[1,3],let:3,path:3,safer:3,becom:3,modifi:[0,3],sinc:3,valu:3,search:0,convers:3,brutal:3,headcommit:3,dummy_repo:3,behav:3,other_url:3,chang:3,configur:3,modul:[0,3],unix:3,api:[0,1,2],instal:[0,1],unit:3,hexadecim:3,from:[1,3],stream:3,lighthous:4,distinct:3,two:3,next:3,few:3,call:3,handl:[0,3],type:3,more:[0,1,3],abspath:3,under:1,line:1,flag:3,gitcmd:[0,2],examin:[0,3],unpack:3,origin:3,none:3,retriev:3,gitpython:[0,1,3,4],alia:3,setup:1,work:3,uniqu:3,histori:3,new_nam:3,archiv:3,can:[1,3,4],root:3,fetch:3,tar:3,indic:[0,3],max_count:3,high:3,tag:[0,2,3],want:3,alwai:3,multipl:3,anoth:3,write:3,how:3,pure:3,subdirectori:3,instead:3,simpl:3,chri:1,clone:[1,3],a95eeb2a7082212c197cabbf2539185ec74ed0e8:3,trier:3,date:3,associ:4,"short":3,essenti:3,correspond:3,foord:1,issu:[0,1],inform:[0,1,3],"switch":[0,3],allow:3,"3594e94c04db171e2767224db355f514b13715c5":3,"94954abda49de8615a048f8d2e64b5de848e27a1":3,hcommit:3,through:[1,3],pointer:3,mtrier:3,group:1,binari:3,fix:3,delete_head:3,mail:[0,1],might:3,them:3,"return":3,thei:3,python:[1,3],initi:[0,3],mention:3,delete_remot:3,data_stream:3,introduct:3,name:3,anyth:3,config:[0,2,3],wdiff:3,easili:[1,3],a91c45eee0b41bf3cdaad3418ca3850664c4a4b4:3,mode:3,each:3,found:[1,3,4],list:[0,1,3,4],individu:3,beyond:1,special:3,shown:3,accomplish:3,hct:3,miss:3,pyhton:3,reader:3,ref:[0,2,3],ancestri:3,tagref:3,manipul:3,committ:3,ineffici:3,base:[0,2,3],put:3,org:1,"byte":3,afterward:3,my_stream:3,filter:3,thing:3,place:3,diffindex:3,licens:[0,1],first:3,oper:3,directli:[0,3],carri:3,onc:3,number:3,mai:3,done:[1,3],overwrit:3,open:3,size:3,given:3,silent:3,script:1,data:3,interact:1,system:[1,3],messag:3,master:3,tom:1,conveni:3,"final":3,option:3,copi:3,setuptool:1,specifi:3,"var":3,github:1,delete_tag:3,grew:1,create_remot:3,new_origin:3,keyword:3,provid:[1,3],remov:3,tree:[0,2,3],charact:3,project:[1,3,4],str:3,were:3,merged_index:3,sai:3,preston:1,ani:3,packag:1,have:3,tabl:0,need:3,f7eb5df2e465ab621b1db3f5714850d6732cfed2:3,lib:3,my_new_fil:3,destroi:3,note:3,also:3,without:3,take:3,which:[1,3],e79b05161e4836e5fbf197aeb52515753e8d6ab6:3,channel:3,config_read:3,though:3,object:[0,2,3],create_head:3,test_remot:3,stream_data:3,bsd:1,new_tag:3,renam:3,url:3,clean:3,usual:3,notion:3,cheapli:3,some_branch:3,syntax:3,find:3,involv:3,current:3,onli:3,existing_fil:3,explain:3,writer:3,activ:3,than:3,suppos:3,local:3,new_commit:3,variou:3,get:[0,1,3],pypi:1,repo:[0,1,2,3],requir:[0,1],organ:1,diffabl:3,yield:3,sha:3,common:3,contain:3,where:3,set:3,commandlin:3,diff_ad:3,byron:1,roadmap:[0,4],see:1,bare:3,result:3,gmail:3,mileston:[1,4],my_tag:3,databas:3,written:3,between:3,"import":3,approach:3,a006b5b1a8115185a228b7514cdcd46fed90dc92:3,attribut:3,altern:1,storabl:3,parent:3,blame:3,len:3,addit:3,howev:1,against:3,foreign:3,tutori:[0,1,3],improv:1,c1c7214dde86f76bc3e18806ac1f47c38b2b7a30:3,com:[1,3,4],strftime:3,load:3,asctim:3,point:3,overview:[0,1],iter_blob:3,walk:1,werner:1,linux:3,diff:[0,2,3],assum:1,do_someth:3,"0x7f6598bd65a8":3,addition:3,compos:3,empti:3,basic:[1,3],life:3,tmp_index:3,rubi:1,convert:3,argument:3,untrack:3,understand:[0,3],standard:3,"case":3,look:3,abov:3,error:[0,2],"207c0c4418115df0d30820ab1a9acd2ea4bf4431":3,itself:3,revis:3,develop:3,author:3,perform:1,untracked_fil:3,same:3,epock:3,epoch:3,instanc:3,document:0,exhaust:1,http:[1,4],effect:3,remot:[0,2,3],temporari:3,user:3,usecas:3,freeli:3,parlanc:3,travers:3,task:4,config_writ:3,entri:3,well:3,know:3,exampl:3,command:[1,3],thi:[1,3],filesystem:3,model:3,spend:1,latest:[1,3],identifi:3,just:1,less:3,when:3,obtain:[0,3],human:3,wed:3,except:3,add:[1,3],blob:[0,2,3],working_tre:3,match:3,real:3,grit:1,format:3,read:3,sha1:3,for_each_ref:3,recurs:3,like:3,specif:3,manual:3,server:3,nose:1,output:3,page:[0,3],drop:3,some:1,heritag:1,byronimo:[1,4],librari:1,distribut:1,subclass:3,new_branch:3,refer:[0,1,2,3],encourag:1,previou:3,run:1,uncompress:3,gmtime:3,step:3,repositori:[1,3],immut:3,stage:3,about:[1,3],actual:3,would:3,iter_change_typ:3,commit:[0,2,3],produc:3,is_dirti:3,own:3,easy_instal:1,three:3,been:3,wrap:3,your:[1,3],merg:3,other_branch:3,git:[0,1,3],log:3,wai:3,"long":3,avail:1,start:[0,1],"563413aedbeda425d8d9dcbb744247d0c3e8a0ac":3,includ:4,lot:3,a871e79d59cf8488cac4af0c8f990b7a989e2b53:3,pushurl:3,"function":[1,3],indexfil:3,head:3,form:3,tupl:3,translat:3,newer:1,eas:3,"true":3,reset:3,pull:3,made:3,"default":3,checkout:3,record:3,my_untracked_fil:3,similar:3,creat:[1,3],create_tag:3,tdiff:3,repres:3,exist:3,file:[1,3],check:3,merge_index:3,probabl:3,committed_d:3,cloned_repo:3,googl:1,tip:3,gitori:1,actor:[0,2,3],field:3,other:3,do_something_with:3,branch:[0,3],test:[1,3],you:[1,3],mock:1,stat:[0,2,3],symbol:3,idiff:3,from_tre:3,authored_d:3,directori:3,depth:3,time:[1,3],push:3,escap:3,wanstrath:1},titles:["GitPython Documentation","Overview / Install","API Reference","GitPython Tutorial","Roadmap"],modules:{},descrefs:{},filenames:["index","intro","reference","tutorial","roadmap"]})
\ No newline at end of file diff --git a/doc/doc_index/0.2/tutorial.html b/doc/doc_index/0.2/tutorial.html new file mode 100644 index 00000000..a2400578 --- /dev/null +++ b/doc/doc_index/0.2/tutorial.html @@ -0,0 +1,454 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>GitPython Tutorial — GitPython v0.2.0 Beta documentation</title> + <link rel="stylesheet" href="_static/default.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '#', + VERSION: '0.2.0 Beta', + COLLAPSE_MODINDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <link rel="top" title="GitPython v0.2.0 Beta documentation" href="index.html" /> + <link rel="next" title="API Reference" href="reference.html" /> + <link rel="prev" title="Overview / Install" href="intro.html" /> + </head> + <body> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="reference.html" title="API Reference" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="intro.html" title="Overview / Install" + accesskey="P">previous</a> |</li> + <li><a href="index.html">GitPython v0.2.0 Beta documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="gitpython-tutorial"> +<span id="tutorial-label"></span><h1>GitPython Tutorial<a class="headerlink" href="#gitpython-tutorial" title="Permalink to this headline">¶</a></h1> +<p>GitPython provides object model access to your git repository. This tutorial is composed of multiple sections, each of which explain a real-life usecase.</p> +<div class="section" id="initialize-a-repo-object"> +<h2>Initialize a Repo object<a class="headerlink" href="#initialize-a-repo-object" title="Permalink to this headline">¶</a></h2> +<p>The first step is to create a <tt class="docutils literal"><span class="pre">Repo</span></tt> object to represent your repository:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">git</span> <span class="kn">import</span> <span class="o">*</span> +<span class="n">repo</span> <span class="o">=</span> <span class="n">Repo</span><span class="p">(</span><span class="s">"/Users/mtrier/Development/git-python"</span><span class="p">)</span> +</pre></div> +</div> +<p>In the above example, the directory <tt class="docutils literal"><span class="pre">/Users/mtrier/Development/git-python</span></tt> is my working repository and contains the <tt class="docutils literal"><span class="pre">.git</span></tt> directory. You can also initialize GitPython with a bare repository:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="n">repo</span> <span class="o">=</span> <span class="n">Repo</span><span class="o">.</span><span class="n">create</span><span class="p">(</span><span class="s">"/var/git/git-python.git"</span><span class="p">)</span> +</pre></div> +</div> +<p>A repo object provides high-level access to your data, it allows you to create and delete heads, tags and remotes and access the configuration of the repository:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="n">repo</span><span class="o">.</span><span class="n">config_reader</span><span class="p">()</span> <span class="c"># get a config reader for read-only access</span> +<span class="n">repo</span><span class="o">.</span><span class="n">config_writer</span><span class="p">()</span> <span class="c"># get a config writer to change configuration</span> +</pre></div> +</div> +<p>Query the active branch, query untracked files or whether the repository data has been modified:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="n">repo</span><span class="o">.</span><span class="n">is_dirty</span><span class="p">()</span> +<span class="bp">False</span> +<span class="n">repo</span><span class="o">.</span><span class="n">untracked_files</span><span class="p">()</span> +<span class="p">[</span><span class="s">'my_untracked_file'</span><span class="p">]</span> +</pre></div> +</div> +<p>Clone from existing repositories or initialize new empty ones:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="n">cloned_repo</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">clone</span><span class="p">(</span><span class="s">"to/this/path"</span><span class="p">)</span> +<span class="n">new_repo</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">init</span><span class="p">(</span><span class="s">"path/for/new/repo"</span><span class="p">)</span> +</pre></div> +</div> +<p>Archive the repository contents to a tar file:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="n">repo</span><span class="o">.</span><span class="n">archive</span><span class="p">(</span><span class="nb">open</span><span class="p">(</span><span class="s">"repo.tar"</span><span class="p">,</span><span class="s">'w'</span><span class="p">))</span> +</pre></div> +</div> +</div> +<div class="section" id="examining-references"> +<h2>Examining References<a class="headerlink" href="#examining-references" title="Permalink to this headline">¶</a></h2> +<p>References are the tips of your commit graph from which you can easily examine the history of your project:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="n">heads</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">heads</span> +<span class="n">master</span> <span class="o">=</span> <span class="n">heads</span><span class="o">.</span><span class="n">master</span> <span class="c"># lists can be accessed by name for convenience</span> +<span class="n">master</span><span class="o">.</span><span class="n">commit</span> <span class="c"># the commit pointed to by head called master</span> +<span class="n">master</span><span class="o">.</span><span class="n">rename</span><span class="p">(</span><span class="s">"new_name"</span><span class="p">)</span> <span class="c"># rename heads</span> +</pre></div> +</div> +<p>Tags are (usually immutable) references to a commit and/or a tag object:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="n">tags</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">tags</span> +<span class="n">tagref</span> <span class="o">=</span> <span class="n">tags</span><span class="p">[</span><span class="mf">0</span><span class="p">]</span> +<span class="n">tagref</span><span class="o">.</span><span class="n">tag</span> <span class="c"># tags may have tag objects carrying additional information</span> +<span class="n">tagref</span><span class="o">.</span><span class="n">commit</span> <span class="c"># but they always point to commits</span> +<span class="n">repo</span><span class="o">.</span><span class="n">delete_tag</span><span class="p">(</span><span class="n">tagref</span><span class="p">)</span> <span class="c"># delete or</span> +<span class="n">repo</span><span class="o">.</span><span class="n">create_tag</span><span class="p">(</span><span class="s">"my_tag"</span><span class="p">)</span> <span class="c"># create tags using the repo for convenience</span> +</pre></div> +</div> +<p>A symbolic reference is a special case of a reference as it points to another reference instead of a commit:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="n">head</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">head</span> <span class="c"># the head points to the active branch/ref</span> +<span class="n">master</span> <span class="o">=</span> <span class="n">head</span><span class="o">.</span><span class="n">reference</span> <span class="c"># retrieve the reference the head points to</span> +<span class="n">master</span><span class="o">.</span><span class="n">commit</span> <span class="c"># from here you use it as any other reference</span> +</pre></div> +</div> +</div> +<div class="section" id="modifying-references"> +<h2>Modifying References<a class="headerlink" href="#modifying-references" title="Permalink to this headline">¶</a></h2> +<p>You can easily create and delete reference types or modify where they point to:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="n">repo</span><span class="o">.</span><span class="n">delete_head</span><span class="p">(</span><span class="s">'master'</span><span class="p">)</span> <span class="c"># delete an existing head</span> +<span class="n">master</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">create_head</span><span class="p">(</span><span class="s">'master'</span><span class="p">)</span> <span class="c"># create a new one</span> +<span class="n">master</span><span class="o">.</span><span class="n">commit</span> <span class="o">=</span> <span class="s">'HEAD~10'</span> <span class="c"># set branch to another commit without changing index or working tree</span> +</pre></div> +</div> +<p>Create or delete tags the same way except you may not change them afterwards:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="n">new_tag</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">create_tag</span><span class="p">(</span><span class="s">'my_tag'</span><span class="p">,</span> <span class="s">'my message'</span><span class="p">)</span> +<span class="n">repo</span><span class="o">.</span><span class="n">delete_tag</span><span class="p">(</span><span class="n">new_tag</span><span class="p">)</span> +</pre></div> +</div> +<p>Change the symbolic reference to switch branches cheaply ( without adjusting the index or the working copy ):</p> +<div class="highlight-python"><div class="highlight"><pre><span class="n">new_branch</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">create_head</span><span class="p">(</span><span class="s">'new_branch'</span><span class="p">)</span> +<span class="n">repo</span><span class="o">.</span><span class="n">head</span><span class="o">.</span><span class="n">reference</span> <span class="o">=</span> <span class="n">new_branch</span> +</pre></div> +</div> +</div> +<div class="section" id="understanding-objects"> +<h2>Understanding Objects<a class="headerlink" href="#understanding-objects" title="Permalink to this headline">¶</a></h2> +<p>An Object is anything storable in git’s object database. Objects contain information about their type, their uncompressed size as well as the actual data. Each object is uniquely identified by a SHA1 hash, being 40 hexadecimal characters in size or 20 bytes in size.</p> +<p>Git only knows 4 distinct object types being Blobs, Trees, Commits and Tags.</p> +<p>In Git-Pyhton, all objects can be accessed through their common base, compared and hashed, as shown in the following example:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="n">hc</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">head</span><span class="o">.</span><span class="n">commit</span> +<span class="n">hct</span> <span class="o">=</span> <span class="n">hc</span><span class="o">.</span><span class="n">tree</span> +<span class="n">hc</span> <span class="o">!=</span> <span class="n">hct</span> +<span class="n">hc</span> <span class="o">!=</span> <span class="n">repo</span><span class="o">.</span><span class="n">tags</span><span class="p">[</span><span class="mf">0</span><span class="p">]</span> +<span class="n">hc</span> <span class="o">==</span> <span class="n">repo</span><span class="o">.</span><span class="n">head</span><span class="o">.</span><span class="n">reference</span><span class="o">.</span><span class="n">commit</span> +</pre></div> +</div> +<p>Basic fields are:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="n">hct</span><span class="o">.</span><span class="n">type</span> +<span class="s">'tree'</span> +<span class="n">hct</span><span class="o">.</span><span class="n">size</span> +<span class="mf">166</span> +<span class="n">hct</span><span class="o">.</span><span class="n">sha</span> +<span class="s">'a95eeb2a7082212c197cabbf2539185ec74ed0e8'</span> +<span class="n">hct</span><span class="o">.</span><span class="n">data</span> <span class="c"># returns string with pure uncompressed data</span> +<span class="s">'...'</span> +<span class="nb">len</span><span class="p">(</span><span class="n">hct</span><span class="o">.</span><span class="n">data</span><span class="p">)</span> <span class="o">==</span> <span class="n">hct</span><span class="o">.</span><span class="n">size</span> +</pre></div> +</div> +<p>Index Objects are objects that can be put into git’s index. These objects are trees and blobs which additionally know about their path in the filesystem as well as their mode:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="n">hct</span><span class="o">.</span><span class="n">path</span> <span class="c"># root tree has no path</span> +<span class="s">''</span> +<span class="n">hct</span><span class="o">.</span><span class="n">trees</span><span class="p">[</span><span class="mf">0</span><span class="p">]</span><span class="o">.</span><span class="n">path</span> <span class="c"># the first subdirectory has one though</span> +<span class="s">'dir'</span> +<span class="n">htc</span><span class="o">.</span><span class="n">mode</span> <span class="c"># trees have mode 0</span> +<span class="mf">0</span> +<span class="s">'</span><span class="si">%o</span><span class="s">'</span> <span class="o">%</span> <span class="n">htc</span><span class="o">.</span><span class="n">blobs</span><span class="p">[</span><span class="mf">0</span><span class="p">]</span><span class="o">.</span><span class="n">mode</span> <span class="c"># blobs have a specific mode though comparable to a standard linux fs</span> +<span class="mf">100644</span> +</pre></div> +</div> +<p>Access blob data (or any object data) directly or using streams:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="n">htc</span><span class="o">.</span><span class="n">data</span> <span class="c"># binary tree data as string ( inefficient )</span> +<span class="n">htc</span><span class="o">.</span><span class="n">blobs</span><span class="p">[</span><span class="mf">0</span><span class="p">]</span><span class="o">.</span><span class="n">data_stream</span> <span class="c"># stream object to read data from</span> +<span class="n">htc</span><span class="o">.</span><span class="n">blobs</span><span class="p">[</span><span class="mf">0</span><span class="p">]</span><span class="o">.</span><span class="n">stream_data</span><span class="p">(</span><span class="n">my_stream</span><span class="p">)</span> <span class="c"># write data to given stream</span> +</pre></div> +</div> +</div> +<div class="section" id="the-commit-object"> +<h2>The Commit object<a class="headerlink" href="#the-commit-object" title="Permalink to this headline">¶</a></h2> +<p>Commit objects contain information about a specific commit. Obtain commits using references as done in <a class="reference internal" href="#examining-references">Examining References</a> or as follows.</p> +<p>Obtain commits at the specified revision:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="n">repo</span><span class="o">.</span><span class="n">commit</span><span class="p">(</span><span class="s">'master'</span><span class="p">)</span> +<span class="n">repo</span><span class="o">.</span><span class="n">commit</span><span class="p">(</span><span class="s">'v0.1'</span><span class="p">)</span> +<span class="n">repo</span><span class="o">.</span><span class="n">commit</span><span class="p">(</span><span class="s">'HEAD~10'</span><span class="p">)</span> +</pre></div> +</div> +<p>Iterate 100 commits:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="n">repo</span><span class="o">.</span><span class="n">iter_commits</span><span class="p">(</span><span class="s">'master'</span><span class="p">,</span> <span class="n">max_count</span><span class="o">=</span><span class="mf">100</span><span class="p">)</span> +</pre></div> +</div> +<p>If you need paging, you can specify a number of commits to skip:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="n">repo</span><span class="o">.</span><span class="n">iter_commits</span><span class="p">(</span><span class="s">'master'</span><span class="p">,</span> <span class="n">max_count</span><span class="o">=</span><span class="mf">10</span><span class="p">,</span> <span class="n">skip</span><span class="o">=</span><span class="mf">20</span><span class="p">)</span> +</pre></div> +</div> +<p>The above will return commits 21-30 from the commit list.:</p> +<div class="highlight-python"><pre>headcommit = repo.head.commit + +headcommit.sha +'207c0c4418115df0d30820ab1a9acd2ea4bf4431' + +headcommit.parents +[<git.Commit "a91c45eee0b41bf3cdaad3418ca3850664c4a4b4">] + +headcommit.tree +<git.Tree "563413aedbeda425d8d9dcbb744247d0c3e8a0ac"> + +headcommit.author +<git.Actor "Michael Trier <mtrier@gmail.com>"> + +headcommit.authored_date # seconds since epoch +1256291446 + +headcommit.committer +<git.Actor "Michael Trier <mtrier@gmail.com>"> + +headcommit.committed_date +1256291446 + +headcommit.message +'cleaned up a lot of test information. Fixed escaping so it works with +subprocess.'</pre> +</div> +<p>Note: date time is represented in a <tt class="docutils literal"><span class="pre">seconds</span> <span class="pre">since</span> <span class="pre">epock</span></tt> format. Conversion to human readable form can be accomplished with the various time module methods:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="kn">import</span> <span class="nn">time</span> +<span class="n">time</span><span class="o">.</span><span class="n">asctime</span><span class="p">(</span><span class="n">time</span><span class="o">.</span><span class="n">gmtime</span><span class="p">(</span><span class="n">headcommit</span><span class="o">.</span><span class="n">committed_date</span><span class="p">))</span> +<span class="s">'Wed May 7 05:56:02 2008'</span> + +<span class="n">time</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="s">"%a, </span><span class="si">%d</span><span class="s"> %b %Y %H:%M"</span><span class="p">,</span> <span class="n">time</span><span class="o">.</span><span class="n">gmtime</span><span class="p">(</span><span class="n">headcommit</span><span class="o">.</span><span class="n">committed_date</span><span class="p">))</span> +<span class="s">'Wed, 7 May 2008 05:56'</span> +</pre></div> +</div> +<p>You can traverse a commit’s ancestry by chaining calls to <tt class="docutils literal"><span class="pre">parents</span></tt>:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="n">headcommit</span><span class="o">.</span><span class="n">parents</span><span class="p">[</span><span class="mf">0</span><span class="p">]</span><span class="o">.</span><span class="n">parents</span><span class="p">[</span><span class="mf">0</span><span class="p">]</span><span class="o">.</span><span class="n">parents</span><span class="p">[</span><span class="mf">0</span><span class="p">]</span> +</pre></div> +</div> +<p>The above corresponds to <tt class="docutils literal"><span class="pre">master^^^</span></tt> or <tt class="docutils literal"><span class="pre">master~3</span></tt> in git parlance.</p> +</div> +<div class="section" id="the-tree-object"> +<h2>The Tree object<a class="headerlink" href="#the-tree-object" title="Permalink to this headline">¶</a></h2> +<p>A tree records pointers to the contents of a directory. Let’s say you want the root tree of the latest commit on the master branch:</p> +<div class="highlight-python"><pre>tree = repo.heads.master.commit.tree +<git.Tree "a006b5b1a8115185a228b7514cdcd46fed90dc92"> + +tree.sha +'a006b5b1a8115185a228b7514cdcd46fed90dc92'</pre> +</div> +<p>Once you have a tree, you can get the contents:</p> +<div class="highlight-python"><pre>tree.trees # trees are subdirectories +[<git.Tree "f7eb5df2e465ab621b1db3f5714850d6732cfed2">] + +tree.blobs # blobs are files +[<git.Blob "a871e79d59cf8488cac4af0c8f990b7a989e2b53">, +<git.Blob "3594e94c04db171e2767224db355f514b13715c5">, +<git.Blob "e79b05161e4836e5fbf197aeb52515753e8d6ab6">, +<git.Blob "94954abda49de8615a048f8d2e64b5de848e27a1">]</pre> +</div> +<p>Its useful to know that a tree behaves like a list with the ability to query entries by name:</p> +<div class="highlight-python"><pre>tree[0] == tree['dir'] # access by index and by sub-path +<git.Tree "f7eb5df2e465ab621b1db3f5714850d6732cfed2"> +for entry in tree: do_something_with(entry) + +blob = tree[0][0] +blob.name +'file' +blob.path +'dir/file' +blob.abspath +'/Users/mtrier/Development/git-python/dir/file' +>>>tree['dir/file'].sha == blob.sha</pre> +</div> +<p>There is a convenience method that allows you to get a named sub-object from a tree with a syntax similar to how paths are written in an unix system:</p> +<div class="highlight-python"><pre>tree/"lib" +<git.Tree "c1c7214dde86f76bc3e18806ac1f47c38b2b7a30"> +tree/"dir/file" == blob.sha</pre> +</div> +<p>You can also get a tree directly from the repository if you know its name:</p> +<div class="highlight-python"><pre>repo.tree() +<git.Tree "master"> + +repo.tree("c1c7214dde86f76bc3e18806ac1f47c38b2b7a30") +<git.Tree "c1c7214dde86f76bc3e18806ac1f47c38b2b7a30"> +repo.tree('0.1.6') +<git.Tree "6825a94104164d9f0f5632607bebd2a32a3579e5"></pre> +</div> +<p>As trees only allow direct access to their direct entries, use the traverse method to obtain an iterator to traverse entries recursively:</p> +<div class="highlight-python"><pre>tree.traverse() +<generator object at 0x7f6598bd65a8> +for entry in traverse(): do_something_with(entry)</pre> +</div> +</div> +<div class="section" id="the-index-object"> +<h2>The Index Object<a class="headerlink" href="#the-index-object" title="Permalink to this headline">¶</a></h2> +<p>The git index is the stage containing changes to be written with the next commit or where merges finally have to take place. You may freely access and manipulate this information using the IndexFile Object:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="n">index</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">index</span> +</pre></div> +</div> +<p>Access objects and add/remove entries. Commit the changes:</p> +<div class="highlight-python"><pre>for stage,blob in index.iter_blobs(): do_something(...) +Access blob objects +for (path,stage),entry in index.entries.iteritems: pass +Access the entries directly +index.add(['my_new_file']) # add a new file to the index +index.remove(['dir/existing_file']) +new_commit = index.commit("my commit message")</pre> +</div> +<p>Create new indices from other trees or as result of a merge. Write that result to a new index:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="n">tmp_index</span> <span class="o">=</span> <span class="n">Index</span><span class="o">.</span><span class="n">from_tree</span><span class="p">(</span><span class="n">repo</span><span class="p">,</span> <span class="s">'HEAD~1'</span><span class="p">)</span> <span class="c"># load a tree into a temporary index</span> +<span class="n">merge_index</span> <span class="o">=</span> <span class="n">Index</span><span class="o">.</span><span class="n">from_tree</span><span class="p">(</span><span class="n">repo</span><span class="p">,</span> <span class="s">'base'</span><span class="p">,</span> <span class="s">'HEAD'</span><span class="p">,</span> <span class="s">'some_branch'</span><span class="p">)</span> <span class="c"># merge two trees three-way</span> +<span class="n">merge_index</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s">"merged_index"</span><span class="p">)</span> +</pre></div> +</div> +</div> +<div class="section" id="handling-remotes"> +<h2>Handling Remotes<a class="headerlink" href="#handling-remotes" title="Permalink to this headline">¶</a></h2> +<p>Remotes are used as alias for a foreign repository to ease pushing to and fetching from them:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="n">test_remote</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">create_remote</span><span class="p">(</span><span class="s">'test'</span><span class="p">,</span> <span class="s">'git@server:repo.git'</span><span class="p">)</span> +<span class="n">repo</span><span class="o">.</span><span class="n">delete_remote</span><span class="p">(</span><span class="n">test_remote</span><span class="p">)</span> <span class="c"># create and delete remotes</span> +<span class="n">origin</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">remotes</span><span class="o">.</span><span class="n">origin</span> <span class="c"># get default remote by name</span> +<span class="n">origin</span><span class="o">.</span><span class="n">refs</span> <span class="c"># local remote references</span> +<span class="n">o</span> <span class="o">=</span> <span class="n">origin</span><span class="o">.</span><span class="n">rename</span><span class="p">(</span><span class="s">'new_origin'</span><span class="p">)</span> <span class="c"># rename remotes</span> +<span class="n">o</span><span class="o">.</span><span class="n">fetch</span><span class="p">()</span> <span class="c"># fetch, pull and push from and to the remote</span> +<span class="n">o</span><span class="o">.</span><span class="n">pull</span><span class="p">()</span> +<span class="n">o</span><span class="o">.</span><span class="n">push</span><span class="p">()</span> +</pre></div> +</div> +<p>You can easily access configuration information for a remote by accessing options as if they where attributes:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="n">o</span><span class="o">.</span><span class="n">url</span> +<span class="s">'git@server:dummy_repo.git'</span> +</pre></div> +</div> +<p>Change configuration for a specific remote only:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="n">o</span><span class="o">.</span><span class="n">config_writer</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s">"pushurl"</span><span class="p">,</span> <span class="s">"other_url"</span><span class="p">)</span> +</pre></div> +</div> +</div> +<div class="section" id="obtaining-diff-information"> +<h2>Obtaining Diff Information<a class="headerlink" href="#obtaining-diff-information" title="Permalink to this headline">¶</a></h2> +<p>Diffs can generally be obtained by Subclasses of <tt class="docutils literal"><span class="pre">Diffable</span></tt> as they provide the <tt class="docutils literal"><span class="pre">diff</span></tt> method. This operation yields a DiffIndex allowing you to easily access diff information about paths.</p> +<p>Diffs can be made between the Index and Trees, Index and the working tree, trees and trees as well as trees and the working copy. If commits are involved, their tree will be used implicitly:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="n">hcommit</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">head</span><span class="o">.</span><span class="n">commit</span> +<span class="n">idiff</span> <span class="o">=</span> <span class="n">hcommit</span><span class="o">.</span><span class="n">diff</span><span class="p">()</span> <span class="c"># diff tree against index</span> +<span class="n">tdiff</span> <span class="o">=</span> <span class="n">hcommit</span><span class="o">.</span><span class="n">diff</span><span class="p">(</span><span class="s">'HEAD~1'</span><span class="p">)</span> <span class="c"># diff tree against previous tree</span> +<span class="n">wdiff</span> <span class="o">=</span> <span class="n">hcommit</span><span class="o">.</span><span class="n">diff</span><span class="p">(</span><span class="bp">None</span><span class="p">)</span> <span class="c"># diff tree against working tree</span> + +<span class="n">index</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">index</span> +<span class="n">index</span><span class="o">.</span><span class="n">diff</span><span class="p">()</span> <span class="c"># diff index against itself yielding empty diff</span> +<span class="n">index</span><span class="o">.</span><span class="n">diff</span><span class="p">(</span><span class="bp">None</span><span class="p">)</span> <span class="c"># diff index against working copy</span> +<span class="n">index</span><span class="o">.</span><span class="n">diff</span><span class="p">(</span><span class="s">'HEAD'</span><span class="p">)</span> <span class="c"># diff index against current HEAD tree</span> +</pre></div> +</div> +<p>The item returned is a DiffIndex which is essentially a list of Diff objects. It provides additional filtering to ease finding what you might be looking for:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="k">for</span> <span class="n">diff_added</span> <span class="ow">in</span> <span class="n">wdiff</span><span class="o">.</span><span class="n">iter_change_type</span><span class="p">(</span><span class="s">'A'</span><span class="p">):</span> <span class="n">do_something_with</span><span class="p">(</span><span class="n">diff_added</span><span class="p">)</span> +</pre></div> +</div> +</div> +<div class="section" id="switching-branches"> +<h2>Switching Branches<a class="headerlink" href="#switching-branches" title="Permalink to this headline">¶</a></h2> +<p>To switch between branches, you effectively need to point your HEAD to the new branch head and reset your index and working copy to match. A simple manual way to do it is the following one:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="n">repo</span><span class="o">.</span><span class="n">head</span><span class="o">.</span><span class="n">reference</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">heads</span><span class="o">.</span><span class="n">other_branch</span> +<span class="n">repo</span><span class="o">.</span><span class="n">head</span><span class="o">.</span><span class="n">reset</span><span class="p">(</span><span class="n">index</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> <span class="n">working_tree</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span> +</pre></div> +</div> +<p>The previous approach would brutally overwrite the user’s changes in the working copy and index though and is less sophisticated than a git-checkout for instance which generally prevents you from destroying your work. Use the safer approach as follows:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="n">repo</span><span class="o">.</span><span class="n">heads</span><span class="o">.</span><span class="n">master</span><span class="o">.</span><span class="n">checkout</span><span class="p">()</span> <span class="c"># checkout the branch using git-checkout</span> +<span class="n">repo</span><span class="o">.</span><span class="n">heads</span><span class="o">.</span><span class="n">other_branch</span><span class="o">.</span><span class="n">checkout</span><span class="p">()</span> +</pre></div> +</div> +</div> +<div class="section" id="using-git-directly"> +<h2>Using git directly<a class="headerlink" href="#using-git-directly" title="Permalink to this headline">¶</a></h2> +<p>In case you are missing functionality as it has not been wrapped, you may conveniently use the git command directly. It is owned by each repository instance:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="n">git</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">git</span> +<span class="n">git</span><span class="o">.</span><span class="n">checkout</span><span class="p">(</span><span class="s">'head'</span><span class="p">,</span> <span class="n">b</span><span class="o">=</span><span class="s">"my_new_branch"</span><span class="p">)</span> <span class="c"># default command</span> +<span class="n">git</span><span class="o">.</span><span class="n">for_each_ref</span><span class="p">()</span> <span class="c"># '-' becomes '_' when calling it</span> +</pre></div> +</div> +<p>The return value will by default be a string of the standard output channel produced by the command.</p> +<p>Keyword arguments translate to short and long keyword arguments on the commandline. +The special notion <tt class="docutils literal"><span class="pre">git.command(flag=True)</span></tt> will create a flag without value like <tt class="docutils literal"><span class="pre">command</span> <span class="pre">--flag</span></tt>.</p> +<p>If <tt class="xref docutils literal"><span class="pre">None</span></tt> is found in the arguments, it will be dropped silently. Lists and tuples passed as arguments will be unpacked to individual arguments. Objects are converted to strings using the str(...) function.</p> +</div> +<div class="section" id="and-even-more"> +<h2>And even more ...<a class="headerlink" href="#and-even-more" title="Permalink to this headline">¶</a></h2> +<p>There is more functionality in there, like the ability to archive repositories, get stats and logs, blame, and probably a few other things that were not mentioned here.</p> +<p>Check the unit tests for an in-depth introduction on how each function is supposed to be used.</p> +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference external" href="#">GitPython Tutorial</a><ul> +<li><a class="reference external" href="#initialize-a-repo-object">Initialize a Repo object</a></li> +<li><a class="reference external" href="#examining-references">Examining References</a></li> +<li><a class="reference external" href="#modifying-references">Modifying References</a></li> +<li><a class="reference external" href="#understanding-objects">Understanding Objects</a></li> +<li><a class="reference external" href="#the-commit-object">The Commit object</a></li> +<li><a class="reference external" href="#the-tree-object">The Tree object</a></li> +<li><a class="reference external" href="#the-index-object">The Index Object</a></li> +<li><a class="reference external" href="#handling-remotes">Handling Remotes</a></li> +<li><a class="reference external" href="#obtaining-diff-information">Obtaining Diff Information</a></li> +<li><a class="reference external" href="#switching-branches">Switching Branches</a></li> +<li><a class="reference external" href="#using-git-directly">Using git directly</a></li> +<li><a class="reference external" href="#and-even-more">And even more ...</a></li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="intro.html" + title="previous chapter">Overview / Install</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="reference.html" + title="next chapter">API Reference</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="_sources/tutorial.txt" + rel="nofollow">Show Source</a></li> + </ul> + <div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> + </div> + <script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="reference.html" title="API Reference" + >next</a> |</li> + <li class="right" > + <a href="intro.html" title="Overview / Install" + >previous</a> |</li> + <li><a href="index.html">GitPython v0.2.0 Beta documentation</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright Copyright (C) 2008, 2009 Michael Trier and contributors. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.5. + </div> + </body> +</html>
\ No newline at end of file diff --git a/doc/doc_index/index.html b/doc/doc_index/index.html new file mode 100644 index 00000000..1612a9a5 --- /dev/null +++ b/doc/doc_index/index.html @@ -0,0 +1,16 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>GitPython Documentation — GitPython documentation</title> + </head> + <body> + <h3>Git Python Documentation Index</h3> + <a href="0.3/index.html" title="v0.3X">Git-Python 0.3X</a><br> + <a href="0.2/index.html" title="v0.2X">Git-Python 0.2X</a><br> + <a href="0.1/index.html" title="v0.1X"> Git-Python 0.1X</a><br> + </body> +</html>
\ No newline at end of file diff --git a/doc/conf.py b/doc/source/conf.py index 0196759d..21304eaa 100644 --- a/doc/conf.py +++ b/doc/source/conf.py @@ -20,7 +20,7 @@ import sys, os # 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('../../lib')) # General configuration # --------------------- @@ -30,7 +30,7 @@ sys.path.insert(0, os.path.abspath('../lib')) extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest'] # Add any paths that contain templates here, relative to this directory. -templates_path = ['templates'] +templates_path = ['.templates'] # The suffix of source filenames. source_suffix = '.rst' @@ -43,16 +43,16 @@ master_doc = 'index' # General information about the project. project = u'GitPython' -copyright = u'Copyright (C) 2008, 2009 Michael Trier and contributors' +copyright = u'Copyright (C) 2008, 2009 Michael Trier and contributors, 2010 Sebastian Thiel' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. -version = '0.2.0' +version = '0.3.0' # The full version, including alpha/beta/rc tags. -release = '0.2.0 Beta' +release = '0.3.0 Beta 1' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -69,7 +69,7 @@ release = '0.2.0 Beta' # List of directories, relative to source directory, that shouldn't be searched # for source files. -exclude_trees = ['_build'] +exclude_trees = ['build'] # The reST default role (used for this markup: `text`) to use for all documents. #default_role = None @@ -92,6 +92,10 @@ pygments_style = 'sphinx' # Options for HTML output # ----------------------- +html_theme_options = { + "stickysidebar": "true" +} + # The style sheet to use for HTML and HTML Help pages. A file of that name # must exist either in Sphinx' static/ path, or in one of the custom paths # given in html_static_path. @@ -116,7 +120,7 @@ html_style = 'default.css' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['static'] +html_static_path = ['.static'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. diff --git a/doc/source/index.rst b/doc/source/index.rst new file mode 100644 index 00000000..6bb8d1fe --- /dev/null +++ b/doc/source/index.rst @@ -0,0 +1,23 @@ +.. GitPython documentation master file, created by sphinx-quickstart on Sat Jan 24 11:51:01 2009. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +GitPython Documentation +======================= + +.. toctree:: + :maxdepth: 2 + + intro + whatsnew + tutorial + reference + roadmap + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + diff --git a/doc/source/intro.rst b/doc/source/intro.rst new file mode 100644 index 00000000..c96766fb --- /dev/null +++ b/doc/source/intro.rst @@ -0,0 +1,112 @@ +.. _intro_toplevel: + +================== +Overview / Install +================== + +GitPython is a python library used to interact with git repositories, high-level like git-porcelain, or low-level like git-plumbing. + +It provides abstractions of git objects for easy access of repository data, and additionally allows you to access the git repository more directly using either a pure python implementation, or the faster, but more resource intensive git command implementation. + +The object database implementation is optimized for handling large quantities of objects and large datasets, which is achieved by using low-level structures and data streaming. + +Requirements +============ + +* `Git`_ 1.7.0 or newer + It should also work with older versions, but it may be that some operations + involving remotes will not work as expected. +* `GitDB`_ - a pure python git database implementation + + * `async`_ - asynchronous task scheduling + +* `Python Nose`_ - used for running the tests +* `Mock by Michael Foord`_ used for tests. Requires version 0.5 + +.. _Git: http://git-scm.com/ +.. _Python Nose: http://code.google.com/p/python-nose/ +.. _Mock by Michael Foord: http://www.voidspace.org.uk/python/mock.html +.. _GitDB: http://pypi.python.org/pypi/gitdb +.. _async: http://pypi.python.org/pypi/async + +Installing GitPython +==================== + +Installing GitPython is easily done using +`setuptools`_. Assuming it is +installed, just run the following from the command-line: + +.. sourcecode:: none + + # easy_install GitPython + +This command will download the latest version of GitPython from the +`Python Package Index <http://pypi.python.org/pypi/GitPython>`_ and install it +to your system. More information about ``easy_install`` and pypi can be found +here: + +* `setuptools`_ +* `install setuptools <http://peak.telecommunity.com/DevCenter/EasyInstall#installation-instructions>`_ +* `pypi <http://pypi.python.org/pypi/SQLAlchemy>`_ + +.. _setuptools: http://peak.telecommunity.com/DevCenter/setuptools + +Alternatively, you can install from the distribution using the ``setup.py`` +script: + +.. sourcecode:: none + + # python setup.py install + +.. note:: In this case, you have to manually install `GitDB`_ and `async`_ as well. It would be recommended to use the :ref:`git source repository <source-code-label>` in that case. + +Getting Started +=============== + +* :ref:`tutorial-label` - This tutorial provides a walk-through of some of + the basic functionality and concepts used in GitPython. It, however, is not + exhaustive so you are encouraged to spend some time in the + :ref:`api_reference_toplevel`. + +API Reference +============= + +An organized section of the GitPthon API is at :ref:`api_reference_toplevel`. + +.. _source-code-label: + +Source Code +=========== + +GitPython's git repo is available on Gitorious and GitHub, which can be browsed at: + + * http://gitorious.org/projects/git-python/ + * http://github.com/Byron/GitPython + +and cloned using:: + + $ git clone git://gitorious.org/git-python/mainline.git git-python + $ git clone git://github.com/Byron/GitPython.git git-python + +Initialize all submodules to obtain the required dependencies with:: + + $ cd git-python + $ git submodule update --init --recursive + +Finally verify the installation by running the `nose powered <http://code.google.com/p/python-nose/>`_ unit tests:: + + $ nosetests + +Mailing List +============ +http://groups.google.com/group/git-python + +Issue Tracker +============= +http://byronimo.lighthouseapp.com/projects/51787-gitpython/milestones + +License Information +=================== +GitPython is licensed under the New BSD License. See the LICENSE file for +more information. + diff --git a/doc/source/reference.rst b/doc/source/reference.rst new file mode 100644 index 00000000..5952fe2d --- /dev/null +++ b/doc/source/reference.rst @@ -0,0 +1,146 @@ +.. _api_reference_toplevel: + +API Reference +============= + +Objects.Base +------------ + +.. automodule:: git.objects.base + :members: + :undoc-members: + +Objects.Blob +------------ + +.. automodule:: git.objects.blob + :members: + :undoc-members: + +Objects.Commit +-------------- + +.. automodule:: git.objects.commit + :members: + :undoc-members: + +Objects.Tag +----------- + +.. automodule:: git.objects.tag + :members: + :undoc-members: + +Objects.Tree +------------ + +.. automodule:: git.objects.tree + :members: + :undoc-members: + +Objects.Functions +----------------- + +.. automodule:: git.objects.fun + :members: + :undoc-members: + +Objects.Submodule +----------------- + +.. automodule:: git.objects.submodule + :members: + :undoc-members: + +Objects.Util +------------- + +.. automodule:: git.objects.util + :members: + :undoc-members: + +Index.Base +---------- + +.. automodule:: git.index.base + :members: + :undoc-members: + +Index.Functions +--------------- + +.. automodule:: git.index.fun + :members: + :undoc-members: + +Index.Types +----------- + +.. automodule:: git.index.typ + :members: + :undoc-members: + +Index.Util +------------- + +.. automodule:: git.index.util + :members: + :undoc-members: + +GitCmd +------ + +.. automodule:: git.cmd + :members: + :undoc-members: + + +Config +------ + +.. automodule:: git.config + :members: + :undoc-members: + +Diff +---- + +.. automodule:: git.diff + :members: + :undoc-members: + +Errors +------ + +.. automodule:: git.errors + :members: + :undoc-members: + + +Refs +---- + +.. automodule:: git.refs + :members: + :undoc-members: + +Remote +------ + +.. automodule:: git.remote + :members: + :undoc-members: + +Repo +---- + +.. automodule:: git.repo + :members: + :undoc-members: + +Util +---- + +.. automodule:: git.util + :members: + :undoc-members: diff --git a/doc/source/roadmap.rst b/doc/source/roadmap.rst new file mode 100644 index 00000000..a6bdc3a0 --- /dev/null +++ b/doc/source/roadmap.rst @@ -0,0 +1,6 @@ + +####### +Roadmap +####### +The full list of milestones including associated tasks can be found on lighthouse: http://byronimo.lighthouseapp.com/projects/51787-gitpython/milestones + diff --git a/doc/source/tutorial.rst b/doc/source/tutorial.rst new file mode 100644 index 00000000..033bbad4 --- /dev/null +++ b/doc/source/tutorial.rst @@ -0,0 +1,374 @@ +.. _tutorial_toplevel: + +.. highlight:: python + +.. _tutorial-label: + +================== +GitPython Tutorial +================== + +GitPython provides object model access to your git repository. This tutorial is composed of multiple sections, each of which explains a real-life usecase. + +Initialize a Repo object +************************ + +The first step is to create a ``Repo`` object to represent your repository:: + + from git import * + repo = Repo("/Users/mtrier/Development/git-python") + assert repo.bare == False + +In the above example, the directory ``/Users/mtrier/Development/git-python`` is my working repository and contains the ``.git`` directory. You can also initialize GitPython with a *bare* repository:: + + repo = Repo.create("/var/git/git-python.git") + assert repo.bare == True + +A repo object provides high-level access to your data, it allows you to create and delete heads, tags and remotes and access the configuration of the repository:: + + repo.config_reader() # get a config reader for read-only access + repo.config_writer() # get a config writer to change configuration + +Query the active branch, query untracked files or whether the repository data has been modified:: + + repo.is_dirty() + False + repo.untracked_files() + ['my_untracked_file'] + +Clone from existing repositories or initialize new empty ones:: + + cloned_repo = repo.clone("to/this/path") + new_repo = repo.init("path/for/new/repo") + +Archive the repository contents to a tar file:: + + repo.archive(open("repo.tar",'w')) + + +Object Databases +**************** +``Repo`` instances are powered by its object database instance which will be used when extracting any data, or when writing new objects. + +The type of the database determines certain performance characteristics, such as the quantity of objects that can be read per second, the resource usage when reading large data files, as well as the average memory footprint of your application. + +GitDB +===== +The GitDB is a pure-python implementation of the git object database. It is the default database to use in GitPython 0.3. Its uses less memory when handling huge files, but will be 2 to 5 times slower when extracting large quantities small of objects from densely packed repositories:: + + repo = Repo("path/to/repo", odbt=GitDB) + +GitCmdObjectDB +============== +The git command database uses persistent git-cat-file instances to read repository information. These operate very fast under all conditions, but will consume additional memory for the process itself. When extracting large files, memory usage will be much higher than the one of the ``GitDB``:: + + repo = Repo("path/to/repo", odbt=GitCmdObjectDB) + +Examining References +******************** + +References are the tips of your commit graph from which you can easily examine the history of your project:: + + heads = repo.heads + master = heads.master # lists can be accessed by name for convenience + master.commit # the commit pointed to by head called master + master.rename("new_name") # rename heads + +Tags are (usually immutable) references to a commit and/or a tag object:: + + tags = repo.tags + tagref = tags[0] + tagref.tag # tags may have tag objects carrying additional information + tagref.commit # but they always point to commits + repo.delete_tag(tagref) # delete or + repo.create_tag("my_tag") # create tags using the repo for convenience + +A symbolic reference is a special case of a reference as it points to another reference instead of a commit:: + + 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 + +Modifying References +******************** +You can easily create and delete reference types or modify where they point to:: + + repo.delete_head('master') # delete an existing head + master = repo.create_head('master') # create a new one + master.commit = 'HEAD~10' # set branch to another commit without changing index or working tree + +Create or delete tags the same way except you may not change them afterwards:: + + new_tag = repo.create_tag('my_tag', 'my message') + repo.delete_tag(new_tag) + +Change the symbolic reference to switch branches cheaply ( without adjusting the index or the working copy ):: + + new_branch = repo.create_head('new_branch') + repo.head.reference = new_branch + +Understanding Objects +********************* +An Object is anything storable in git's object database. Objects contain information about their type, their uncompressed size as well as the actual data. Each object is uniquely identified by a binary SHA1 hash, being 20 bytes in size. + +Git only knows 4 distinct object types being Blobs, Trees, Commits and Tags. + +In Git-Python, all objects can be accessed through their common base, compared and hashed. They are usually not instantiated directly, but through references or specialized repository functions:: + + hc = repo.head.commit + hct = hc.tree + hc != hct + hc != repo.tags[0] + hc == repo.head.reference.commit + +Common fields are:: + + hct.type + 'tree' + hct.size + 166 + hct.hexsha + 'a95eeb2a7082212c197cabbf2539185ec74ed0e8' + hct.binsha + 'binary 20 byte sha1' + +Index Objects are objects that can be put into git's index. These objects are trees, blobs and submodules which additionally know about their path in the filesystem as well as their mode:: + + hct.path # root tree has no path + '' + hct.trees[0].path # the first subdirectory has one though + 'dir' + htc.mode # trees have the mode of a linux directory + 040000 + '%o' % htc.blobs[0].mode # blobs have a specific mode though comparable to a standard linux fs + 100644 + +Access blob data (or any object data) directly or using streams:: + + htc.blobs[0].data_stream.read() # stream object to read data from + htc.blobs[0].stream_data(open("blob_data", "w")) # write data to given stream + + +The Commit object +***************** + +Commit objects contain information about a specific commit. Obtain commits using references as done in `Examining References`_ or as follows. + +Obtain commits at the specified revision:: + + repo.commit('master') + repo.commit('v0.1') + repo.commit('HEAD~10') + +Iterate 100 commits:: + + repo.iter_commits('master', max_count=100) + +If you need paging, you can specify a number of commits to skip:: + + repo.iter_commits('master', max_count=10, skip=20) + +The above will return commits 21-30 from the commit list.:: + + headcommit = repo.head.commit + + headcommit.hexsha + '207c0c4418115df0d30820ab1a9acd2ea4bf4431' + + headcommit.parents + (<git.Commit "a91c45eee0b41bf3cdaad3418ca3850664c4a4b4">,) + + headcommit.tree + <git.Tree "563413aedbeda425d8d9dcbb744247d0c3e8a0ac"> + + headcommit.author + <git.Actor "Michael Trier <mtrier@gmail.com>"> + + headcommit.authored_date # seconds since epoch + 1256291446 + + headcommit.committer + <git.Actor "Michael Trier <mtrier@gmail.com>"> + + headcommit.committed_date + 1256291446 + + headcommit.message + 'cleaned up a lot of test information. Fixed escaping so it works with + subprocess.' + +Note: date time is represented in a ``seconds since epoch`` format. Conversion to human readable form can be accomplished with the various `time module <http://docs.python.org/library/time.html>`_ methods:: + + import time + time.asctime(time.gmtime(headcommit.committed_date)) + 'Wed May 7 05:56:02 2008' + + time.strftime("%a, %d %b %Y %H:%M", time.gmtime(headcommit.committed_date)) + 'Wed, 7 May 2008 05:56' + +You can traverse a commit's ancestry by chaining calls to ``parents``:: + + headcommit.parents[0].parents[0].parents[0] + +The above corresponds to ``master^^^`` or ``master~3`` in git parlance. + +The Tree object +*************** + +A tree records pointers to the contents of a directory. Let's say you want the root tree of the latest commit on the master branch:: + + tree = repo.heads.master.commit.tree + <git.Tree "a006b5b1a8115185a228b7514cdcd46fed90dc92"> + + tree.hexsha + 'a006b5b1a8115185a228b7514cdcd46fed90dc92' + +Once you have a tree, you can get the contents:: + + tree.trees # trees are subdirectories + [<git.Tree "f7eb5df2e465ab621b1db3f5714850d6732cfed2">] + + tree.blobs # blobs are files + [<git.Blob "a871e79d59cf8488cac4af0c8f990b7a989e2b53">, + <git.Blob "3594e94c04db171e2767224db355f514b13715c5">, + <git.Blob "e79b05161e4836e5fbf197aeb52515753e8d6ab6">, + <git.Blob "94954abda49de8615a048f8d2e64b5de848e27a1">] + +Its useful to know that a tree behaves like a list with the ability to query entries by name:: + + tree[0] == tree['dir'] # access by index and by sub-path + <git.Tree "f7eb5df2e465ab621b1db3f5714850d6732cfed2"> + for entry in tree: do_something_with(entry) + + blob = tree[0][0] + blob.name + 'file' + blob.path + 'dir/file' + blob.abspath + '/Users/mtrier/Development/git-python/dir/file' + >>>tree['dir/file'].binsha == blob.binsha + +There is a convenience method that allows you to get a named sub-object from a tree with a syntax similar to how paths are written in an unix system:: + + tree/"lib" + <git.Tree "c1c7214dde86f76bc3e18806ac1f47c38b2b7a30"> + tree/"dir/file" == blob + +You can also get a tree directly from the repository if you know its name:: + + repo.tree() + <git.Tree "master"> + + repo.tree("c1c7214dde86f76bc3e18806ac1f47c38b2b7a30") + <git.Tree "c1c7214dde86f76bc3e18806ac1f47c38b2b7a30"> + repo.tree('0.1.6') + <git.Tree "6825a94104164d9f0f5632607bebd2a32a3579e5"> + +As trees only allow direct access to their direct entries, use the traverse method to obtain an iterator to traverse entries recursively:: + + tree.traverse() + <generator object at 0x7f6598bd65a8> + for entry in tree.traverse(): do_something_with(entry) + + +The Index Object +**************** +The git index is the stage containing changes to be written with the next commit or where merges finally have to take place. You may freely access and manipulate this information using the IndexFile Object:: + + index = repo.index + +Access objects and add/remove entries. Commit the changes:: + + for stage, blob in index.iter_blobs(): do_something(...) + # Access blob objects + for (path, stage), entry in index.entries.iteritems: pass + # Access the entries directly + index.add(['my_new_file']) # add a new file to the index + index.remove(['dir/existing_file']) + new_commit = index.commit("my commit message") + +Create new indices from other trees or as result of a merge. Write that result to a new index file:: + + tmp_index = Index.from_tree(repo, 'HEAD~1') # load a tree into a temporary index + merge_index = Index.from_tree(repo, 'base', 'HEAD', 'some_branch') # merge two trees three-way + merge_index.write("merged_index") + +Handling Remotes +**************** + +Remotes are used as alias for a foreign repository to ease pushing to and fetching from them:: + + test_remote = repo.create_remote('test', 'git@server:repo.git') + repo.delete_remote(test_remote) # create and delete remotes + origin = repo.remotes.origin # get default remote by name + origin.refs # local remote references + o = origin.rename('new_origin') # rename remotes + o.fetch() # fetch, pull and push from and to the remote + o.pull() + o.push() + +You can easily access configuration information for a remote by accessing options as if they where attributes:: + + o.url + 'git@server:dummy_repo.git' + +Change configuration for a specific remote only:: + + o.config_writer.set("pushurl", "other_url") + +Obtaining Diff Information +************************** + +Diffs can generally be obtained by subclasses of ``Diffable`` as they provide the ``diff`` method. This operation yields a DiffIndex allowing you to easily access diff information about paths. + +Diffs can be made between the Index and Trees, Index and the working tree, trees and trees as well as trees and the working copy. If commits are involved, their tree will be used implicitly:: + + hcommit = repo.head.commit + idiff = hcommit.diff() # diff tree against index + tdiff = hcommit.diff('HEAD~1') # diff tree against previous tree + wdiff = hcommit.diff(None) # diff tree against working tree + + index = repo.index + index.diff() # diff index against itself yielding empty diff + index.diff(None) # diff index against working copy + index.diff('HEAD') # diff index against current HEAD tree + +The item returned is a DiffIndex which is essentially a list of Diff objects. It provides additional filtering to ease finding what you might be looking for:: + + for diff_added in wdiff.iter_change_type('A'): do_something_with(diff_added) + +Switching Branches +****************** +To switch between branches, you effectively need to point your HEAD to the new branch head and reset your index and working copy to match. A simple manual way to do it is the following one:: + + repo.head.reference = repo.heads.other_branch + repo.head.reset(index=True, working_tree=True) + +The previous approach would brutally overwrite the user's changes in the working copy and index though and is less sophisticated than a git-checkout for instance which generally prevents you from destroying your work. Use the safer approach as follows:: + + repo.heads.master.checkout() # checkout the branch using git-checkout + repo.heads.other_branch.checkout() + +Using git directly +****************** +In case you are missing functionality as it has not been wrapped, you may conveniently use the git command directly. It is owned by each repository instance:: + + git = repo.git + git.checkout('head', b="my_new_branch") # default command + git.for_each_ref() # '-' becomes '_' when calling it + +The return value will by default be a string of the standard output channel produced by the command. + +Keyword arguments translate to short and long keyword arguments on the commandline. +The special notion ``git.command(flag=True)`` will create a flag without value like ``command --flag``. + +If ``None`` is found in the arguments, it will be dropped silently. Lists and tuples passed as arguments will be unpacked recursively to individual arguments. Objects are converted to strings using the str(...) function. + +And even more ... +***************** + +There is more functionality in there, like the ability to archive repositories, get stats and logs, blame, and probably a few other things that were not mentioned here. + +Check the unit tests for an in-depth introduction on how each function is supposed to be used. + diff --git a/doc/source/whatsnew.rst b/doc/source/whatsnew.rst new file mode 100644 index 00000000..7a5ef53d --- /dev/null +++ b/doc/source/whatsnew.rst @@ -0,0 +1,59 @@ + +################ +Whats New in 0.3 +################ +GitPython 0.3 is the first step in creating a hybrid which uses a pure python implementations for all simple git features which can be implemented without significant performance penalties. Everything else is still performed using the git command, which is nicely integrated and easy to use. + +Its biggest strength, being the support for all git features through the git command itself, is a weakness as well considering the possibly vast amount of times the git command is being started up. Depending on the actual command being performed, the git repository will be initialized on many of these invocations, causing additional overhead for possibly tiny operations. + +Keeping as many major operations in the python world will result in improved caching benefits as certain data structures just have to be initialized once and can be reused multiple times. This mode of operation may improve performance when altering the git database on a low level, and is clearly beneficial on operating systems where command invocations are very slow. + +**************** +Object Databases +**************** +An object database provides a simple interface to query object information or to write new object data. Objects are generally identified by their 20 byte binary sha1 value during query. + +GitPython uses the ``gitdb`` project to provide a pure-python implementation of the git database, which includes reading and writing loose objects, reading pack files and handling alternate repositories. + +The great thing about this is that ``Repo`` objects can use any object database, hence it easily supports different implementations with different performance characteristics. If you are thinking in extremes, you can implement your own database representation, which may be more efficient for what you want to do specifically, like handling big files more efficiently. + +************************ +Reduced Memory Footprint +************************ +Objects, such as commits, tags, trees and blobs now use 20 byte sha1 signatures internally, reducing their memory demands by 20 bytes per object, allowing you to keep more objects in memory at the same time. + +The internal caches of tree objects were improved to use less memory as well. + +################## +Upgrading from 0.2 +################## +GitPython 0.2 essentially behaves like GitPython 0.3 with a Repository using the ``GitCmdObjectDB`` instead of the ``GitDB`` as object database backend. Additionally it can be used more conveniently through implicit conversions and provides a feature set strikingly similar to 0.3. + +************************** +Why you should not upgrade +************************** +GitPython 0.3 in most cases will not run faster than GitPython 0.2, the opposite might be the case at it uses the pure python implementation by default. +There have been a few renames which will need additional adjustments in your code. + +Generally, if you only read git repositories, version 0.2 is sufficient and very well performing. + +********************** +Why you should upgrade +********************** +GitPython 0.2 has reached its end of line, and it is unlikely to receive more than contributed patches. 0.3 is the main development branch which will lead into the future. + +GitPython 0.3 provides memory usage optimization and is very flexible in the way it uses to access the object database. With minimal effort, 0.3 will be running as fast as 0.2. It marks the first step of more versions to come, and will improve over time. + +GitPython 0.3 is especially suitable for everyone who needs not only read, but also write access to a git repository. It is optimized to keep the memory consumption as low as possible, especially when handling large data sets. GitPython 0.3 operates on streams, not on possibly huge chunks of data. + + +************** +Guided Upgrade +************** +This guide should help to make the upgrade as painless as possible, hence it points out where to start, and what to look out for. + +* Have a look at the CHANGES log file and read all important changes about 0.3 for an overview. +* Start applying the renames, generally the ``utils`` modules are now called ``util``, ``errors`` is called ``exc``. +* Search for occurrences of the ``sha`` property of object instances. A similar value can be obtained through the new ``hexsha`` property. The native sha1 value is the ``binsha`` though. +* Search for code which instantiates objects directly. Their initializer now requires a 20 byte binary Sha1, rev-specs cannot be used anymore. For a similar effect, either convert your hexadecimal shas to binary shas beforehand ( ``binascii.unhexlify`` for instance ), or use higher level functions such as ``Object.new``, ``Repo.commit`` or ``Repo.tree``. The latter ones takes rev-specs and hexadecimal sha1 hashes. + diff --git a/lib/git/__init__.py b/lib/git/__init__.py index 7860a3c1..5ebeaa7d 100644 --- a/lib/git/__init__.py +++ b/lib/git/__init__.py @@ -28,12 +28,12 @@ from git.config import GitConfigParser from git.objects import * from git.refs import * from git.diff import * -from git.errors import * +from git.exc import * from git.cmd import Git from git.repo import Repo from git.remote import * from git.index import * -from git.utils import ( +from git.util import ( LockFile, BlockingLockFile, Stats diff --git a/lib/git/cmd.py b/lib/git/cmd.py index d0f2a19e..cd848e05 100644 --- a/lib/git/cmd.py +++ b/lib/git/cmd.py @@ -5,8 +5,8 @@ # the BSD License: http://www.opensource.org/licenses/bsd-license.php import os, sys -from utils import * -from errors import GitCommandError +from util import * +from exc import GitCommandError from subprocess import ( call, @@ -272,7 +272,7 @@ class Git(object): This merely is a workaround as data will be copied from the output pipe to the given output stream directly. - :param **subprocess_kwargs: + :param subprocess_kwargs: Keyword arguments to be passed to subprocess.Popen. Please note that some of the valid kwargs are already set by this method, the ones you specify may not be the same ones. diff --git a/lib/git/config.py b/lib/git/config.py index e4af57f0..92d64aea 100644 --- a/lib/git/config.py +++ b/lib/git/config.py @@ -13,7 +13,7 @@ import inspect import cStringIO from git.odict import OrderedDict -from git.utils import LockFile +from git.util import LockFile __all__ = ('GitConfigParser', ) diff --git a/lib/git/diff.py b/lib/git/diff.py index 79a0c3c1..788bf238 100644 --- a/lib/git/diff.py +++ b/lib/git/diff.py @@ -6,8 +6,8 @@ import re from objects.blob import Blob -from objects.utils import mode_str_to_int -from errors import GitCommandError +from objects.util import mode_str_to_int +from exc import GitCommandError from gitdb.util import hex_to_bin diff --git a/lib/git/errors.py b/lib/git/exc.py index 93919d5e..93919d5e 100644 --- a/lib/git/errors.py +++ b/lib/git/exc.py diff --git a/lib/git/ext/gitdb b/lib/git/ext/gitdb -Subproject c265c97f9130d2225b923b427736796c0a0d957 +Subproject 7562fdd96ab995f6c25fc102ef40a285283c844 diff --git a/lib/git/index/base.py b/lib/git/index/base.py index 03da52b7..4b3197a2 100644 --- a/lib/git/index/base.py +++ b/lib/git/index/base.py @@ -4,7 +4,7 @@ # 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. """ +manipulations such as querying and merging.""" import tempfile import os import sys @@ -36,7 +36,7 @@ from util import ( import git.objects import git.diff as diff -from git.errors import ( +from git.exc import ( GitCommandError, CheckoutError ) @@ -48,9 +48,9 @@ from git.objects import ( Commit, ) -from git.objects.utils import Serializable +from git.objects.util import Serializable -from git.utils import ( +from git.util import ( IndexFileSHA1Writer, LazyMixin, LockedFD, @@ -75,22 +75,26 @@ __all__ = ( 'IndexFile', 'CheckoutError' ) class IndexFile(LazyMixin, diff.Diffable, Serializable): - """Implements an Index that can be manipulated using a native implementation in + """ + Implements an Index that can be manipulated using a native implementation in order to save git command function calls wherever possible. - + It provides custom merging facilities allowing to merge without actually changing your index or your working tree. This way you can perform own test-merges based on the index only without having to deal with the working copy. This is useful in case of partial working trees. ``Entries`` + The index contains an entries dict whose keys are tuples of type IndexEntry to facilitate access. You may read the entries dict or manipulate it using IndexEntry instance, i.e.:: + index.entries[index.entry_key(index_entry_instance)] = index_entry_instance - Otherwise changes to it will be lost when changing the index using its methods. - """ + + Make sure you use index.write() once you are done manipulating the index directly + before operating on it using the git command""" __slots__ = ("repo", "version", "entries", "_extension_data", "_file_path") _VERSION = 2 # latest version we support S_IFGITLINK = 0160000 # a submodule @@ -250,7 +254,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable): :param repo: The repository treeish are located in. - :param *tree_sha: + :param tree_sha: 20 byte or 40 byte tree sha or tree objects :return: @@ -276,7 +280,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable): :param repo: The repository treeish are located in. - :param *treeish: + :param treeish: One, two or three Tree Objects, Commits or 40 byte hexshas. The result changes according to the amount of trees. If 1 Tree is given, it will just be read into a new index @@ -287,7 +291,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable): being the common ancestor of tree 2 and tree 3. Tree 2 is the 'current' tree, tree 3 is the 'other' one - :param **kwargs: + :param kwargs: Additional arguments passed to git-read-tree :return: @@ -790,7 +794,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable): removing the respective file. This may fail if there are uncommited changes in it. - :param **kwargs: + :param kwargs: Additional keyword arguments to be passed to git-rm, such as 'r' to allow recurive removal of @@ -828,7 +832,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable): :param skip_errors: If True, errors such as ones resulting from missing source files will be skpped. - :param **kwargs: + :param kwargs: Additional arguments you would like to pass to git-mv, such as dry_run or force. @@ -924,7 +928,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable): explicit paths are given. Otherwise progress information will be send prior and after a file has been checked out - :param **kwargs: + :param kwargs: Additional arguments to be pasesd to git-checkout-index :return: diff --git a/lib/git/index/fun.py b/lib/git/index/fun.py index ef950761..fac559c5 100644 --- a/lib/git/index/fun.py +++ b/lib/git/index/fun.py @@ -5,8 +5,8 @@ more versatile from stat import S_IFDIR from cStringIO import StringIO -from git.utils import IndexFileSHA1Writer -from git.errors import UnmergedEntriesError +from git.util import IndexFileSHA1Writer +from git.exc import UnmergedEntriesError from git.objects.fun import ( tree_to_stream, traverse_tree_recursive, @@ -51,8 +51,10 @@ def write_cache(entries, stream, extension_data=None, ShaStreamCls=IndexFileSHA1 :param entries: **sorted** list of entries :param stream: stream to wrap into the AdapterStreamCls - it is used for final output. + :param ShaStreamCls: Type to use when writing to the stream. It produces a sha while writing to it, before the data is passed on to the wrapped stream + :param extension_data: any kind of data to write as a trailer, it must begin a 4 byte identifier, followed by its size ( 4 bytes )""" # wrap the stream into a compatible writer @@ -103,7 +105,7 @@ def read_header(stream): def entry_key(*entry): """:return: Key suitable to be used for the index.entries dictionary - :param *entry: One instance of type BaseIndexEntry or the path and the stage""" + :param entry: One instance of type BaseIndexEntry or the path and the stage""" if len(entry) == 1: return (entry[0].path, entry[0].stage) else: diff --git a/lib/git/index/typ.py b/lib/git/index/typ.py index 7654b402..3a01cd65 100644 --- a/lib/git/index/typ.py +++ b/lib/git/index/typ.py @@ -78,10 +78,10 @@ class BaseIndexEntry(tuple): def stage(self): """Stage of the entry, either: - 0 = default stage - 1 = stage before a merge or common ancestor entry in case of a 3 way merge - 2 = stage of entries from the 'left' side of the merge - 3 = stage of entries from the right side of the merge + * 0 = default stage + * 1 = stage before a merge or common ancestor entry in case of a 3 way merge + * 2 = stage of entries from the 'left' side of the merge + * 3 = stage of entries from the right side of the merge :note: For more information, see http://www.kernel.org/pub/software/scm/git/docs/git-read-tree.html """ @@ -112,10 +112,10 @@ class IndexEntry(BaseIndexEntry): See the properties for a mapping between names and tuple indices. """ @property def ctime(self): - """:return: - Tuple(int_time_seconds_since_epoch, int_nano_seconds) of the - file's creation time """ + :return: + Tuple(int_time_seconds_since_epoch, int_nano_seconds) of the + file's creation time""" return unpack(">LL", self[4]) @property diff --git a/lib/git/objects/__init__.py b/lib/git/objects/__init__.py index 209d8b51..85c7e38c 100644 --- a/lib/git/objects/__init__.py +++ b/lib/git/objects/__init__.py @@ -8,7 +8,7 @@ from blob import * from tree import * from commit import * from submodule import * -from utils import Actor +from util import Actor __all__ = [ name for name, obj in locals().items() if not (name.startswith('_') or inspect.ismodule(obj)) ]
\ No newline at end of file diff --git a/lib/git/objects/base.py b/lib/git/objects/base.py index 97b7898c..d4a46788 100644 --- a/lib/git/objects/base.py +++ b/lib/git/objects/base.py @@ -3,8 +3,8 @@ # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php -from git.utils import LazyMixin, join_path_native, stream_copy -from utils import get_object_type_by_name +from git.util import LazyMixin, join_path_native, stream_copy +from util import get_object_type_by_name from gitdb.util import ( hex_to_bin, bin_to_hex, diff --git a/lib/git/objects/blob.py b/lib/git/objects/blob.py index 8263e9a2..32f8c61c 100644 --- a/lib/git/objects/blob.py +++ b/lib/git/objects/blob.py @@ -14,21 +14,12 @@ class Blob(base.IndexObject): DEFAULT_MIME_TYPE = "text/plain" type = "blob" - __slots__ = "data" - - def _set_cache_(self, attr): - if attr == "data": - ostream = self.repo.odb.stream(self.binsha) - self.size = ostream.size - self.data = ostream.read() - # assert ostream.type == self.type, _assertion_msg_format % (self.binsha, ostream.type, self.type) - else: - super(Blob, self)._set_cache_(attr) - # END handle data + __slots__ = tuple() @property def mime_type(self): - """ :return:String describing the mime type of this file (based on the filename) + """ + :return: String describing the mime type of this file (based on the filename) :note: Defaults to 'text/plain' in case the actual file type is unknown. """ guesses = None if self.path: diff --git a/lib/git/objects/commit.py b/lib/git/objects/commit.py index f88bb0e8..132d794b 100644 --- a/lib/git/objects/commit.py +++ b/lib/git/objects/commit.py @@ -4,7 +4,7 @@ # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php -from git.utils import ( +from git.util import ( Iterable, Stats, ) @@ -17,7 +17,7 @@ import base from gitdb.util import ( hex_to_bin ) -from utils import ( +from util import ( Traversable, Serializable, get_user_id, @@ -182,11 +182,11 @@ class Commit(base.Object, Iterable, Diffable, Traversable, Serializable): def iter_parents(self, paths='', **kwargs): """Iterate _all_ parents of this commit. + :param paths: Optional path or list of paths limiting the Commits to those that contain at least one of the paths :param kwargs: All arguments allowed by git-rev-list - :return: Iterator yielding Commit objects which are parents of self """ # skip ourselves skip = kwargs.get("skip", 1) diff --git a/lib/git/objects/tag.py b/lib/git/objects/tag.py index 702eae35..ea480fc2 100644 --- a/lib/git/objects/tag.py +++ b/lib/git/objects/tag.py @@ -6,7 +6,7 @@ """ Module containing all object based types. """ import base from gitdb.util import hex_to_bin -from utils import ( +from util import ( get_object_type_by_name, parse_actor_and_date ) diff --git a/lib/git/objects/tree.py b/lib/git/objects/tree.py index 056d3da9..d6e16a31 100644 --- a/lib/git/objects/tree.py +++ b/lib/git/objects/tree.py @@ -3,7 +3,7 @@ # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php -import utils +import util from base import IndexObject from blob import Blob @@ -23,8 +23,8 @@ from gitdb.util import ( __all__ = ("TreeModifier", "Tree") class TreeModifier(object): - """A utility class providing methods to alter the underlying cache in a list-like - fashion. + """A utility class providing methods to alter the underlying cache in a list-like fashion. + Once all adjustments are complete, the _cache, which really is a refernce to the cache of a tree, will be sorted. Assuring it will be in a serializable state""" __slots__ = '_cache' @@ -57,6 +57,7 @@ class TreeModifier(object): exists, nothing will be done, but a ValueError will be raised if the sha and mode of the existing item do not match the one you add, unless force is True + :param sha: The 20 or 40 byte sha of the item to add :param mode: int representing the stat compatible mode of the item :param force: If True, an item with your name and information will overwrite @@ -100,7 +101,7 @@ class TreeModifier(object): #} END mutators -class Tree(IndexObject, diff.Diffable, utils.Traversable, utils.Serializable): +class Tree(IndexObject, diff.Diffable, util.Traversable, util.Serializable): """Tree objects represent an ordered list of Blobs and other Trees. ``Tree as a list``:: @@ -203,16 +204,17 @@ class Tree(IndexObject, diff.Diffable, utils.Traversable, utils.Serializable): @property def cache(self): - """:return: An object allowing to modify the internal cache. This can be used - to change the tree's contents. When done, make sure you call ``set_done`` - on the tree modifier, or serialization behaviour will be incorrect. - See the ``TreeModifier`` for more information on how to alter the cache""" + """ + :return: An object allowing to modify the internal cache. This can be used + to change the tree's contents. When done, make sure you call ``set_done`` + on the tree modifier, or serialization behaviour will be incorrect. + See the ``TreeModifier`` for more information on how to alter the cache""" return TreeModifier(self._cache) def traverse( self, predicate = lambda i,d: True, prune = lambda i,d: False, depth = -1, branch_first=True, visit_once = False, ignore_self=1 ): - """For documentation, see utils.Traversable.traverse + """For documentation, see util.Traversable.traverse Trees are set to visit_once = False to gain more performance in the traversal""" return super(Tree, self).traverse(predicate, prune, depth, branch_first, visit_once, ignore_self) diff --git a/lib/git/objects/utils.py b/lib/git/objects/util.py index c0ddd6e6..fd648f09 100644 --- a/lib/git/objects/utils.py +++ b/lib/git/objects/util.py @@ -103,15 +103,15 @@ def verify_utctz(offset): def parse_date(string_date): """ Parse the given date as one of the following + * Git internal format: timestamp offset * RFC 2822: Thu, 07 Apr 2005 22:13:13 +0200. * ISO 8601 2005-04-07T22:13:13 - The T can be a space as well + The T can be a space as well - :return: Tuple(int(timestamp), int(offset), both in seconds since epoch + :return: Tuple(int(timestamp), int(offset)), both in seconds since epoch :raise ValueError: If the format could not be understood - :note: Date can also be YYYY.MM.DD, MM/DD/YYYY and DD.MM.YYYY - """ + :note: Date can also be YYYY.MM.DD, MM/DD/YYYY and DD.MM.YYYY""" # git time try: if string_date.count(' ') == 1 and string_date.rfind(':') == -1: diff --git a/lib/git/refs.py b/lib/git/refs.py index 8258ca8d..343a0afb 100644 --- a/lib/git/refs.py +++ b/lib/git/refs.py @@ -10,8 +10,8 @@ from objects import ( Object, Commit ) -from objects.utils import get_object_type_by_name -from utils import ( +from objects.util import get_object_type_by_name +from util import ( LazyMixin, Iterable, join_path, @@ -64,7 +64,8 @@ class SymbolicReference(object): @property def name(self): - """:return: + """ + :return: In case of symbolic references, the shortest assumable name is the path itself.""" return self.path @@ -244,7 +245,8 @@ class SymbolicReference(object): @property def is_detached(self): - """:return: + """ + :return: True if we are a detached reference, hence we point to a specific commit instead to another reference""" try: @@ -256,8 +258,9 @@ class SymbolicReference(object): @classmethod def to_full_path(cls, path): - """:return: string with a full path name which can be used to initialize - a Reference instance, for instance by using ``Reference.from_path``""" + """ + :return: string with a full path name which can be used to initialize + a Reference instance, for instance by using ``Reference.from_path``""" if isinstance(path, SymbolicReference): path = path.path full_ref_path = path @@ -369,6 +372,7 @@ class SymbolicReference(object): :raise OSError: If a (Symbolic)Reference with the same name but different contents already exists. + :note: This does not alter the current HEAD, index or Working Tree""" return cls._create(repo, path, False, reference, force) @@ -563,17 +567,21 @@ class Reference(SymbolicReference, LazyMixin, Iterable): @classmethod def create(cls, repo, path, commit='HEAD', force=False ): """Create a new reference. + :param repo: Repository to create the reference in :param path: The relative path of the reference, i.e. 'new_branch' or feature/feature1. The path prefix 'refs/' is implied if not given explicitly + :param commit: Commit to which the new reference should point, defaults to the current HEAD + :param force: if True, force creation even if a reference with that name already exists. Raise OSError otherwise + :return: Newly created Reference :note: This does not alter the current HEAD, index or Working Tree""" @@ -666,15 +674,18 @@ class Head(Reference): :param path: The name or path of the head, i.e. 'new_branch' or feature/feature1. The prefix refs/heads is implied. + :param commit: Commit to which the new head should point, defaults to the current HEAD + :param force: if True, force creation even if branch with that name already exists. - :param **kwargs: + :param kwargs: Additional keyword arguments to be passed to git-branch, i.e. track, no-track, l + :return: Newly created Head :note: This does not alter the current HEAD, index or Working Tree""" if cls is not Head: @@ -734,7 +745,7 @@ class Head(Reference): If True, changes to the index and the working tree will be discarded. If False, GitCommandError will be raised in that situation. - :param **kwargs: + :param kwargs: Additional keyword arguments to be passed to git checkout, i.e. b='new_branch' to create a new branch at the given spot. @@ -818,7 +829,7 @@ class TagReference(Reference): :param force: If True, to force creation of a tag even though that tag already exists. - :param **kwargs: + :param kwargs: Additional keyword arguments to be passed to git-tag :return: A new TagReference""" diff --git a/lib/git/remote.py b/lib/git/remote.py index 9c46a027..1598e55a 100644 --- a/lib/git/remote.py +++ b/lib/git/remote.py @@ -5,10 +5,10 @@ # the BSD License: http://www.opensource.org/licenses/bsd-license.php """Module implementing a remote object allowing easy access to git remotes""" -from errors import GitCommandError +from exc import GitCommandError from objects import Commit -from git.utils import ( +from git.util import ( LazyMixin, Iterable, IterableList @@ -52,8 +52,10 @@ class _SectionConstraint(object): class RemoteProgress(object): - """Handler providing an interface to parse progress information emitted by git-push - and git-fetch and to dispatch callbacks allowing subclasses to react to the progress.""" + """ + Handler providing an interface to parse progress information emitted by git-push + and git-fetch and to dispatch callbacks allowing subclasses to react to the progress. + """ BEGIN, END, COUNTING, COMPRESSING, WRITING = [ 1 << x for x in range(5) ] STAGE_MASK = BEGIN|END OP_MASK = COUNTING|COMPRESSING|WRITING @@ -168,7 +170,8 @@ class RemoteProgress(object): class PushInfo(object): - """Carries information about the result of a push operation of a single head:: + """ + Carries information about the result of a push operation of a single head:: info = remote.push()[0] info.flags # bitflags providing more information about the result @@ -179,7 +182,8 @@ class PushInfo(object): # the remote_ref_string. It can be a TagReference as well. info.old_commit # commit at which the remote_ref was standing before we pushed # it to local_ref.commit. Will be None if an error was indicated - info.summary # summary line providing human readable english text about the push""" + info.summary # summary line providing human readable english text about the push + """ __slots__ = ('local_ref', 'remote_ref_string', 'flags', 'old_commit', '_remote', 'summary') NEW_TAG, NEW_HEAD, NO_MATCH, REJECTED, REMOTE_REJECTED, REMOTE_FAILURE, DELETED, \ @@ -201,7 +205,8 @@ class PushInfo(object): @property def remote_ref(self): - """:return: + """ + :return: Remote Reference or TagReference in the local repository corresponding to the remote_ref_string kept in this instance.""" # translate heads to a local remote, tags stay as they are @@ -266,7 +271,8 @@ class PushInfo(object): class FetchInfo(object): - """Carries information about the results of a fetch operation of a single head:: + """ + Carries information about the results of a fetch operation of a single head:: info = remote.fetch()[0] info.ref # Symbolic Reference or RemoteReference to the changed @@ -276,7 +282,8 @@ class FetchInfo(object): # is 0 if ref is SymbolicReference info.note # additional notes given by git-fetch intended for the user info.old_commit # if info.flags & info.FORCED_UPDATE|info.FAST_FORWARD, - # field is set to the previous location of ref, otherwise None""" + # field is set to the previous location of ref, otherwise None + """ __slots__ = ('ref','old_commit', 'flags', 'note') NEW_TAG, NEW_HEAD, HEAD_UPTODATE, TAG_UPDATE, REJECTED, FORCED_UPDATE, \ @@ -501,7 +508,7 @@ class Remote(LazyMixin, Iterable): :param repo: Repository instance that is to receive the new remote :param name: Desired name of the remote :param url: URL which corresponds to the remote's name - :param **kwargs: + :param kwargs: Additional arguments to be passed to the git-remote add command :return: New Remote instance @@ -644,7 +651,7 @@ class Remote(LazyMixin, Iterable): Taken from the git manual :param progress: See 'push' method - :param **kwargs: Additional arguments to be passed to git-fetch + :param kwargs: Additional arguments to be passed to git-fetch :return: IterableList(FetchInfo, ...) list of FetchInfo instances providing detailed information about the fetch results @@ -675,7 +682,7 @@ class Remote(LazyMixin, Iterable): progress information until the method returns. If None, progress information will be discarded - :param **kwargs: Additional arguments to be passed to git-push + :param kwargs: Additional arguments to be passed to git-push :return: IterableList(PushInfo, ...) iterable list of PushInfo instances, each one informing about an individual head which had been updated on the remote diff --git a/lib/git/repo.py b/lib/git/repo.py index 9b25653f..d9b943cd 100644 --- a/lib/git/repo.py +++ b/lib/git/repo.py @@ -4,7 +4,7 @@ # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php -from errors import InvalidGitRepositoryError, NoSuchPathError +from exc import InvalidGitRepositoryError, NoSuchPathError from cmd import Git from objects import Actor from refs import * @@ -669,7 +669,12 @@ class Repo(object): path = prev_path # END reset previous working dir # END bad windows handling - return Repo(path, odbt = odbt) + + # our git command could have a different working dir than our actual + # environment, hence we prepend its working dir if required + if not os.path.isabs(path) and self.git.working_dir: + path = os.path.join(self.git._working_dir, path) + return Repo(os.path.abspath(path), odbt = odbt) def archive(self, ostream, treeish=None, prefix=None, **kwargs): diff --git a/lib/git/utils.py b/lib/git/util.py index e49fcc2a..54c3414e 100644 --- a/lib/git/utils.py +++ b/lib/git/util.py @@ -269,7 +269,8 @@ class BlockingLockFile(LockFile): class IterableList(list): - """List of iterable objects allowing to query an object by id or by named index:: + """ + List of iterable objects allowing to query an object by id or by named index:: heads = repo.heads heads.master @@ -317,11 +318,13 @@ class Iterable(object): @classmethod def list_items(cls, repo, *args, **kwargs): - """Find all items of this type - subclasses can specify args and kwargs differently. + """ + Find all items of this type - subclasses can specify args and kwargs differently. If no args are given, subclasses are obliged to return all items if no additional arguments arg given. - :note: Favor the iter_items method as it will + :note: Favor the iter_items method as it will + :return:list(Item,...) list of item instances""" out_list = IterableList( cls._id_attribute_ ) out_list.extend(cls.iter_items(repo, *args, **kwargs)) @@ -1,3 +1,4 @@ +#!/usr/bin/env python try: from setuptools import setup, find_packages except ImportError: @@ -54,22 +55,15 @@ setup(name = "GitPython", cmdclass={'build_py': build_py, 'sdist': sdist}, version = VERSION, description = "Python Git Library", - author = "Michael Trier", - author_email = "mtrier@gmail.com", + author = "Sebastian Thiel, Michael Trier", + author_email = "byronimo@gmail.com, mtrier@gmail.com", url = "http://gitorious.org/projects/git-python/", packages = find_packages('lib'), package_dir = {'':'lib'}, license = "BSD License", + requires=('gitdb (>=0.5)',), long_description = """\ -GitPython is a python library used to interact with Git repositories. - -GitPython provides object model access to your git repository. Once you have -created a repository object, you can traverse it to find parent commit(s), -trees, blobs, etc. - -GitPython is a port of the grit library in Ruby created by -Tom Preston-Werner and Chris Wanstrath. -""", +GitPython is a python library used to interact with Git repositories""", classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", diff --git a/test/git/test_base.py b/test/git/test_base.py index 1b01cda3..db13feae 100644 --- a/test/git/test_base.py +++ b/test/git/test_base.py @@ -11,7 +11,7 @@ import os from test.testlib import * from git import * from itertools import chain -from git.objects.utils import get_object_type_by_name +from git.objects.util import get_object_type_by_name from gitdb.util import hex_to_bin import tempfile @@ -42,8 +42,6 @@ class TestBase(TestBase): assert item.hexsha == hexsha assert item.type == typename assert item.size - if isinstance(item, Blob): - assert item.data assert item == item assert not item != item assert str(item) == item.hexsha diff --git a/test/git/test_blob.py b/test/git/test_blob.py index e5fca0a6..623ed179 100644 --- a/test/git/test_blob.py +++ b/test/git/test_blob.py @@ -10,14 +10,6 @@ from gitdb.util import hex_to_bin class TestBlob(TestBase): - def test_should_cache_data(self): - bid = 'a802c139d4767c89dcad79d836d05f7004d39aac' - blob = Blob(self.rorepo, hex_to_bin(bid)) - blob.data - assert blob.data - blob.size - blob.size - def test_mime_type_should_return_mime_type_for_known_types(self): blob = Blob(self.rorepo, **{'binsha': Blob.NULL_BIN_SHA, 'path': 'foo.png'}) assert_equal("image/png", blob.mime_type) diff --git a/test/git/test_remote.py b/test/git/test_remote.py index 9d4da034..f609b683 100644 --- a/test/git/test_remote.py +++ b/test/git/test_remote.py @@ -6,7 +6,7 @@ from test.testlib import * from git import * -from git.utils import IterableList +from git.util import IterableList import tempfile import shutil import os diff --git a/test/git/test_repo.py b/test/git/test_repo.py index a3ff564d..551140a1 100644 --- a/test/git/test_repo.py +++ b/test/git/test_repo.py @@ -7,7 +7,7 @@ import os, sys from test.testlib import * from git import * -from git.utils import join_path_native +from git.util import join_path_native import tempfile import shutil from cStringIO import StringIO @@ -131,7 +131,20 @@ class TestRepo(TestBase): assert os.path.isdir(r.git_dir) self._test_empty_repo(r) + + # test clone + clone_path = path + "_clone" + rc = r.clone(clone_path) + self._test_empty_repo(rc) + shutil.rmtree(git_dir_abs) + try: + shutil.rmtree(clone_path) + except OSError: + # when relative paths are used, the clone may actually be inside + # of the parent directory + pass + # END exception handling # END for each path os.makedirs(git_dir_rela) @@ -151,46 +164,6 @@ class TestRepo(TestBase): def test_bare_property(self): self.rorepo.bare - @patch_object(Repo, '__init__') - @patch_object(Git, '_call_process') - def test_init_with_options(self, git, repo): - git.return_value = True - repo.return_value = None - - r = Repo.init("repos/foo/bar.git", **{'bare' : True,'template': "/baz/sweet"}) - assert isinstance(r, Repo) - - assert_true(git.called) - assert_true(repo.called) - - @patch_object(Repo, '__init__') - @patch_object(Git, '_call_process') - def test_clone(self, git, repo): - git.return_value = None - repo.return_value = None - - self.rorepo.clone("repos/foo/bar.git") - - assert_true(git.called) - path = os.path.join(absolute_project_path(), '.git') - assert_equal(git.call_args, (('clone', path, 'repos/foo/bar.git'), {})) - assert_true(repo.called) - - @patch_object(Repo, '__init__') - @patch_object(Git, '_call_process') - def test_clone_with_options(self, git, repo): - git.return_value = None - repo.return_value = None - - self.rorepo.clone("repos/foo/bar.git", **{'template': '/awesome'}) - - assert_true(git.called) - path = os.path.join(absolute_project_path(), '.git') - assert_equal(git.call_args, (('clone', path, 'repos/foo/bar.git'), - { 'template': '/awesome'})) - assert_true(repo.called) - - def test_daemon_export(self): orig_val = self.rorepo.daemon_export self.rorepo.daemon_export = not orig_val diff --git a/test/git/test_utils.py b/test/git/test_util.py index 963e2b55..6453bc19 100644 --- a/test/git/test_utils.py +++ b/test/git/test_util.py @@ -8,8 +8,8 @@ import os import tempfile from test.testlib import * -from git.utils import * -from git.objects.utils import * +from git.util import * +from git.objects.util import * from git import * from git.cmd import dashify |