Codebase list python-git / upstream/2.1.3
New upstream version 2.1.3 Yaroslav Halchenko 6 years ago
67 changed file(s) with 168 addition(s) and 30595 deletion(s). Raw diff Collapse all Expand all
1515 -Vincent Driessen <me _at_ nvie.com>
1616 -Phil Elson <pelson _dot_ pub _at_ gmail.com>
1717 -Bernard `Guyzmo` Pratz <guyzmo+gitpython+pub@m0g.net>
18 -Timothy B. Hartman <tbhartman _at_ gmail.com>
1819
1920 Portions derived from other open source works and are clearly marked.
00 Metadata-Version: 1.1
11 Name: GitPython
2 Version: 2.1.1
2 Version: 2.1.3
33 Summary: Python Git Library
44 Home-page: https://github.com/gitpython-developers/GitPython
55 Author: Sebastian Thiel, Michael Trier
1313 GitPython.egg-info/top_level.txt
1414 doc/.gitignore
1515 doc/Makefile
16 doc/build/doctrees/changes.doctree
17 doc/build/doctrees/environment.pickle
18 doc/build/doctrees/index.doctree
19 doc/build/doctrees/intro.doctree
20 doc/build/doctrees/reference.doctree
21 doc/build/doctrees/roadmap.doctree
22 doc/build/doctrees/tutorial.doctree
23 doc/build/doctrees/whatsnew.doctree
24 doc/build/html/.buildinfo
25 doc/build/html/changes.html
26 doc/build/html/genindex.html
27 doc/build/html/index.html
28 doc/build/html/intro.html
29 doc/build/html/objects.inv
30 doc/build/html/py-modindex.html
31 doc/build/html/reference.html
32 doc/build/html/roadmap.html
33 doc/build/html/search.html
34 doc/build/html/searchindex.js
35 doc/build/html/tutorial.html
36 doc/build/html/whatsnew.html
37 doc/build/html/_sources/changes.txt
38 doc/build/html/_sources/index.txt
39 doc/build/html/_sources/intro.txt
40 doc/build/html/_sources/reference.txt
41 doc/build/html/_sources/roadmap.txt
42 doc/build/html/_sources/tutorial.txt
43 doc/build/html/_sources/whatsnew.txt
44 doc/build/html/_static/ajax-loader.gif
45 doc/build/html/_static/alabaster.css
46 doc/build/html/_static/basic.css
47 doc/build/html/_static/comment-bright.png
48 doc/build/html/_static/comment-close.png
49 doc/build/html/_static/comment.png
50 doc/build/html/_static/doctools.js
51 doc/build/html/_static/down-pressed.png
52 doc/build/html/_static/down.png
53 doc/build/html/_static/file.png
54 doc/build/html/_static/jquery-1.11.1.js
55 doc/build/html/_static/jquery.js
56 doc/build/html/_static/minus.png
57 doc/build/html/_static/plus.png
58 doc/build/html/_static/pygments.css
59 doc/build/html/_static/searchtools.js
60 doc/build/html/_static/underscore-1.3.1.js
61 doc/build/html/_static/underscore.js
62 doc/build/html/_static/up-pressed.png
63 doc/build/html/_static/up.png
64 doc/build/html/_static/websupport.js
6516 doc/source/changes.rst
6617 doc/source/conf.py
6718 doc/source/index.rst
13283 git/test/fixtures/blame_binary
13384 git/test/fixtures/blame_complex_revision
13485 git/test/fixtures/blame_incremental
86 git/test/fixtures/blame_incremental_2.11.1_plus
13587 git/test/fixtures/cat_file.py
13688 git/test/fixtures/cat_file_blob
13789 git/test/fixtures/cat_file_blob_nl
00 Metadata-Version: 1.1
11 Name: GitPython
2 Version: 2.1.1
2 Version: 2.1.3
33 Summary: Python Git Library
44 Home-page: https://github.com/gitpython-developers/GitPython
55 Author: Sebastian Thiel, Michael Trier
0 2.1.1
0 2.1.3
doc/build/doctrees/changes.doctree less more
Binary diff not shown
doc/build/doctrees/environment.pickle less more
Binary diff not shown
doc/build/doctrees/index.doctree less more
Binary diff not shown
doc/build/doctrees/intro.doctree less more
Binary diff not shown
doc/build/doctrees/reference.doctree less more
Binary diff not shown
doc/build/doctrees/roadmap.doctree less more
Binary diff not shown
doc/build/doctrees/tutorial.doctree less more
Binary diff not shown
doc/build/doctrees/whatsnew.doctree less more
Binary diff not shown
+0
-4
doc/build/html/.buildinfo less more
0 # Sphinx build info version 1
1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
2 config: aa5cad3465d5616735474421fa2148f2
3 tags: 645f666f9bcd5a90fca523b33c5a78b7
+0
-638
doc/build/html/_sources/changes.txt less more
0 =========
1 Changelog
2 =========
3
4 2.0.9 - Bugfixes
5 =============================
6
7 * `tag.commit` will now resolve commits deeply.
8 * `Repo` objects can now be pickled, which helps with multi-processing.
9 * `Head.checkout()` now deals with detached heads, which is when it will return
10 the `HEAD` reference instead.
11
12 * `DiffIndex.iter_change_type(...)` produces better results when diffing
13 2.0.8 - Features and Bugfixes
14 =============================
15
16 * `DiffIndex.iter_change_type(...)` produces better results when diffing
17 an index against the working tree.
18 * `Repo().is_dirty(...)` now supports the `path` parameter, to specify a single
19 path by which to filter the output. Similar to `git status <path>`
20 * Symbolic refs created by this library will now be written with a newline
21 character, which was previously missing.
22 * `blame()` now properly preserves multi-line commit messages.
23 * No longer corrupt ref-logs by writing multi-line comments into them.
24
25 2.0.7 - New Features
26 ====================
27
28 * `IndexFile.commit(...,skip_hooks=False)` added. This parameter emulates the
29 behaviour of `--no-verify` on the command-line.
30
31 2.0.6 - Fixes and Features
32 ==========================
33
34 * Fix: remote output parser now correctly matches refs with non-ASCII
35 chars in them
36 * API: Diffs now have `a_rawpath`, `b_rawpath`, `raw_rename_from`,
37 `raw_rename_to` properties, which are the raw-bytes equivalents of their
38 unicode path counterparts.
39 * Fix: TypeError about passing keyword argument to string decode() on
40 Python 2.6.
41 * Feature: `setUrl API on Remotes <https://github.com/gitpython-developers/GitPython/pull/446#issuecomment-224670539>`_
42
43 2.0.5 - Fixes
44 =============
45
46 * Fix: parser of fetch info lines choked on some legitimate lines
47
48 2.0.4 - Fixes
49 =============
50
51 * Fix: parser of commit object data is now robust against cases where
52 commit object contains invalid bytes. The invalid characters are now
53 replaced rather than choked on.
54 * Fix: non-ASCII paths are now properly decoded and returned in
55 ``.diff()`` output
56 * Fix: `RemoteProgress` will now strip the ', ' prefix or suffix from messages.
57 * API: Remote.[fetch|push|pull](...) methods now allow the ``progress`` argument to
58 be a callable. This saves you from creating a custom type with usually just one
59 implemented method.
60
61 2.0.3 - Fixes
62 =============
63
64 * Fix: bug in ``git-blame --incremental`` output parser that broken when
65 commit messages contained ``\r`` characters
66 * Fix: progress handler exceptions are not caught anymore, which would usually just hide bugs
67 previously.
68 * Fix: The `Git.execute` method will now redirect `stdout` to `devnull` if `with_stdout` is false,
69 which is the intended behaviour based on the parameter's documentation.
70
71 2.0.2 - Fixes
72 =============
73
74 * Fix: source package does not include \*.pyc files
75 * Fix: source package does include doc sources
76
77 2.0.1 - Fixes
78 =============
79
80 * Fix: remote output parser now correctly matches refs with "@" in them
81
82 2.0.0 - Features
83 ================
84
85 Please note that due to breaking changes, we have to increase the major version.
86
87 * **IMPORTANT**: This release drops support for python 2.6, which is
88 officially deprecated by the python maintainers.
89 * **CRITICAL**: `Diff` objects created with patch output will now not carry
90 the --- and +++ header lines anymore. All diffs now start with the
91 @@ header line directly. Users that rely on the old behaviour can now
92 (reliably) read this information from the a_path and b_path properties
93 without having to parse these lines manually.
94 * `Commit` now has extra properties `authored_datetime` and
95 `committer_datetime` (to get Python datetime instances rather than
96 timestamps)
97 * `Commit.diff()` now supports diffing the root commit via
98 `Commit.diff(NULL_TREE)`.
99 * `Repo.blame()` now respects `incremental=True`, supporting incremental
100 blames. Incremental blames are slightly faster since they don't include
101 the file's contents in them.
102 * Fix: `Diff` objects created with patch output will now have their
103 `a_path` and `b_path` properties parsed out correctly. Previously, some
104 values may have been populated incorrectly when a file was added or
105 deleted.
106 * Fix: diff parsing issues with paths that contain "unsafe" chars, like
107 spaces, tabs, backslashes, etc.
108
109 1.0.2 - Fixes
110 =============
111
112 * IMPORTANT: Changed default object database of `Repo` objects to `GitComdObjectDB`. The pure-python implementation
113 used previously usually fails to release its resources (i.e. file handles), which can lead to problems when working
114 with large repositories.
115 * CRITICAL: fixed incorrect `Commit` object serialization when authored or commit date had timezones which were not
116 divisiblej by 3600 seconds. This would happen if the timezone was something like `+0530` for instance.
117 * A list of all additional fixes can be found `on github <https://github.com/gitpython-developers/GitPython/issues?q=milestone%3A%22v1.0.2+-+Fixes%22+is%3Aclosed>`_
118 * CRITICAL: `Tree.cache` was removed without replacement. It is technically impossible to change individual trees and expect their serialization results to be consistent with what *git* expects. Instead, use the `IndexFile` facilities to adjust the content of the staging area, and write it out to the respective tree objects using `IndexFile.write_tree()` instead.
119
120 1.0.1 - Fixes
121 =============
122
123 * A list of all issues can be found `on github <https://github.com/gitpython-developers/GitPython/issues?q=milestone%3A%22v1.0.1+-+Fixes%22+is%3Aclosed>`_
124
125 1.0.0 - Notes
126 =============
127
128 This version is equivalent to v0.3.7, but finally acknowledges that GitPython is stable and production ready.
129
130 It follows the `semantic version scheme <http://semver.org>`_, and thus will not break its existing API unless it goes 2.0.
131
132 0.3.7 - Fixes
133 =============
134 * `IndexFile.add()` will now write the index without any extension data by default. However, you may override this behaviour with the new `write_extension_data` keyword argument.
135
136 - Renamed `ignore_tree_extension_data` keyword argument in `IndexFile.write(...)` to `ignore_extension_data`
137 * If the git command executed during `Remote.push(...)|fetch(...)` returns with an non-zero exit code and GitPython didn't
138 obtain any head-information, the corresponding `GitCommandError` will be raised. This may break previous code which expected
139 these operations to never raise. However, that behavious is undesirable as it would effectively hide the fact that there
140 was an error. See `this issue <https://github.com/gitpython-developers/GitPython/issues/271>`_ for more information.
141
142 * If the git executable can't be found in the PATH or at the path provided by `GIT_PYTHON_GIT_EXECUTABLE`, this is made
143 obvious by throwing `GitCommandNotFound`, both on unix and on windows.
144
145 - Those who support **GUI on windows** will now have to set `git.Git.USE_SHELL = True` to get the previous behaviour.
146
147 * A list of all issues can be found `on github <https://github.com/gitpython-developers/GitPython/issues?q=milestone%3A%22v0.3.7+-+Fixes%22+is%3Aclosed>`_
148
149
150 0.3.6 - Features
151 ================
152 * **DOCS**
153
154 * special members like `__init__` are now listed in the API documentation
155 * tutorial section was revised entirely, more advanced examples were added.
156
157 * **POSSIBLY BREAKING CHANGES**
158
159 * As `rev_parse` will now throw `BadName` as well as `BadObject`, client code will have to catch both exception types.
160 * Repo.working_tree_dir now returns None if it is bare. Previously it raised AssertionError.
161 * IndexFile.add() previously raised AssertionError when paths where used with bare repository, now it raises InvalidGitRepositoryError
162
163 * Added `Repo.merge_base()` implementation. See the `respective issue on github <https://github.com/gitpython-developers/GitPython/issues/169>`_
164 * `[include]` sections in git configuration files are now respected
165 * Added `GitConfigParser.rename_section()`
166 * Added `Submodule.rename()`
167 * A list of all issues can be found `on github <https://github.com/gitpython-developers/GitPython/issues?q=milestone%3A%22v0.3.6+-+Features%22+>`_
168
169 0.3.5 - Bugfixes
170 ================
171 * push/pull/fetch operations will not block anymore
172 * diff() can now properly detect renames, both in patch and raw format. Previously it only worked when create_patch was True.
173 * repo.odb.update_cache() is now called automatically after fetch and pull operations. In case you did that in your own code, you might want to remove your line to prevent a double-update that causes unnecessary IO.
174 * `Repo(path)` will not automatically search upstream anymore and find any git directory on its way up. If you need that behaviour, you can turn it back on using the new `search_parent_directories=True` flag when constructing a `Repo` object.
175 * IndexFile.commit() now runs the `pre-commit` and `post-commit` hooks. Verified to be working on posix systems only.
176 * A list of all fixed issues can be found here: https://github.com/gitpython-developers/GitPython/issues?q=milestone%3A%22v0.3.5+-+bugfixes%22+
177
178 0.3.4 - Python 3 Support
179 ========================
180 * Internally, hexadecimal SHA1 are treated as ascii encoded strings. Binary SHA1 are treated as bytes.
181 * Id attribute of Commit objects is now `hexsha`, instead of `binsha`. The latter makes no sense in python 3 and I see no application of it anyway besides its artificial usage in test cases.
182 * **IMPORTANT**: If you were using the config_writer(), you implicitly relied on __del__ to work as expected to flush changes. To be sure changes are flushed under PY3, you will have to call the new `release()` method to trigger a flush. For some reason, __del__ is not called necessarily anymore when a symbol goes out of scope.
183 * The `Tree` now has a `.join('name')` method which is equivalent to `tree / 'name'`
184
185 0.3.3
186 =====
187 * When fetching, pulling or pushing, and an error occours, it will not be reported on stdout anymore. However, if there is a fatal error, it will still result in a GitCommandError to be thrown. This goes hand in hand with improved fetch result parsing.
188 * Code Cleanup (in preparation for python 3 support)
189
190 * Applied autopep8 and cleaned up code
191 * Using python logging module instead of print statments to signal certain kinds of errors
192
193 0.3.2.1
194 =======
195 * `Fix for #207 <https://github.com/gitpython-developers/GitPython/issues/207>`_
196
197 0.3.2
198 =====
199
200 * Release of most recent version as non-RC build, just to allow pip to install the latest version right away.
201 * Have a look at the milestones (https://github.com/gitpython-developers/GitPython/milestones) to see what's next.
202
203 0.3.2 RC1
204 =========
205 * **git** command wrapper
206
207 * Added ``version_info`` property which returns a tuple of integers representing the installed git version.
208
209 * Added GIT_PYTHON_GIT_EXECUTABLE environment variable, which can be used to set the desired git executable to be used. despite of what would be found in the path.
210
211 * **Blob** Type
212
213 * Added mode constants to ease the manual creation of blobs
214
215 * **IterableList**
216
217 * Added __contains__ and __delitem__ methods
218
219 * **More Changes**
220
221 * Configuration file parsing is more robust. It should now be able to handle everything that the git command can parse as well.
222 * The progress parsing was updated to support git 1.7.0.3 and newer. Previously progress was not enabled for the git command or only worked with ssh in case of older git versions.
223 * Parsing of tags was improved. Previously some parts of the name could not be parsed properly.
224 * The rev-parse pure python implementation now handles branches correctly if they look like hexadecimal sha's.
225 * GIT_PYTHON_TRACE is now set on class level of the Git type, previously it was a module level global variable.
226 * GIT_PYTHON_GIT_EXECUTABLE is a class level variable as well.
227
228
229 0.3.1 Beta 2
230 ============
231 * Added **reflog support** ( reading and writing )
232
233 * New types: ``RefLog`` and ``RefLogEntry``
234 * Reflog is maintained automatically when creating references and deleting them
235 * Non-intrusive changes to ``SymbolicReference``, these don't require your code to change. They allow to append messages to the reflog.
236
237 * ``abspath`` property added, similar to ``abspath`` of Object instances
238 * ``log()`` method added
239 * ``log_append(...)`` method added
240 * ``set_reference(...)`` method added (reflog support)
241 * ``set_commit(...)`` method added (reflog support)
242 * ``set_object(...)`` method added (reflog support)
243
244 * **Intrusive Changes** to ``Head`` type
245
246 * ``create(...)`` method now supports the reflog, but will not raise ``GitCommandError`` anymore as it is a pure python implementation now. Instead, it raises ``OSError``.
247
248 * **Intrusive Changes** to ``Repo`` type
249
250 * ``create_head(...)`` method does not support kwargs anymore, instead it supports a logmsg parameter
251
252 * Repo.rev_parse now supports the [ref]@{n} syntax, where *n* is the number of steps to look into the reference's past
253
254 * **BugFixes**
255
256 * Removed incorrect ORIG_HEAD handling
257
258 * **Flattened directory** structure to make development more convenient.
259
260 * .. note:: This alters the way projects using git-python as a submodule have to adjust their sys.path to be able to import git-python successfully.
261 * Misc smaller changes and bugfixes
262
263 0.3.1 Beta 1
264 ============
265 * Full Submodule-Support
266 * Added unicode support for author names. Commit.author.name is now unicode instead of string.
267 * Head Type changes
268
269 * config_reader() & config_writer() methods added for access to head specific options.
270 * tracking_branch() & set_tracking_branch() methods addded for easy configuration of tracking branches.
271
272
273 0.3.0 Beta 2
274 ============
275 * Added python 2.4 support
276
277 0.3.0 Beta 1
278 ============
279 Renamed Modules
280 ---------------
281 * For consistency with naming conventions used in sub-modules like gitdb, the following modules have been renamed
282
283 * git.utils -> git.util
284 * git.errors -> git.exc
285 * git.objects.utils -> git.objects.util
286
287 General
288 -------
289 * 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.
290 * 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.
291 * 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.
292 * The .data attribute was removed from the Object type, to obtain plain data, use the data_stream property instead.
293 * ConcurrentWriteOperation was removed, and replaced by LockedFD
294 * IndexFile.get_entries_key was renamed to entry_key
295 * 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.
296 * diff.Diff.null_hex_sha renamed to NULL_HEX_SHA, to be conforming with the naming in the Object base class
297
298
299 0.2 Beta 2
300 ===========
301 * Commit objects now carry the 'encoding' information of their message. It wasn't parsed previously, and defaults to UTF-8
302 * Commit.create_from_tree now uses a pure-python implementation, mimicing git-commit-tree
303
304 0.2
305 =====
306 General
307 -------
308 * file mode in Tree, Blob and Diff objects now is an int compatible to definintiions
309 in the stat module, allowing you to query whether individual user, group and other
310 read, write and execute bits are set.
311 * Adjusted class hierarchy to generally allow comparison and hash for Objects and Refs
312 * Improved Tag object which now is a Ref that may contain a tag object with additional
313 Information
314 * id_abbrev method has been removed as it could not assure the returned short SHA's
315 where unique
316 * removed basename method from Objects with path's as it replicated features of os.path
317 * from_string and list_from_string methods are now private and were renamed to
318 _from_string and _list_from_string respectively. As part of the private API, they
319 may change without prior notice.
320 * Renamed all find_all methods to list_items - this method is part of the Iterable interface
321 that also provides a more efficients and more responsive iter_items method
322 * All dates, like authored_date and committer_date, are stored as seconds since epoc
323 to consume less memory - they can be converted using time.gmtime in a more suitable
324 presentation format if needed.
325 * Named method parameters changed on a wide scale to unify their use. Now git specific
326 terms are used everywhere, such as "Reference" ( ref ) and "Revision" ( rev ).
327 Prevously multiple terms where used making it harder to know which type was allowed
328 or not.
329 * Unified diff interface to allow easy diffing between trees, trees and index, trees
330 and working tree, index and working tree, trees and index. This closely follows
331 the git-diff capabilities.
332 * Git.execute does not take the with_raw_output option anymore. It was not used
333 by anyone within the project and False by default.
334
335
336 Item Iteration
337 --------------
338 * Previously one would return and process multiple items as list only which can
339 hurt performance and memory consumption and reduce response times.
340 iter_items method provide an iterator that will return items on demand as parsed
341 from a stream. This way any amount of objects can be handled.
342 * list_items method returns IterableList allowing to access list members by name
343
344 objects Package
345 ----------------
346 * blob, tree, tag and commit module have been moved to new objects package. This should
347 not affect you though unless you explicitly imported individual objects. If you just
348 used the git package, names did not change.
349
350 Blob
351 ----
352 * former 'name' member renamed to path as it suits the actual data better
353
354 GitCommand
355 -----------
356 * git.subcommand call scheme now prunes out None from the argument list, allowing
357 to be called more confortably as None can never be a valid to the git command
358 if converted to a string.
359 * Renamed 'git_dir' attribute to 'working_dir' which is exactly how it is used
360
361 Commit
362 ------
363 * 'count' method is not an instance method to increase its ease of use
364 * 'name_rev' property returns a nice name for the commit's sha
365
366 Config
367 ------
368 * The git configuration can now be read and manipulated directly from within python
369 using the GitConfigParser
370 * Repo.config_reader() returns a read-only parser
371 * Repo.config_writer() returns a read-write parser
372
373 Diff
374 ----
375 * Members a a_commit and b_commit renamed to a_blob and b_blob - they are populated
376 with Blob objects if possible
377 * Members a_path and b_path removed as this information is kept in the blobs
378 * Diffs are now returned as DiffIndex allowing to more quickly find the kind of
379 diffs you are interested in
380
381 Diffing
382 -------
383 * Commit and Tree objects now support diffing natively with a common interface to
384 compare agains other Commits or Trees, against the working tree or against the index.
385
386 Index
387 -----
388 * A new Index class allows to read and write index files directly, and to perform
389 simple two and three way merges based on an arbitrary index.
390
391 Referernces
392 ------------
393 * References are object that point to a Commit
394 * SymbolicReference are a pointer to a Reference Object, which itself points to a specific
395 Commit
396 * They will dynmically retrieve their object at the time of query to assure the information
397 is actual. Recently objects would be cached, hence ref object not be safely kept
398 persistent.
399
400 Repo
401 ----
402 * Moved blame method from Blob to repo as it appeared to belong there much more.
403 * active_branch method now returns a Head object instead of a string with the name
404 of the active branch.
405 * tree method now requires a Ref instance as input and defaults to the active_branche
406 instead of master
407 * is_dirty now takes additional arguments allowing fine-grained control about what is
408 considered dirty
409 * Removed the following methods:
410
411 - 'log' method as it as effectively the same as the 'commits' method
412 - 'commits_since' as it is just a flag given to rev-list in Commit.iter_items
413 - 'commit_count' as it was just a redirection to the respective commit method
414 - 'commits_between', replaced by a note on the iter_commits method as it can achieve the same thing
415 - 'commit_delta_from' as it was a very special case by comparing two different repjrelated repositories, i.e. clones, git-rev-list would be sufficient to find commits that would need to be transferred for example.
416 - 'create' method which equals the 'init' method's functionality
417 - 'diff' - it returned a mere string which still had to be parsed
418 - 'commit_diff' - moved to Commit, Tree and Diff types respectively
419
420 * Renamed the following methods:
421
422 - commits to iter_commits to improve the performance, adjusted signature
423 - init_bare to init, implying less about the options to be used
424 - fork_bare to clone, as it was to represent general clone functionality, but implied
425 a bare clone to be more versatile
426 - archive_tar_gz and archive_tar and replaced by archive method with different signature
427
428 * 'commits' method has no max-count of returned commits anymore, it now behaves like git-rev-list
429 * The following methods and properties were added
430
431 - 'untracked_files' property, returning all currently untracked files
432 - 'head', creates a head object
433 - 'tag', creates a tag object
434 - 'iter_trees' method
435 - 'config_reader' method
436 - 'config_writer' method
437 - 'bare' property, previously it was a simple attribute that could be written
438
439 * Renamed the following attributes
440
441 - 'path' is now 'git_dir'
442 - 'wd' is now 'working_dir'
443
444 * Added attribute
445
446 - 'working_tree_dir' which may be None in case of bare repositories
447
448 Remote
449 ------
450 * Added Remote object allowing easy access to remotes
451 * Repo.remotes lists all remotes
452 * Repo.remote returns a remote of the specified name if it exists
453
454 Test Framework
455 --------------
456 * Added support for common TestCase base class that provides additional functionality
457 to receive repositories tests can also write to. This way, more aspects can be
458 tested under real-world ( un-mocked ) conditions.
459
460 Tree
461 ----
462 * former 'name' member renamed to path as it suits the actual data better
463 * added traverse method allowing to recursively traverse tree items
464 * deleted blob method
465 * added blobs and trees properties allowing to query the respective items in the
466 tree
467 * now mimics behaviour of a read-only list instead of a dict to maintain order.
468 * content_from_string method is now private and not part of the public API anymore
469
470
471 0.1.6
472 =====
473
474 General
475 -------
476 * Added in Sphinx documentation.
477
478 * Removed ambiguity between paths and treeishs. When calling commands that
479 accept treeish and path arguments and there is a path with the same name as
480 a treeish git cowardly refuses to pick one and asks for the command to use
481 the unambiguous syntax where '--' seperates the treeish from the paths.
482
483 * ``Repo.commits``, ``Repo.commits_between``, ``Repo.commits_since``,
484 ``Repo.commit_count``, ``Repo.commit``, ``Commit.count`` and
485 ``Commit.find_all`` all now optionally take a path argument which
486 constrains the lookup by path. This changes the order of the positional
487 arguments in ``Repo.commits`` and ``Repo.commits_since``.
488
489 Commit
490 ------
491 * ``Commit.message`` now contains the full commit message (rather than just
492 the first line) and a new property ``Commit.summary`` contains the first
493 line of the commit message.
494
495 * Fixed a failure when trying to lookup the stats of a parentless commit from
496 a bare repo.
497
498 Diff
499 ----
500 * The diff parser is now far faster and also addresses a bug where
501 sometimes b_mode was not set.
502
503 * Added support for parsing rename info to the diff parser. Addition of new
504 properties ``Diff.renamed``, ``Diff.rename_from``, and ``Diff.rename_to``.
505
506 Head
507 ----
508 * Corrected problem where branches was only returning the last path component
509 instead of the entire path component following refs/heads/.
510
511 Repo
512 ----
513 * Modified the gzip archive creation to use the python gzip module.
514
515 * Corrected ``commits_between`` always returning None instead of the reversed
516 list.
517
518
519 0.1.5
520 =====
521
522 General
523 -------
524 * upgraded to Mock 0.4 dependency.
525
526 * Replace GitPython with git in repr() outputs.
527
528 * Fixed packaging issue caused by ez_setup.py.
529
530 Blob
531 ----
532 * No longer strip newlines from Blob data.
533
534 Commit
535 ------
536 * Corrected problem with git-rev-list --bisect-all. See
537 http://groups.google.com/group/git-python/browse_thread/thread/aed1d5c4b31d5027
538
539 Repo
540 ----
541 * Corrected problems with creating bare repositories.
542
543 * Repo.tree no longer accepts a path argument. Use:
544
545 >>> dict(k, o for k, o in tree.items() if k in paths)
546
547 * Made daemon export a property of Repo. Now you can do this:
548
549 >>> exported = repo.daemon_export
550 >>> repo.daemon_export = True
551
552 * Allows modifying the project description. Do this:
553
554 >>> repo.description = "Foo Bar"
555 >>> repo.description
556 'Foo Bar'
557
558 * Added a read-only property Repo.is_dirty which reflects the status of the
559 working directory.
560
561 * Added a read-only Repo.active_branch property which returns the name of the
562 currently active branch.
563
564
565 Tree
566 ----
567 * Switched to using a dictionary for Tree contents since you will usually want
568 to access them by name and order is unimportant.
569
570 * Implemented a dictionary protocol for Tree objects. The following:
571
572 child = tree.contents['grit']
573
574 becomes:
575
576 child = tree['grit']
577
578 * Made Tree.content_from_string a static method.
579
580 0.1.4.1
581 =======
582
583 * removed ``method_missing`` stuff and replaced with a ``__getattr__``
584 override in ``Git``.
585
586 0.1.4
587 =====
588
589 * renamed ``git_python`` to ``git``. Be sure to delete all pyc files before
590 testing.
591
592 Commit
593 ------
594 * Fixed problem with commit stats not working under all conditions.
595
596 Git
597 ---
598 * Renamed module to cmd.
599
600 * Removed shell escaping completely.
601
602 * Added support for ``stderr``, ``stdin``, and ``with_status``.
603
604 * ``git_dir`` is now optional in the constructor for ``git.Git``. Git now
605 falls back to ``os.getcwd()`` when git_dir is not specified.
606
607 * add a ``with_exceptions`` keyword argument to git commands.
608 ``GitCommandError`` is raised when the exit status is non-zero.
609
610 * add support for a ``GIT_PYTHON_TRACE`` environment variable.
611 ``GIT_PYTHON_TRACE`` allows us to debug GitPython's usage of git through
612 the use of an environment variable.
613
614 Tree
615 ----
616 * Fixed up problem where ``name`` doesn't exist on root of tree.
617
618 Repo
619 ----
620 * Corrected problem with creating bare repo. Added ``Repo.create`` alias.
621
622 0.1.2
623 =====
624
625 Tree
626 ----
627 * Corrected problem with ``Tree.__div__`` not working with zero length files.
628 Removed ``__len__`` override and replaced with size instead. Also made size
629 cach properly. This is a breaking change.
630
631 0.1.1
632 =====
633 Fixed up some urls because I'm a moron
634
635 0.1.0
636 =====
637 initial release
+0
-23
doc/build/html/_sources/index.txt less more
0 .. GitPython documentation master file, created by sphinx-quickstart on Sat Jan 24 11:51:01 2009.
1 You can adapt this file completely to your liking, but it should at least
2 contain the root `toctree` directive.
3
4 GitPython Documentation
5 =======================
6
7 .. toctree::
8 :maxdepth: 2
9
10 intro
11 tutorial
12 reference
13 roadmap
14 changes
15
16 Indices and tables
17 ==================
18
19 * :ref:`genindex`
20 * :ref:`modindex`
21 * :ref:`search`
22
+0
-135
doc/build/html/_sources/intro.txt less more
0 .. _intro_toplevel:
1
2 ==================
3 Overview / Install
4 ==================
5
6 GitPython is a python library used to interact with git repositories, high-level like git-porcelain, or low-level like git-plumbing.
7
8 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.
9
10 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.
11
12 Requirements
13 ============
14
15 * `Python`_ 2.7 or newer
16 Since GitPython 2.0.0. Please note that python 2.6 is still reasonably well supported, but might
17 deteriorate over time. Support is provided on a best-effort basis only.
18 * `Git`_ 1.7.0 or newer
19 It should also work with older versions, but it may be that some operations
20 involving remotes will not work as expected.
21 * `GitDB`_ - a pure python git database implementation
22 * `Python Nose`_ - used for running the tests
23 * `Mock by Michael Foord`_ used for tests. Requires version 0.5
24
25 .. _Python: https://www.python.org
26 .. _Git: https://git-scm.com/
27 .. _Python Nose: https://nose.readthedocs.io/en/latest/
28 .. _Mock by Michael Foord: http://www.voidspace.org.uk/python/mock.html
29 .. _GitDB: https://pypi.python.org/pypi/gitdb
30
31 Installing GitPython
32 ====================
33
34 Installing GitPython is easily done using
35 `pip`_. Assuming it is
36 installed, just run the following from the command-line:
37
38 .. sourcecode:: none
39
40 # pip install gitpython
41
42 This command will download the latest version of GitPython from the
43 `Python Package Index <http://pypi.python.org/pypi/GitPython>`_ and install it
44 to your system. More information about ``pip`` and pypi can be found
45 here:
46
47 * `install pip <https://pip.pypa.io/en/latest/installing.html>`_
48 * `pypi <https://pypi.python.org/pypi/GitPython>`_
49
50 .. _pip: https://pip.pypa.io/en/latest/installing.html
51
52 Alternatively, you can install from the distribution using the ``setup.py``
53 script:
54
55 .. sourcecode:: none
56
57 # python setup.py install
58
59 .. note:: In this case, you have to manually install `GitDB`_ as well. It would be recommended to use the :ref:`git source repository <source-code-label>` in that case.
60
61 Limitations
62 ===========
63
64 Leakage of System Resources
65 ---------------------------
66
67 GitPython is not suited for long-running processes (like daemons) as it tends to
68 leak system resources. It was written in a time where destructors (as implemented
69 in the `__del__` method) still ran deterministically.
70
71 In case you still want to use it in such a context, you will want to search the
72 codebase for `__del__` implementations and call these yourself when you see fit.
73
74 Another way assure proper cleanup of resources is to factor out GitPython into a
75 separate process which can be dropped periodically.
76
77 Best-effort for Python 2.6 and Windows support
78 ----------------------------------------------
79
80 This means that support for these platforms is likely to worsen over time
81 as they are kept alive solely by their users, or not.
82
83 Getting Started
84 ===============
85
86 * :ref:`tutorial-label` - This tutorial provides a walk-through of some of
87 the basic functionality and concepts used in GitPython. It, however, is not
88 exhaustive so you are encouraged to spend some time in the
89 :ref:`api_reference_toplevel`.
90
91 API Reference
92 =============
93
94 An organized section of the GitPthon API is at :ref:`api_reference_toplevel`.
95
96 .. _source-code-label:
97
98 Source Code
99 ===========
100
101 GitPython's git repo is available on GitHub, which can be browsed at:
102
103 * https://github.com/gitpython-developers/GitPython
104
105 and cloned using::
106
107 $ git clone https://github.com/gitpython-developers/GitPython git-python
108
109 Initialize all submodules to obtain the required dependencies with::
110
111 $ cd git-python
112 $ git submodule update --init --recursive
113
114 Finally verify the installation by running the `nose powered <http://code.google.com/p/python-nose/>`_ unit tests::
115
116 $ nosetests
117
118 Questions and Answers
119 =====================
120 Please use stackoverflow for questions, and don't forget to tag it with `gitpython` to assure the right people see the question in a timely manner.
121
122 http://stackoverflow.com/questions/tagged/gitpython
123
124 Issue Tracker
125 =============
126 The issue tracker is hosted by github:
127
128 https://github.com/gitpython-developers/GitPython/issues
129
130 License Information
131 ===================
132 GitPython is licensed under the New BSD License. See the LICENSE file for
133 more information.
134
+0
-229
doc/build/html/_sources/reference.txt less more
0 .. _api_reference_toplevel:
1
2 API Reference
3 =============
4
5 Objects.Base
6 ------------
7
8 .. automodule:: git.objects.base
9 :members:
10 :undoc-members:
11 :special-members:
12
13 Objects.Blob
14 ------------
15
16 .. automodule:: git.objects.blob
17 :members:
18 :undoc-members:
19 :special-members:
20
21 Objects.Commit
22 --------------
23
24 .. automodule:: git.objects.commit
25 :members:
26 :undoc-members:
27 :special-members:
28
29 Objects.Tag
30 -----------
31
32 .. automodule:: git.objects.tag
33 :members:
34 :undoc-members:
35 :special-members:
36
37 Objects.Tree
38 ------------
39
40 .. automodule:: git.objects.tree
41 :members:
42 :undoc-members:
43 :special-members:
44
45 Objects.Functions
46 -----------------
47
48 .. automodule:: git.objects.fun
49 :members:
50 :undoc-members:
51 :special-members:
52
53 Objects.Submodule.base
54 ----------------------
55
56 .. automodule:: git.objects.submodule.base
57 :members:
58 :undoc-members:
59 :special-members:
60
61 Objects.Submodule.root
62 ----------------------
63
64 .. automodule:: git.objects.submodule.root
65 :members:
66 :undoc-members:
67 :special-members:
68
69 Objects.Submodule.util
70 ----------------------
71
72 .. automodule:: git.objects.submodule.util
73 :members:
74 :undoc-members:
75 :special-members:
76
77 Objects.Util
78 -------------
79
80 .. automodule:: git.objects.util
81 :members:
82 :undoc-members:
83 :special-members:
84
85 Index.Base
86 ----------
87
88 .. automodule:: git.index.base
89 :members:
90 :undoc-members:
91 :special-members:
92
93 Index.Functions
94 ---------------
95
96 .. automodule:: git.index.fun
97 :members:
98 :undoc-members:
99 :special-members:
100
101 Index.Types
102 -----------
103
104 .. automodule:: git.index.typ
105 :members:
106 :undoc-members:
107 :special-members:
108
109 Index.Util
110 -------------
111
112 .. automodule:: git.index.util
113 :members:
114 :undoc-members:
115 :special-members:
116
117 GitCmd
118 ------
119
120 .. automodule:: git.cmd
121 :members:
122 :undoc-members:
123 :special-members:
124
125 Config
126 ------
127
128 .. automodule:: git.config
129 :members:
130 :undoc-members:
131 :special-members:
132
133 Diff
134 ----
135
136 .. automodule:: git.diff
137 :members:
138 :undoc-members:
139 :special-members:
140
141 Exceptions
142 ----------
143
144 .. automodule:: git.exc
145 :members:
146 :undoc-members:
147 :special-members:
148
149
150 Refs.symbolic
151 -------------
152
153 .. automodule:: git.refs.symbolic
154 :members:
155 :undoc-members:
156 :special-members:
157
158 Refs.reference
159 --------------
160
161 .. automodule:: git.refs.reference
162 :members:
163 :undoc-members:
164 :special-members:
165
166 Refs.head
167 ---------
168
169 .. automodule:: git.refs.head
170 :members:
171 :undoc-members:
172 :special-members:
173
174 Refs.tag
175 ------------
176
177 .. automodule:: git.refs.tag
178 :members:
179 :undoc-members:
180 :special-members:
181
182 Refs.remote
183 ------------
184
185 .. automodule:: git.refs.remote
186 :members:
187 :undoc-members:
188 :special-members:
189
190 Refs.log
191 ------------
192
193 .. automodule:: git.refs.log
194 :members:
195 :undoc-members:
196 :special-members:
197
198 Remote
199 ------
200
201 .. automodule:: git.remote
202 :members:
203 :undoc-members:
204 :special-members:
205
206 Repo.Base
207 ---------
208
209 .. automodule:: git.repo.base
210 :members:
211 :undoc-members:
212 :special-members:
213
214 Repo.Functions
215 --------------
216
217 .. automodule:: git.repo.fun
218 :members:
219 :undoc-members:
220 :special-members:
221
222 Util
223 ----
224
225 .. automodule:: git.util
226 :members:
227 :undoc-members:
228 :special-members:
+0
-9
doc/build/html/_sources/roadmap.txt less more
0
1 #######
2 Roadmap
3 #######
4 The full list of milestones including associated tasks can be found on github:
5 https://github.com/gitpython-developers/GitPython/issues
6
7 Select the respective milestone to filter the list of issues accordingly.
8
+0
-495
doc/build/html/_sources/tutorial.txt less more
0 .. _tutorial_toplevel:
1
2 .. highlight:: python
3
4 .. _tutorial-label:
5
6 ==================
7 GitPython Tutorial
8 ==================
9
10 GitPython provides object model access to your git repository. This tutorial is composed of multiple sections, most of which explains a real-life usecase.
11
12 All code presented here originated from `test_docs.py <https://github.com/gitpython-developers/GitPython/blob/master/git/test/test_docs.py>`_ to assure correctness. Knowing this should also allow you to more easily run the code for your own testing purposes, all you need is a developer installation of git-python.
13
14 Meet the Repo type
15 ******************
16
17 The first step is to create a :class:`git.Repo <git.repo.base.Repo>` object to represent your repository.
18
19 .. literalinclude:: ../../git/test/test_docs.py
20 :language: python
21 :start-after: # [1-test_init_repo_object]
22 :end-before: # ![1-test_init_repo_object]
23
24 In the above example, the directory ``self.rorepo.working_tree_dir`` equals ``/Users/mtrier/Development/git-python`` and is my working repository which contains the ``.git`` directory. You can also initialize GitPython with a *bare* repository.
25
26 .. literalinclude:: ../../git/test/test_docs.py
27 :language: python
28 :start-after: # [2-test_init_repo_object]
29 :end-before: # ![2-test_init_repo_object]
30
31 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.
32
33 .. literalinclude:: ../../git/test/test_docs.py
34 :language: python
35 :start-after: # [3-test_init_repo_object]
36 :end-before: # ![3-test_init_repo_object]
37
38 Query the active branch, query untracked files or whether the repository data has been modified.
39
40 .. literalinclude:: ../../git/test/test_docs.py
41 :language: python
42 :start-after: # [4-test_init_repo_object]
43 :end-before: # ![4-test_init_repo_object]
44
45 Clone from existing repositories or initialize new empty ones.
46
47 .. literalinclude:: ../../git/test/test_docs.py
48 :language: python
49 :start-after: # [5-test_init_repo_object]
50 :end-before: # ![5-test_init_repo_object]
51
52 Archive the repository contents to a tar file.
53
54 .. literalinclude:: ../../git/test/test_docs.py
55 :language: python
56 :start-after: # [6-test_init_repo_object]
57 :end-before: # ![6-test_init_repo_object]
58
59 Advanced Repo Usage
60 ===================
61
62 And of course, there is much more you can do with this type, most of the following will be explained in greater detail in specific tutorials. Don't worry if you don't understand some of these examples right away, as they may require a thorough understanding of gits inner workings.
63
64 Query relevant repository paths ...
65
66 .. literalinclude:: ../../git/test/test_docs.py
67 :language: python
68 :start-after: # [7-test_init_repo_object]
69 :end-before: # ![7-test_init_repo_object]
70
71 :class:`Heads <git.refs.head.Head>` Heads are branches in git-speak. :class:`References <git.refs.reference.Reference>` are pointers to a specific commit or to other references. Heads and :class:`Tags <git.refs.tag.TagReference>` are a kind of references. GitPython allows you to query them rather intuitively.
72
73 .. literalinclude:: ../../git/test/test_docs.py
74 :language: python
75 :start-after: # [8-test_init_repo_object]
76 :end-before: # ![8-test_init_repo_object]
77
78 You can also create new heads ...
79
80 .. literalinclude:: ../../git/test/test_docs.py
81 :language: python
82 :start-after: # [9-test_init_repo_object]
83 :end-before: # ![9-test_init_repo_object]
84
85 ... and tags ...
86
87 .. literalinclude:: ../../git/test/test_docs.py
88 :language: python
89 :start-after: # [10-test_init_repo_object]
90 :end-before: # ![10-test_init_repo_object]
91
92 You can traverse down to :class:`git objects <git.objects.base.Object>` through references and other objects. Some objects like :class:`commits <git.objects.commit.Commit>` have additional meta-data to query.
93
94 .. literalinclude:: ../../git/test/test_docs.py
95 :language: python
96 :start-after: # [11-test_init_repo_object]
97 :end-before: # ![11-test_init_repo_object]
98
99 :class:`Remotes <git.remote.Remote>` allow to handle fetch, pull and push operations, while providing optional real-time progress information to :class:`progress delegates <git.util.RemoteProgress>`.
100
101 .. literalinclude:: ../../git/test/test_docs.py
102 :language: python
103 :start-after: # [12-test_init_repo_object]
104 :end-before: # ![12-test_init_repo_object]
105
106 The :class:`index <git.index.base.IndexFile>` is also called stage in git-speak. It is used to prepare new commits, and can be used to keep results of merge operations. Our index implementation allows to stream date into the index, which is useful for bare repositories that do not have a working tree.
107
108 .. literalinclude:: ../../git/test/test_docs.py
109 :language: python
110 :start-after: # [13-test_init_repo_object]
111 :end-before: # ![13-test_init_repo_object]
112
113 :class:`Submodules <git.objects.submodule.Submodule>` represent all aspects of git submodules, which allows you query all of their related information, and manipulate in various ways.
114
115 .. literalinclude:: ../../git/test/test_docs.py
116 :language: python
117 :start-after: # [14-test_init_repo_object]
118 :end-before: # ![14-test_init_repo_object]
119
120
121 Examining References
122 ********************
123
124 :class:`References <git.refs.reference.Reference>` are the tips of your commit graph from which you can easily examine the history of your project.
125
126 .. literalinclude:: ../../git/test/test_docs.py
127 :language: python
128 :start-after: # [1-test_references_and_objects]
129 :end-before: # ![1-test_references_and_objects]
130
131 :class:`Tags <git.refs.tag.TagReference>` are (usually immutable) references to a commit and/or a tag object.
132
133 .. literalinclude:: ../../git/test/test_docs.py
134 :language: python
135 :start-after: # [2-test_references_and_objects]
136 :end-before: # ![2-test_references_and_objects]
137
138 A :class:`symbolic reference <git.refs.symbolic.SymbolicReference>` is a special case of a reference as it points to another reference instead of a commit.
139
140 .. literalinclude:: ../../git/test/test_docs.py
141 :language: python
142 :start-after: # [3-test_references_and_objects]
143 :end-before: # ![3-test_references_and_objects]
144
145 Access the :class:`reflog <git.refs.log.RefLog>` easily.
146
147 .. literalinclude:: ../../git/test/test_docs.py
148 :language: python
149 :start-after: # [4-test_references_and_objects]
150 :end-before: # ![4-test_references_and_objects]
151
152 Modifying References
153 ********************
154 You can easily create and delete :class:`reference types <git.refs.reference.Reference>` or modify where they point to.
155
156 .. literalinclude:: ../../git/test/test_docs.py
157 :language: python
158 :start-after: # [5-test_references_and_objects]
159 :end-before: # ![5-test_references_and_objects]
160
161 Create or delete :class:`tags <git.refs.tag.TagReference>` the same way except you may not change them afterwards.
162
163 .. literalinclude:: ../../git/test/test_docs.py
164 :language: python
165 :start-after: # [6-test_references_and_objects]
166 :end-before: # ![6-test_references_and_objects]
167
168 Change the :class:`symbolic reference <git.refs.symbolic.SymbolicReference>` to switch branches cheaply (without adjusting the index or the working tree).
169
170 .. literalinclude:: ../../git/test/test_docs.py
171 :language: python
172 :start-after: # [7-test_references_and_objects]
173 :end-before: # ![7-test_references_and_objects]
174
175 Understanding Objects
176 *********************
177 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, or 40 bytes in hexadecimal notation.
178
179 Git only knows 4 distinct object types being :class:`Blobs <git.objects.blob.Blob>`, :class:`Trees <git.objects.tree.Tree>`, :class:`Commits <git.objects.commit.Commit>` and :class:`Tags <git.objects.tag.TagObject>`.
180
181 In GitPython, all objects can be accessed through their common base, can be compared and hashed. They are usually not instantiated directly, but through references or specialized repository functions.
182
183 .. literalinclude:: ../../git/test/test_docs.py
184 :language: python
185 :start-after: # [8-test_references_and_objects]
186 :end-before: # ![8-test_references_and_objects]
187
188 Common fields are ...
189
190 .. literalinclude:: ../../git/test/test_docs.py
191 :language: python
192 :start-after: # [9-test_references_and_objects]
193 :end-before: # ![9-test_references_and_objects]
194
195 :class:`Index objects <git.objects.base.IndexObject>` 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 file system as well as their mode.
196
197 .. literalinclude:: ../../git/test/test_docs.py
198 :language: python
199 :start-after: # [10-test_references_and_objects]
200 :end-before: # ![10-test_references_and_objects]
201
202 Access :class:`blob <git.objects.blob.Blob>` data (or any object data) using streams.
203
204 .. literalinclude:: ../../git/test/test_docs.py
205 :language: python
206 :start-after: # [11-test_references_and_objects]
207 :end-before: # ![11-test_references_and_objects]
208
209
210 The Commit object
211 *****************
212
213 :class:`Commit <git.objects.commit.Commit>` objects contain information about a specific commit. Obtain commits using references as done in `Examining References`_ or as follows.
214
215 Obtain commits at the specified revision
216
217 .. literalinclude:: ../../git/test/test_docs.py
218 :language: python
219 :start-after: # [12-test_references_and_objects]
220 :end-before: # ![12-test_references_and_objects]
221
222 Iterate 50 commits, and if you need paging, you can specify a number of commits to skip.
223
224 .. literalinclude:: ../../git/test/test_docs.py
225 :language: python
226 :start-after: # [13-test_references_and_objects]
227 :end-before: # ![13-test_references_and_objects]
228
229 A commit object carries all sorts of meta-data
230
231 .. literalinclude:: ../../git/test/test_docs.py
232 :language: python
233 :start-after: # [14-test_references_and_objects]
234 :end-before: # ![14-test_references_and_objects]
235
236 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.
237
238 .. literalinclude:: ../../git/test/test_docs.py
239 :language: python
240 :start-after: # [15-test_references_and_objects]
241 :end-before: # ![15-test_references_and_objects]
242
243 You can traverse a commit's ancestry by chaining calls to ``parents``
244
245 .. literalinclude:: ../../git/test/test_docs.py
246 :language: python
247 :start-after: # [16-test_references_and_objects]
248 :end-before: # ![16-test_references_and_objects]
249
250 The above corresponds to ``master^^^`` or ``master~3`` in git parlance.
251
252 The Tree object
253 ***************
254
255 A :class:`tree <git.objects.tree.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
256
257 .. literalinclude:: ../../git/test/test_docs.py
258 :language: python
259 :start-after: # [17-test_references_and_objects]
260 :end-before: # ![17-test_references_and_objects]
261
262 Once you have a tree, you can get its contents
263
264 .. literalinclude:: ../../git/test/test_docs.py
265 :language: python
266 :start-after: # [18-test_references_and_objects]
267 :end-before: # ![18-test_references_and_objects]
268
269 It is useful to know that a tree behaves like a list with the ability to query entries by name
270
271 .. literalinclude:: ../../git/test/test_docs.py
272 :language: python
273 :start-after: # [19-test_references_and_objects]
274 :end-before: # ![19-test_references_and_objects]
275
276 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 a posix system
277
278 .. literalinclude:: ../../git/test/test_docs.py
279 :language: python
280 :start-after: # [20-test_references_and_objects]
281 :end-before: # ![20-test_references_and_objects]
282
283 You can also get a commit's root tree directly from the repository
284
285 .. literalinclude:: ../../git/test/test_docs.py
286 :language: python
287 :start-after: # [21-test_references_and_objects]
288 :end-before: # ![21-test_references_and_objects]
289
290 As trees allow direct access to their intermediate child entries only, use the traverse method to obtain an iterator to retrieve entries recursively
291
292 .. literalinclude:: ../../git/test/test_docs.py
293 :language: python
294 :start-after: # [22-test_references_and_objects]
295 :end-before: # ![22-test_references_and_objects]
296
297 .. note:: If trees return Submodule objects, they will assume that they exist at the current head's commit. The tree it originated from may be rooted at another commit though, that it doesn't know. That is why the caller would have to set the submodule's owning or parent commit using the ``set_parent_commit(my_commit)`` method.
298
299 The Index Object
300 ****************
301 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 :class:`IndexFile <git.index.base.IndexFile>` object.
302 Modify the index with ease
303
304 .. literalinclude:: ../../git/test/test_docs.py
305 :language: python
306 :start-after: # [23-test_references_and_objects]
307 :end-before: # ![23-test_references_and_objects]
308
309 Create new indices from other trees or as result of a merge. Write that result to a new index file for later inspection.
310
311 .. literalinclude:: ../../git/test/test_docs.py
312 :language: python
313 :start-after: # [24-test_references_and_objects]
314 :end-before: # ![24-test_references_and_objects]
315
316 Handling Remotes
317 ****************
318
319 :class:`Remotes <git.remote.Remote>` are used as alias for a foreign repository to ease pushing to and fetching from them
320
321 .. literalinclude:: ../../git/test/test_docs.py
322 :language: python
323 :start-after: # [25-test_references_and_objects]
324 :end-before: # ![25-test_references_and_objects]
325
326 You can easily access configuration information for a remote by accessing options as if they where attributes. The modification of remote configuration is more explicit though.
327
328 .. literalinclude:: ../../git/test/test_docs.py
329 :language: python
330 :start-after: # [26-test_references_and_objects]
331 :end-before: # ![26-test_references_and_objects]
332
333 You can also specify per-call custom environments using a new context manager on the Git command, e.g. for using a specific SSH key. The following example works with `git` starting at *v2.3*::
334
335 ssh_cmd = 'ssh -i id_deployment_key'
336 with repo.git.custom_environment(GIT_SSH_COMMAND=ssh_cmd):
337 repo.remotes.origin.fetch()
338
339 This one sets a custom script to be executed in place of `ssh`, and can be used in `git` prior to *v2.3*::
340
341 ssh_executable = os.path.join(rw_dir, 'my_ssh_executable.sh')
342 with repo.git.custom_environment(GIT_SSH=ssh_executable):
343 repo.remotes.origin.fetch()
344
345 Here's an example executable that can be used in place of the `ssh_executable` above::
346
347 #!/bin/sh
348 ID_RSA=/var/lib/openshift/5562b947ecdd5ce939000038/app-deployments/id_rsa
349 exec /usr/bin/ssh -o StrictHostKeyChecking=no -i $ID_RSA "$@"
350
351 Please note that the script must be executable (i.e. `chomd +x script.sh`). `StrictHostKeyChecking=no` is used to avoid prompts asking to save the hosts key to `~/.ssh/known_hosts`, which happens in case you run this as daemon.
352
353 You might also have a look at `Git.update_environment(...)` in case you want to setup a changed environment more permanently.
354
355 Submodule Handling
356 ******************
357 :class:`Submodules <git.objects.submodule.base.Submodule>` can be conveniently handled using the methods provided by GitPython, and as an added benefit, GitPython provides functionality which behave smarter and less error prone than its original c-git implementation, that is GitPython tries hard to keep your repository consistent when updating submodules recursively or adjusting the existing configuration.
358
359 .. literalinclude:: ../../git/test/test_docs.py
360 :language: python
361 :start-after: # [1-test_submodules]
362 :end-before: # ![1-test_submodules]
363
364 In addition to the query functionality, you can move the submodule's repository to a different path <``move(...)``>, write its configuration <``config_writer().set_value(...).release()``>, update its working tree <``update(...)``>, and remove or add them <``remove(...)``, ``add(...)``>.
365
366 If you obtained your submodule object by traversing a tree object which is not rooted at the head's commit, you have to inform the submodule about its actual commit to retrieve the data from by using the ``set_parent_commit(...)`` method.
367
368 The special :class:`RootModule <git.objects.submodule.root.RootModule>` type allows you to treat your master repository as root of a hierarchy of submodules, which allows very convenient submodule handling. Its ``update(...)`` method is reimplemented to provide an advanced way of updating submodules as they change their values over time. The update method will track changes and make sure your working tree and submodule checkouts stay consistent, which is very useful in case submodules get deleted or added to name just two of the handled cases.
369
370 Additionally, GitPython adds functionality to track a specific branch, instead of just a commit. Supported by customized update methods, you are able to automatically update submodules to the latest revision available in the remote repository, as well as to keep track of changes and movements of these submodules. To use it, set the name of the branch you want to track to the ``submodule.$name.branch`` option of the *.gitmodules* file, and use GitPython update methods on the resulting repository with the ``to_latest_revision`` parameter turned on. In the latter case, the sha of your submodule will be ignored, instead a local tracking branch will be updated to the respective remote branch automatically, provided there are no local changes. The resulting behaviour is much like the one of svn::externals, which can be useful in times.
371
372 Obtaining Diff Information
373 **************************
374
375 Diffs can generally be obtained by subclasses of :class:`Diffable <git.diff.Diffable>` as they provide the ``diff`` method. This operation yields a :class:`DiffIndex <git.diff.DiffIndex>` allowing you to easily access diff information about paths.
376
377 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.
378
379 .. literalinclude:: ../../git/test/test_docs.py
380 :language: python
381 :start-after: # [27-test_references_and_objects]
382 :end-before: # ![27-test_references_and_objects]
383
384 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.
385
386 .. literalinclude:: ../../git/test/test_docs.py
387 :language: python
388 :start-after: # [28-test_references_and_objects]
389 :end-before: # ![28-test_references_and_objects]
390
391 Use the diff framework if you want to implement git-status like functionality.
392
393 * A diff between the index and the commit's tree your HEAD points to
394
395 * use ``repo.index.diff(repo.head.commit)``
396
397 * A diff between the index and the working tree
398
399 * use ``repo.index.diff(None)``
400
401 * A list of untracked files
402
403 * use ``repo.untracked_files``
404
405 Switching Branches
406 ******************
407 To switch between branches similar to ``git checkout``, you effectively need to point your HEAD symbolic reference to the new branch and reset your index and working copy to match. A simple manual way to do it is the following one
408
409 .. literalinclude:: ../../git/test/test_docs.py
410 :language: python
411 :start-after: # [29-test_references_and_objects]
412 :end-before: # ![29-test_references_and_objects]
413
414 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``. The latter will generally prevent you from destroying your work. Use the safer approach as follows.
415
416 .. literalinclude:: ../../git/test/test_docs.py
417 :language: python
418 :start-after: # [30-test_references_and_objects]
419 :end-before: # ![30-test_references_and_objects]
420
421 Initializing a repository
422 *************************
423
424 In this example, we will initialize an empty repository, add an empty file to the index, and commit the change.
425
426 .. literalinclude:: ../../git/test/test_docs.py
427 :language: python
428 :start-after: def test_add_file_and_commit
429 :end-before: # ![test_add_file_and_commit]
430
431 Please have a look at the individual methods as they usually support a vast amount of arguments to customize their behavior.
432
433 Using git directly
434 ******************
435 In case you are missing functionality as it has not been wrapped, you may conveniently use the :class:`git <git.cmd.Git>` command directly. It is owned by each repository instance.
436
437 .. literalinclude:: ../../git/test/test_docs.py
438 :language: python
439 :start-after: # [31-test_references_and_objects]
440 :end-before: # ![31-test_references_and_objects]
441
442 The return value will by default be a string of the standard output channel produced by the command.
443
444 Keyword arguments translate to short and long keyword arguments on the command-line.
445 The special notion ``git.command(flag=True)`` will create a flag without value like ``command --flag``.
446
447 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.
448
449
450 Object Databases
451 ****************
452 :class:`git.Repo <git.repo.base.Repo>` instances are powered by its object database instance which will be used when extracting any data, or when writing new objects.
453
454 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.
455
456 GitDB
457 =====
458 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::
459
460 repo = Repo("path/to/repo", odbt=GitDB)
461
462
463 GitCmdObjectDB
464 ==============
465 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``::
466
467 repo = Repo("path/to/repo", odbt=GitCmdObjectDB)
468
469 Git Command Debugging and Customization
470 ***************************************
471
472 Using environment variables, you can further adjust the behaviour of the git command.
473
474 * **GIT_PYTHON_TRACE**
475
476 * If set to non-0, all executed git commands will be shown as they happen
477 * If set to *full*, the executed git command _and_ its entire output on stdout and stderr will be shown as they happen
478
479 **NOTE**: All logging is outputted using a Python logger, so make sure your program is configured to show INFO-level messages. If this is not the case, try adding the following to your program::
480
481 import logging
482 logging.basicConfig(level=logging.INFO)
483
484 * **GIT_PYTHON_GIT_EXECUTABLE**
485
486 * If set, it should contain the full path to the git executable, e.g. *c:\\Program Files (x86)\\Git\\bin\\git.exe* on windows or */usr/bin/git* on linux.
487
488 And even more ...
489 *****************
490
491 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.
492
493 Check the unit tests for an in-depth introduction on how each function is supposed to be used.
494
+0
-25
doc/build/html/_sources/whatsnew.txt less more
0
1 ################
2 Whats New in 0.3
3 ################
4 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.
5
6 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.
7
8 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.
9
10 ****************
11 Object Databases
12 ****************
13 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.
14
15 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.
16
17 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.
18
19 ************************
20 Reduced Memory Footprint
21 ************************
22 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.
23
24 The internal caches of tree objects were improved to use less memory as well.
doc/build/html/_static/ajax-loader.gif less more
Binary diff not shown
+0
-593
doc/build/html/_static/alabaster.css less more
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 @import url("basic.css");
18
19 /* -- page layout ----------------------------------------------------------- */
20
21 body {
22 font-family: 'goudy old style', 'minion pro', 'bell mt', Georgia, 'Hiragino Mincho Pro', serif;
23 font-size: 17px;
24 background-color: white;
25 color: #000;
26 margin: 0;
27 padding: 0;
28 }
29
30 div.document {
31 width: 940px;
32 margin: 30px auto 0 auto;
33 }
34
35 div.documentwrapper {
36 float: left;
37 width: 100%;
38 }
39
40 div.bodywrapper {
41 margin: 0 0 0 220px;
42 }
43
44 div.sphinxsidebar {
45 width: 220px;
46 }
47
48 hr {
49 border: 1px solid #B1B4B6;
50 }
51
52 div.body {
53 background-color: #ffffff;
54 color: #3E4349;
55 padding: 0 30px 0 30px;
56 }
57
58 div.body > .section {
59 text-align: left;
60 }
61
62 div.footer {
63 width: 940px;
64 margin: 20px auto 30px auto;
65 font-size: 14px;
66 color: #888;
67 text-align: right;
68 }
69
70 div.footer a {
71 color: #888;
72 }
73
74
75 div.relations {
76 display: none;
77 }
78
79
80 div.sphinxsidebar a {
81 color: #444;
82 text-decoration: none;
83 border-bottom: 1px dotted #999;
84 }
85
86 div.sphinxsidebar a:hover {
87 border-bottom: 1px solid #999;
88 }
89
90 div.sphinxsidebar {
91 font-size: 14px;
92 line-height: 1.5;
93 }
94
95 div.sphinxsidebarwrapper {
96 padding: 18px 10px;
97 }
98
99 div.sphinxsidebarwrapper p.logo {
100 padding: 0;
101 margin: -10px 0 0 0px;
102 text-align: center;
103 }
104
105 div.sphinxsidebarwrapper h1.logo {
106 margin-top: -10px;
107 text-align: center;
108 margin-bottom: 5px;
109 text-align: left;
110 }
111
112 div.sphinxsidebarwrapper h1.logo-name {
113 margin-top: 0px;
114 }
115
116 div.sphinxsidebarwrapper p.blurb {
117 margin-top: 0;
118 font-style: normal;
119 }
120
121 div.sphinxsidebar h3,
122 div.sphinxsidebar h4 {
123 font-family: 'Garamond', 'Georgia', serif;
124 color: #444;
125 font-size: 24px;
126 font-weight: normal;
127 margin: 0 0 5px 0;
128 padding: 0;
129 }
130
131 div.sphinxsidebar h4 {
132 font-size: 20px;
133 }
134
135 div.sphinxsidebar h3 a {
136 color: #444;
137 }
138
139 div.sphinxsidebar p.logo a,
140 div.sphinxsidebar h3 a,
141 div.sphinxsidebar p.logo a:hover,
142 div.sphinxsidebar h3 a:hover {
143 border: none;
144 }
145
146 div.sphinxsidebar p {
147 color: #555;
148 margin: 10px 0;
149 }
150
151 div.sphinxsidebar ul {
152 margin: 10px 0;
153 padding: 0;
154 color: #000;
155 }
156
157 div.sphinxsidebar ul li.toctree-l1 > a {
158 font-size: 120%;
159 }
160
161 div.sphinxsidebar ul li.toctree-l2 > a {
162 font-size: 110%;
163 }
164
165 div.sphinxsidebar input {
166 border: 1px solid #CCC;
167 font-family: 'goudy old style', 'minion pro', 'bell mt', Georgia, 'Hiragino Mincho Pro', serif;
168 font-size: 1em;
169 }
170
171 div.sphinxsidebar hr {
172 border: none;
173 height: 1px;
174 color: #AAA;
175 background: #AAA;
176
177 text-align: left;
178 margin-left: 0;
179 width: 50%;
180 }
181
182 /* -- body styles ----------------------------------------------------------- */
183
184 a {
185 color: #004B6B;
186 text-decoration: underline;
187 }
188
189 a:hover {
190 color: #6D4100;
191 text-decoration: underline;
192 }
193
194 div.body h1,
195 div.body h2,
196 div.body h3,
197 div.body h4,
198 div.body h5,
199 div.body h6 {
200 font-family: 'Garamond', 'Georgia', serif;
201 font-weight: normal;
202 margin: 30px 0px 10px 0px;
203 padding: 0;
204 }
205
206 div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; }
207 div.body h2 { font-size: 180%; }
208 div.body h3 { font-size: 150%; }
209 div.body h4 { font-size: 130%; }
210 div.body h5 { font-size: 100%; }
211 div.body h6 { font-size: 100%; }
212
213 a.headerlink {
214 color: #DDD;
215 padding: 0 4px;
216 text-decoration: none;
217 }
218
219 a.headerlink:hover {
220 color: #444;
221 background: #EAEAEA;
222 }
223
224 div.body p, div.body dd, div.body li {
225 line-height: 1.4em;
226 }
227
228 div.admonition {
229 margin: 20px 0px;
230 padding: 10px 30px;
231 background-color: #FCC;
232 border: 1px solid #FAA;
233 }
234
235 div.admonition tt.xref, div.admonition a tt {
236 border-bottom: 1px solid #fafafa;
237 }
238
239 dd div.admonition {
240 margin-left: -60px;
241 padding-left: 60px;
242 }
243
244 div.admonition p.admonition-title {
245 font-family: 'Garamond', 'Georgia', serif;
246 font-weight: normal;
247 font-size: 24px;
248 margin: 0 0 10px 0;
249 padding: 0;
250 line-height: 1;
251 }
252
253 div.admonition p.last {
254 margin-bottom: 0;
255 }
256
257 div.highlight {
258 background-color: white;
259 }
260
261 dt:target, .highlight {
262 background: #FAF3E8;
263 }
264
265 div.note {
266 background-color: #EEE;
267 border: 1px solid #CCC;
268 }
269
270 div.seealso {
271 background-color: #EEE;
272 border: 1px solid #CCC;
273 }
274
275 div.topic {
276 background-color: #eee;
277 }
278
279 p.admonition-title {
280 display: inline;
281 }
282
283 p.admonition-title:after {
284 content: ":";
285 }
286
287 pre, tt, code {
288 font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
289 font-size: 0.9em;
290 }
291
292 .hll {
293 background-color: #FFC;
294 margin: 0 -12px;
295 padding: 0 12px;
296 display: block;
297 }
298
299 img.screenshot {
300 }
301
302 tt.descname, tt.descclassname, code.descname, code.descclassname {
303 font-size: 0.95em;
304 }
305
306 tt.descname, code.descname {
307 padding-right: 0.08em;
308 }
309
310 img.screenshot {
311 -moz-box-shadow: 2px 2px 4px #eee;
312 -webkit-box-shadow: 2px 2px 4px #eee;
313 box-shadow: 2px 2px 4px #eee;
314 }
315
316 table.docutils {
317 border: 1px solid #888;
318 -moz-box-shadow: 2px 2px 4px #eee;
319 -webkit-box-shadow: 2px 2px 4px #eee;
320 box-shadow: 2px 2px 4px #eee;
321 }
322
323 table.docutils td, table.docutils th {
324 border: 1px solid #888;
325 padding: 0.25em 0.7em;
326 }
327
328 table.field-list, table.footnote {
329 border: none;
330 -moz-box-shadow: none;
331 -webkit-box-shadow: none;
332 box-shadow: none;
333 }
334
335 table.footnote {
336 margin: 15px 0;
337 width: 100%;
338 border: 1px solid #EEE;
339 background: #FDFDFD;
340 font-size: 0.9em;
341 }
342
343 table.footnote + table.footnote {
344 margin-top: -15px;
345 border-top: none;
346 }
347
348 table.field-list th {
349 padding: 0 0.8em 0 0;
350 }
351
352 table.field-list td {
353 padding: 0;
354 }
355
356 table.field-list p {
357 margin-bottom: 0.8em;
358 }
359
360 table.footnote td.label {
361 width: 0px;
362 padding: 0.3em 0 0.3em 0.5em;
363 }
364
365 table.footnote td {
366 padding: 0.3em 0.5em;
367 }
368
369 dl {
370 margin: 0;
371 padding: 0;
372 }
373
374 dl dd {
375 margin-left: 30px;
376 }
377
378 blockquote {
379 margin: 0 0 0 30px;
380 padding: 0;
381 }
382
383 ul, ol {
384 margin: 10px 0 10px 30px;
385 padding: 0;
386 }
387
388 pre {
389 background: #EEE;
390 padding: 7px 30px;
391 margin: 15px 0px;
392 line-height: 1.3em;
393 }
394
395 dl pre, blockquote pre, li pre {
396 margin-left: 0;
397 padding-left: 30px;
398 }
399
400 dl dl pre {
401 margin-left: -90px;
402 padding-left: 90px;
403 }
404
405 tt, code {
406 background-color: #ecf0f3;
407 color: #222;
408 /* padding: 1px 2px; */
409 }
410
411 tt.xref, code.xref, a tt {
412 background-color: #FBFBFB;
413 border-bottom: 1px solid white;
414 }
415
416 a.reference {
417 text-decoration: none;
418 border-bottom: 1px dotted #004B6B;
419 }
420
421 a.reference:hover {
422 border-bottom: 1px solid #6D4100;
423 }
424
425 a.footnote-reference {
426 text-decoration: none;
427 font-size: 0.7em;
428 vertical-align: top;
429 border-bottom: 1px dotted #004B6B;
430 }
431
432 a.footnote-reference:hover {
433 border-bottom: 1px solid #6D4100;
434 }
435
436 a:hover tt, a:hover code {
437 background: #EEE;
438 }
439
440
441 @media screen and (max-width: 870px) {
442
443 div.sphinxsidebar {
444 display: none;
445 }
446
447 div.document {
448 width: 100%;
449
450 }
451
452 div.documentwrapper {
453 margin-left: 0;
454 margin-top: 0;
455 margin-right: 0;
456 margin-bottom: 0;
457 }
458
459 div.bodywrapper {
460 margin-top: 0;
461 margin-right: 0;
462 margin-bottom: 0;
463 margin-left: 0;
464 }
465
466 ul {
467 margin-left: 0;
468 }
469
470 .document {
471 width: auto;
472 }
473
474 .footer {
475 width: auto;
476 }
477
478 .bodywrapper {
479 margin: 0;
480 }
481
482 .footer {
483 width: auto;
484 }
485
486 .github {
487 display: none;
488 }
489
490
491
492 }
493
494
495
496 @media screen and (max-width: 875px) {
497
498 body {
499 margin: 0;
500 padding: 20px 30px;
501 }
502
503 div.documentwrapper {
504 float: none;
505 background: white;
506 }
507
508 div.sphinxsidebar {
509 display: block;
510 float: none;
511 width: 102.5%;
512 margin: 50px -30px -20px -30px;
513 padding: 10px 20px;
514 background: #333;
515 color: #FFF;
516 }
517
518 div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p,
519 div.sphinxsidebar h3 a {
520 color: white;
521 }
522
523 div.sphinxsidebar a {
524 color: #AAA;
525 }
526
527 div.sphinxsidebar p.logo {
528 display: none;
529 }
530
531 div.document {
532 width: 100%;
533 margin: 0;
534 }
535
536 div.footer {
537 display: none;
538 }
539
540 div.bodywrapper {
541 margin: 0;
542 }
543
544 div.body {
545 min-height: 0;
546 padding: 0;
547 }
548
549 .rtd_doc_footer {
550 display: none;
551 }
552
553 .document {
554 width: auto;
555 }
556
557 .footer {
558 width: auto;
559 }
560
561 .footer {
562 width: auto;
563 }
564
565 .github {
566 display: none;
567 }
568 }
569
570
571 /* misc. */
572
573 .revsys-inline {
574 display: none!important;
575 }
576
577 /* Make nested-list/multi-paragraph items look better in Releases changelog
578 * pages. Without this, docutils' magical list fuckery causes inconsistent
579 * formatting between different release sub-lists.
580 */
581 div#changelog > div.section > ul > li > p:only-child {
582 margin-bottom: 0;
583 }
584
585 /* Hide fugly table cell borders in ..bibliography:: directive output */
586 table.docutils.citation, table.docutils.citation td, table.docutils.citation th {
587 border: none;
588 /* Below needed in some edge cases; if not applied, bottom shadows appear */
589 -moz-box-shadow: none;
590 -webkit-box-shadow: none;
591 box-shadow: none;
592 }
+0
-608
doc/build/html/_static/basic.css less more
0 /*
1 * basic.css
2 * ~~~~~~~~~
3 *
4 * Sphinx stylesheet -- basic theme.
5 *
6 * :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
7 * :license: BSD, see LICENSE for details.
8 *
9 */
10
11 /* -- main layout ----------------------------------------------------------- */
12
13 div.clearer {
14 clear: both;
15 }
16
17 /* -- relbar ---------------------------------------------------------------- */
18
19 div.related {
20 width: 100%;
21 font-size: 90%;
22 }
23
24 div.related h3 {
25 display: none;
26 }
27
28 div.related ul {
29 margin: 0;
30 padding: 0 0 0 10px;
31 list-style: none;
32 }
33
34 div.related li {
35 display: inline;
36 }
37
38 div.related li.right {
39 float: right;
40 margin-right: 5px;
41 }
42
43 /* -- sidebar --------------------------------------------------------------- */
44
45 div.sphinxsidebarwrapper {
46 padding: 10px 5px 0 10px;
47 }
48
49 div.sphinxsidebar {
50 float: left;
51 width: 230px;
52 margin-left: -100%;
53 font-size: 90%;
54 word-wrap: break-word;
55 overflow-wrap : break-word;
56 }
57
58 div.sphinxsidebar ul {
59 list-style: none;
60 }
61
62 div.sphinxsidebar ul ul,
63 div.sphinxsidebar ul.want-points {
64 margin-left: 20px;
65 list-style: square;
66 }
67
68 div.sphinxsidebar ul ul {
69 margin-top: 0;
70 margin-bottom: 0;
71 }
72
73 div.sphinxsidebar form {
74 margin-top: 10px;
75 }
76
77 div.sphinxsidebar input {
78 border: 1px solid #98dbcc;
79 font-family: sans-serif;
80 font-size: 1em;
81 }
82
83 div.sphinxsidebar #searchbox input[type="text"] {
84 width: 170px;
85 }
86
87 div.sphinxsidebar #searchbox input[type="submit"] {
88 width: 30px;
89 }
90
91 img {
92 border: 0;
93 max-width: 100%;
94 }
95
96 /* -- search page ----------------------------------------------------------- */
97
98 ul.search {
99 margin: 10px 0 0 20px;
100 padding: 0;
101 }
102
103 ul.search li {
104 padding: 5px 0 5px 20px;
105 background-image: url(file.png);
106 background-repeat: no-repeat;
107 background-position: 0 7px;
108 }
109
110 ul.search li a {
111 font-weight: bold;
112 }
113
114 ul.search li div.context {
115 color: #888;
116 margin: 2px 0 0 30px;
117 text-align: left;
118 }
119
120 ul.keywordmatches li.goodmatch a {
121 font-weight: bold;
122 }
123
124 /* -- index page ------------------------------------------------------------ */
125
126 table.contentstable {
127 width: 90%;
128 }
129
130 table.contentstable p.biglink {
131 line-height: 150%;
132 }
133
134 a.biglink {
135 font-size: 1.3em;
136 }
137
138 span.linkdescr {
139 font-style: italic;
140 padding-top: 5px;
141 font-size: 90%;
142 }
143
144 /* -- general index --------------------------------------------------------- */
145
146 table.indextable {
147 width: 100%;
148 }
149
150 table.indextable td {
151 text-align: left;
152 vertical-align: top;
153 }
154
155 table.indextable dl, table.indextable dd {
156 margin-top: 0;
157 margin-bottom: 0;
158 }
159
160 table.indextable tr.pcap {
161 height: 10px;
162 }
163
164 table.indextable tr.cap {
165 margin-top: 10px;
166 background-color: #f2f2f2;
167 }
168
169 img.toggler {
170 margin-right: 3px;
171 margin-top: 3px;
172 cursor: pointer;
173 }
174
175 div.modindex-jumpbox {
176 border-top: 1px solid #ddd;
177 border-bottom: 1px solid #ddd;
178 margin: 1em 0 1em 0;
179 padding: 0.4em;
180 }
181
182 div.genindex-jumpbox {
183 border-top: 1px solid #ddd;
184 border-bottom: 1px solid #ddd;
185 margin: 1em 0 1em 0;
186 padding: 0.4em;
187 }
188
189 /* -- general body styles --------------------------------------------------- */
190
191 div.body p, div.body dd, div.body li, div.body blockquote {
192 -moz-hyphens: auto;
193 -ms-hyphens: auto;
194 -webkit-hyphens: auto;
195 hyphens: auto;
196 }
197
198 a.headerlink {
199 visibility: hidden;
200 }
201
202 h1:hover > a.headerlink,
203 h2:hover > a.headerlink,
204 h3:hover > a.headerlink,
205 h4:hover > a.headerlink,
206 h5:hover > a.headerlink,
207 h6:hover > a.headerlink,
208 dt:hover > a.headerlink,
209 caption:hover > a.headerlink,
210 p.caption:hover > a.headerlink,
211 div.code-block-caption:hover > a.headerlink {
212 visibility: visible;
213 }
214
215 div.body p.caption {
216 text-align: inherit;
217 }
218
219 div.body td {
220 text-align: left;
221 }
222
223 .field-list ul {
224 padding-left: 1em;
225 }
226
227 .first {
228 margin-top: 0 !important;
229 }
230
231 p.rubric {
232 margin-top: 30px;
233 font-weight: bold;
234 }
235
236 img.align-left, .figure.align-left, object.align-left {
237 clear: left;
238 float: left;
239 margin-right: 1em;
240 }
241
242 img.align-right, .figure.align-right, object.align-right {
243 clear: right;
244 float: right;
245 margin-left: 1em;
246 }
247
248 img.align-center, .figure.align-center, object.align-center {
249 display: block;
250 margin-left: auto;
251 margin-right: auto;
252 }
253
254 .align-left {
255 text-align: left;
256 }
257
258 .align-center {
259 text-align: center;
260 }
261
262 .align-right {
263 text-align: right;
264 }
265
266 /* -- sidebars -------------------------------------------------------------- */
267
268 div.sidebar {
269 margin: 0 0 0.5em 1em;
270 border: 1px solid #ddb;
271 padding: 7px 7px 0 7px;
272 background-color: #ffe;
273 width: 40%;
274 float: right;
275 }
276
277 p.sidebar-title {
278 font-weight: bold;
279 }
280
281 /* -- topics ---------------------------------------------------------------- */
282
283 div.topic {
284 border: 1px solid #ccc;
285 padding: 7px 7px 0 7px;
286 margin: 10px 0 10px 0;
287 }
288
289 p.topic-title {
290 font-size: 1.1em;
291 font-weight: bold;
292 margin-top: 10px;
293 }
294
295 /* -- admonitions ----------------------------------------------------------- */
296
297 div.admonition {
298 margin-top: 10px;
299 margin-bottom: 10px;
300 padding: 7px;
301 }
302
303 div.admonition dt {
304 font-weight: bold;
305 }
306
307 div.admonition dl {
308 margin-bottom: 0;
309 }
310
311 p.admonition-title {
312 margin: 0px 10px 5px 0px;
313 font-weight: bold;
314 }
315
316 div.body p.centered {
317 text-align: center;
318 margin-top: 25px;
319 }
320
321 /* -- tables ---------------------------------------------------------------- */
322
323 table.docutils {
324 border: 0;
325 border-collapse: collapse;
326 }
327
328 table caption span.caption-number {
329 font-style: italic;
330 }
331
332 table caption span.caption-text {
333 }
334
335 table.docutils td, table.docutils th {
336 padding: 1px 8px 1px 5px;
337 border-top: 0;
338 border-left: 0;
339 border-right: 0;
340 border-bottom: 1px solid #aaa;
341 }
342
343 table.field-list td, table.field-list th {
344 border: 0 !important;
345 }
346
347 table.footnote td, table.footnote th {
348 border: 0 !important;
349 }
350
351 th {
352 text-align: left;
353 padding-right: 5px;
354 }
355
356 table.citation {
357 border-left: solid 1px gray;
358 margin-left: 1px;
359 }
360
361 table.citation td {
362 border-bottom: none;
363 }
364
365 /* -- figures --------------------------------------------------------------- */
366
367 div.figure {
368 margin: 0.5em;
369 padding: 0.5em;
370 }
371
372 div.figure p.caption {
373 padding: 0.3em;
374 }
375
376 div.figure p.caption span.caption-number {
377 font-style: italic;
378 }
379
380 div.figure p.caption span.caption-text {
381 }
382
383
384 /* -- other body styles ----------------------------------------------------- */
385
386 ol.arabic {
387 list-style: decimal;
388 }
389
390 ol.loweralpha {
391 list-style: lower-alpha;
392 }
393
394 ol.upperalpha {
395 list-style: upper-alpha;
396 }
397
398 ol.lowerroman {
399 list-style: lower-roman;
400 }
401
402 ol.upperroman {
403 list-style: upper-roman;
404 }
405
406 dl {
407 margin-bottom: 15px;
408 }
409
410 dd p {
411 margin-top: 0px;
412 }
413
414 dd ul, dd table {
415 margin-bottom: 10px;
416 }
417
418 dd {
419 margin-top: 3px;
420 margin-bottom: 10px;
421 margin-left: 30px;
422 }
423
424 dt:target, .highlighted {
425 background-color: #fbe54e;
426 }
427
428 dl.glossary dt {
429 font-weight: bold;
430 font-size: 1.1em;
431 }
432
433 .field-list ul {
434 margin: 0;
435 padding-left: 1em;
436 }
437
438 .field-list p {
439 margin: 0;
440 }
441
442 .optional {
443 font-size: 1.3em;
444 }
445
446 .sig-paren {
447 font-size: larger;
448 }
449
450 .versionmodified {
451 font-style: italic;
452 }
453
454 .system-message {
455 background-color: #fda;
456 padding: 5px;
457 border: 3px solid red;
458 }
459
460 .footnote:target {
461 background-color: #ffa;
462 }
463
464 .line-block {
465 display: block;
466 margin-top: 1em;
467 margin-bottom: 1em;
468 }
469
470 .line-block .line-block {
471 margin-top: 0;
472 margin-bottom: 0;
473 margin-left: 1.5em;
474 }
475
476 .guilabel, .menuselection {
477 font-family: sans-serif;
478 }
479
480 .accelerator {
481 text-decoration: underline;
482 }
483
484 .classifier {
485 font-style: oblique;
486 }
487
488 abbr, acronym {
489 border-bottom: dotted 1px;
490 cursor: help;
491 }
492
493 /* -- code displays --------------------------------------------------------- */
494
495 pre {
496 overflow: auto;
497 overflow-y: hidden; /* fixes display issues on Chrome browsers */
498 }
499
500 td.linenos pre {
501 padding: 5px 0px;
502 border: 0;
503 background-color: transparent;
504 color: #aaa;
505 }
506
507 table.highlighttable {
508 margin-left: 0.5em;
509 }
510
511 table.highlighttable td {
512 padding: 0 0.5em 0 0.5em;
513 }
514
515 div.code-block-caption {
516 padding: 2px 5px;
517 font-size: small;
518 }
519
520 div.code-block-caption code {
521 background-color: transparent;
522 }
523
524 div.code-block-caption + div > div.highlight > pre {
525 margin-top: 0;
526 }
527
528 div.code-block-caption span.caption-number {
529 padding: 0.1em 0.3em;
530 font-style: italic;
531 }
532
533 div.code-block-caption span.caption-text {
534 }
535
536 div.literal-block-wrapper {
537 padding: 1em 1em 0;
538 }
539
540 div.literal-block-wrapper div.highlight {
541 margin: 0;
542 }
543
544 code.descname {
545 background-color: transparent;
546 font-weight: bold;
547 font-size: 1.2em;
548 }
549
550 code.descclassname {
551 background-color: transparent;
552 }
553
554 code.xref, a code {
555 background-color: transparent;
556 font-weight: bold;
557 }
558
559 h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
560 background-color: transparent;
561 }
562
563 .viewcode-link {
564 float: right;
565 }
566
567 .viewcode-back {
568 float: right;
569 font-family: sans-serif;
570 }
571
572 div.viewcode-block:target {
573 margin: -1px -10px;
574 padding: 0 10px;
575 }
576
577 /* -- math display ---------------------------------------------------------- */
578
579 img.math {
580 vertical-align: middle;
581 }
582
583 div.body div.math p {
584 text-align: center;
585 }
586
587 span.eqno {
588 float: right;
589 }
590
591 /* -- printout stylesheet --------------------------------------------------- */
592
593 @media print {
594 div.document,
595 div.documentwrapper,
596 div.bodywrapper {
597 margin: 0 !important;
598 width: 100%;
599 }
600
601 div.sphinxsidebar,
602 div.related,
603 div.footer,
604 #top-link {
605 display: none;
606 }
607 }
doc/build/html/_static/comment-bright.png less more
Binary diff not shown
doc/build/html/_static/comment-close.png less more
Binary diff not shown
doc/build/html/_static/comment.png less more
Binary diff not shown
+0
-287
doc/build/html/_static/doctools.js less more
0 /*
1 * doctools.js
2 * ~~~~~~~~~~~
3 *
4 * Sphinx JavaScript utilities for all documentation.
5 *
6 * :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
7 * :license: BSD, see LICENSE for details.
8 *
9 */
10
11 /**
12 * select a different prefix for underscore
13 */
14 $u = _.noConflict();
15
16 /**
17 * make the code below compatible with browsers without
18 * an installed firebug like debugger
19 if (!window.console || !console.firebug) {
20 var names = ["log", "debug", "info", "warn", "error", "assert", "dir",
21 "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace",
22 "profile", "profileEnd"];
23 window.console = {};
24 for (var i = 0; i < names.length; ++i)
25 window.console[names[i]] = function() {};
26 }
27 */
28
29 /**
30 * small helper function to urldecode strings
31 */
32 jQuery.urldecode = function(x) {
33 return decodeURIComponent(x).replace(/\+/g, ' ');
34 };
35
36 /**
37 * small helper function to urlencode strings
38 */
39 jQuery.urlencode = encodeURIComponent;
40
41 /**
42 * This function returns the parsed url parameters of the
43 * current request. Multiple values per key are supported,
44 * it will always return arrays of strings for the value parts.
45 */
46 jQuery.getQueryParameters = function(s) {
47 if (typeof s == 'undefined')
48 s = document.location.search;
49 var parts = s.substr(s.indexOf('?') + 1).split('&');
50 var result = {};
51 for (var i = 0; i < parts.length; i++) {
52 var tmp = parts[i].split('=', 2);
53 var key = jQuery.urldecode(tmp[0]);
54 var value = jQuery.urldecode(tmp[1]);
55 if (key in result)
56 result[key].push(value);
57 else
58 result[key] = [value];
59 }
60 return result;
61 };
62
63 /**
64 * highlight a given string on a jquery object by wrapping it in
65 * span elements with the given class name.
66 */
67 jQuery.fn.highlightText = function(text, className) {
68 function highlight(node) {
69 if (node.nodeType == 3) {
70 var val = node.nodeValue;
71 var pos = val.toLowerCase().indexOf(text);
72 if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) {
73 var span = document.createElement("span");
74 span.className = className;
75 span.appendChild(document.createTextNode(val.substr(pos, text.length)));
76 node.parentNode.insertBefore(span, node.parentNode.insertBefore(
77 document.createTextNode(val.substr(pos + text.length)),
78 node.nextSibling));
79 node.nodeValue = val.substr(0, pos);
80 }
81 }
82 else if (!jQuery(node).is("button, select, textarea")) {
83 jQuery.each(node.childNodes, function() {
84 highlight(this);
85 });
86 }
87 }
88 return this.each(function() {
89 highlight(this);
90 });
91 };
92
93 /*
94 * backward compatibility for jQuery.browser
95 * This will be supported until firefox bug is fixed.
96 */
97 if (!jQuery.browser) {
98 jQuery.uaMatch = function(ua) {
99 ua = ua.toLowerCase();
100
101 var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
102 /(webkit)[ \/]([\w.]+)/.exec(ua) ||
103 /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
104 /(msie) ([\w.]+)/.exec(ua) ||
105 ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
106 [];
107
108 return {
109 browser: match[ 1 ] || "",
110 version: match[ 2 ] || "0"
111 };
112 };
113 jQuery.browser = {};
114 jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
115 }
116
117 /**
118 * Small JavaScript module for the documentation.
119 */
120 var Documentation = {
121
122 init : function() {
123 this.fixFirefoxAnchorBug();
124 this.highlightSearchWords();
125 this.initIndexTable();
126
127 },
128
129 /**
130 * i18n support
131 */
132 TRANSLATIONS : {},
133 PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; },
134 LOCALE : 'unknown',
135
136 // gettext and ngettext don't access this so that the functions
137 // can safely bound to a different name (_ = Documentation.gettext)
138 gettext : function(string) {
139 var translated = Documentation.TRANSLATIONS[string];
140 if (typeof translated == 'undefined')
141 return string;
142 return (typeof translated == 'string') ? translated : translated[0];
143 },
144
145 ngettext : function(singular, plural, n) {
146 var translated = Documentation.TRANSLATIONS[singular];
147 if (typeof translated == 'undefined')
148 return (n == 1) ? singular : plural;
149 return translated[Documentation.PLURALEXPR(n)];
150 },
151
152 addTranslations : function(catalog) {
153 for (var key in catalog.messages)
154 this.TRANSLATIONS[key] = catalog.messages[key];
155 this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')');
156 this.LOCALE = catalog.locale;
157 },
158
159 /**
160 * add context elements like header anchor links
161 */
162 addContextElements : function() {
163 $('div[id] > :header:first').each(function() {
164 $('<a class="headerlink">\u00B6</a>').
165 attr('href', '#' + this.id).
166 attr('title', _('Permalink to this headline')).
167 appendTo(this);
168 });
169 $('dt[id]').each(function() {
170 $('<a class="headerlink">\u00B6</a>').
171 attr('href', '#' + this.id).
172 attr('title', _('Permalink to this definition')).
173 appendTo(this);
174 });
175 },
176
177 /**
178 * workaround a firefox stupidity
179 * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075
180 */
181 fixFirefoxAnchorBug : function() {
182 if (document.location.hash)
183 window.setTimeout(function() {
184 document.location.href += '';
185 }, 10);
186 },
187
188 /**
189 * highlight the search words provided in the url in the text
190 */
191 highlightSearchWords : function() {
192 var params = $.getQueryParameters();
193 var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
194 if (terms.length) {
195 var body = $('div.body');
196 if (!body.length) {
197 body = $('body');
198 }
199 window.setTimeout(function() {
200 $.each(terms, function() {
201 body.highlightText(this.toLowerCase(), 'highlighted');
202 });
203 }, 10);
204 $('<p class="highlight-link"><a href="javascript:Documentation.' +
205 'hideSearchWords()">' + _('Hide Search Matches') + '</a></p>')
206 .appendTo($('#searchbox'));
207 }
208 },
209
210 /**
211 * init the domain index toggle buttons
212 */
213 initIndexTable : function() {
214 var togglers = $('img.toggler').click(function() {
215 var src = $(this).attr('src');
216 var idnum = $(this).attr('id').substr(7);
217 $('tr.cg-' + idnum).toggle();
218 if (src.substr(-9) == 'minus.png')
219 $(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
220 else
221 $(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
222 }).css('display', '');
223 if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) {
224 togglers.click();
225 }
226 },
227
228 /**
229 * helper function to hide the search marks again
230 */
231 hideSearchWords : function() {
232 $('#searchbox .highlight-link').fadeOut(300);
233 $('span.highlighted').removeClass('highlighted');
234 },
235
236 /**
237 * make the url absolute
238 */
239 makeURL : function(relativeURL) {
240 return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;
241 },
242
243 /**
244 * get the current relative url
245 */
246 getCurrentURL : function() {
247 var path = document.location.pathname;
248 var parts = path.split(/\//);
249 $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
250 if (this == '..')
251 parts.pop();
252 });
253 var url = parts.join('/');
254 return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
255 },
256
257 initOnKeyListeners: function() {
258 $(document).keyup(function(event) {
259 var activeElementType = document.activeElement.tagName;
260 // don't navigate when in search box or textarea
261 if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT') {
262 switch (event.keyCode) {
263 case 37: // left
264 var prevHref = $('link[rel="prev"]').prop('href');
265 if (prevHref) {
266 window.location.href = prevHref;
267 return false;
268 }
269 case 39: // right
270 var nextHref = $('link[rel="next"]').prop('href');
271 if (nextHref) {
272 window.location.href = nextHref;
273 return false;
274 }
275 }
276 }
277 });
278 }
279 };
280
281 // quick alias for translations
282 _ = Documentation.gettext;
283
284 $(document).ready(function() {
285 Documentation.init();
286 });
doc/build/html/_static/down-pressed.png less more
Binary diff not shown
doc/build/html/_static/down.png less more
Binary diff not shown
doc/build/html/_static/file.png less more
Binary diff not shown
+0
-10308
doc/build/html/_static/jquery-1.11.1.js less more
0 /*!
1 * jQuery JavaScript Library v1.11.1
2 * http://jquery.com/
3 *
4 * Includes Sizzle.js
5 * http://sizzlejs.com/
6 *
7 * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
8 * Released under the MIT license
9 * http://jquery.org/license
10 *
11 * Date: 2014-05-01T17:42Z
12 */
13
14 (function( global, factory ) {
15
16 if ( typeof module === "object" && typeof module.exports === "object" ) {
17 // For CommonJS and CommonJS-like environments where a proper window is present,
18 // execute the factory and get jQuery
19 // For environments that do not inherently posses a window with a document
20 // (such as Node.js), expose a jQuery-making factory as module.exports
21 // This accentuates the need for the creation of a real window
22 // e.g. var jQuery = require("jquery")(window);
23 // See ticket #14549 for more info
24 module.exports = global.document ?
25 factory( global, true ) :
26 function( w ) {
27 if ( !w.document ) {
28 throw new Error( "jQuery requires a window with a document" );
29 }
30 return factory( w );
31 };
32 } else {
33 factory( global );
34 }
35
36 // Pass this if window is not defined yet
37 }(typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
38
39 // Can't do this because several apps including ASP.NET trace
40 // the stack via arguments.caller.callee and Firefox dies if
41 // you try to trace through "use strict" call chains. (#13335)
42 // Support: Firefox 18+
43 //
44
45 var deletedIds = [];
46
47 var slice = deletedIds.slice;
48
49 var concat = deletedIds.concat;
50
51 var push = deletedIds.push;
52
53 var indexOf = deletedIds.indexOf;
54
55 var class2type = {};
56
57 var toString = class2type.toString;
58
59 var hasOwn = class2type.hasOwnProperty;
60
61 var support = {};
62
63
64
65 var
66 version = "1.11.1",
67
68 // Define a local copy of jQuery
69 jQuery = function( selector, context ) {
70 // The jQuery object is actually just the init constructor 'enhanced'
71 // Need init if jQuery is called (just allow error to be thrown if not included)
72 return new jQuery.fn.init( selector, context );
73 },
74
75 // Support: Android<4.1, IE<9
76 // Make sure we trim BOM and NBSP
77 rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
78
79 // Matches dashed string for camelizing
80 rmsPrefix = /^-ms-/,
81 rdashAlpha = /-([\da-z])/gi,
82
83 // Used by jQuery.camelCase as callback to replace()
84 fcamelCase = function( all, letter ) {
85 return letter.toUpperCase();
86 };
87
88 jQuery.fn = jQuery.prototype = {
89 // The current version of jQuery being used
90 jquery: version,
91
92 constructor: jQuery,
93
94 // Start with an empty selector
95 selector: "",
96
97 // The default length of a jQuery object is 0
98 length: 0,
99
100 toArray: function() {
101 return slice.call( this );
102 },
103
104 // Get the Nth element in the matched element set OR
105 // Get the whole matched element set as a clean array
106 get: function( num ) {
107 return num != null ?
108
109 // Return just the one element from the set
110 ( num < 0 ? this[ num + this.length ] : this[ num ] ) :
111
112 // Return all the elements in a clean array
113 slice.call( this );
114 },
115
116 // Take an array of elements and push it onto the stack
117 // (returning the new matched element set)
118 pushStack: function( elems ) {
119
120 // Build a new jQuery matched element set
121 var ret = jQuery.merge( this.constructor(), elems );
122
123 // Add the old object onto the stack (as a reference)
124 ret.prevObject = this;
125 ret.context = this.context;
126
127 // Return the newly-formed element set
128 return ret;
129 },
130
131 // Execute a callback for every element in the matched set.
132 // (You can seed the arguments with an array of args, but this is
133 // only used internally.)
134 each: function( callback, args ) {
135 return jQuery.each( this, callback, args );
136 },
137
138 map: function( callback ) {
139 return this.pushStack( jQuery.map(this, function( elem, i ) {
140 return callback.call( elem, i, elem );
141 }));
142 },
143
144 slice: function() {
145 return this.pushStack( slice.apply( this, arguments ) );
146 },
147
148 first: function() {
149 return this.eq( 0 );
150 },
151
152 last: function() {
153 return this.eq( -1 );
154 },
155
156 eq: function( i ) {
157 var len = this.length,
158 j = +i + ( i < 0 ? len : 0 );
159 return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );
160 },
161
162 end: function() {
163 return this.prevObject || this.constructor(null);
164 },
165
166 // For internal use only.
167 // Behaves like an Array's method, not like a jQuery method.
168 push: push,
169 sort: deletedIds.sort,
170 splice: deletedIds.splice
171 };
172
173 jQuery.extend = jQuery.fn.extend = function() {
174 var src, copyIsArray, copy, name, options, clone,
175 target = arguments[0] || {},
176 i = 1,
177 length = arguments.length,
178 deep = false;
179
180 // Handle a deep copy situation
181 if ( typeof target === "boolean" ) {
182 deep = target;
183
184 // skip the boolean and the target
185 target = arguments[ i ] || {};
186 i++;
187 }
188
189 // Handle case when target is a string or something (possible in deep copy)
190 if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
191 target = {};
192 }
193
194 // extend jQuery itself if only one argument is passed
195 if ( i === length ) {
196 target = this;
197 i--;
198 }
199
200 for ( ; i < length; i++ ) {
201 // Only deal with non-null/undefined values
202 if ( (options = arguments[ i ]) != null ) {
203 // Extend the base object
204 for ( name in options ) {
205 src = target[ name ];
206 copy = options[ name ];
207
208 // Prevent never-ending loop
209 if ( target === copy ) {
210 continue;
211 }
212
213 // Recurse if we're merging plain objects or arrays
214 if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
215 if ( copyIsArray ) {
216 copyIsArray = false;
217 clone = src && jQuery.isArray(src) ? src : [];
218
219 } else {
220 clone = src && jQuery.isPlainObject(src) ? src : {};
221 }
222
223 // Never move original objects, clone them
224 target[ name ] = jQuery.extend( deep, clone, copy );
225
226 // Don't bring in undefined values
227 } else if ( copy !== undefined ) {
228 target[ name ] = copy;
229 }
230 }
231 }
232 }
233
234 // Return the modified object
235 return target;
236 };
237
238 jQuery.extend({
239 // Unique for each copy of jQuery on the page
240 expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
241
242 // Assume jQuery is ready without the ready module
243 isReady: true,
244
245 error: function( msg ) {
246 throw new Error( msg );
247 },
248
249 noop: function() {},
250
251 // See test/unit/core.js for details concerning isFunction.
252 // Since version 1.3, DOM methods and functions like alert
253 // aren't supported. They return false on IE (#2968).
254 isFunction: function( obj ) {
255 return jQuery.type(obj) === "function";
256 },
257
258 isArray: Array.isArray || function( obj ) {
259 return jQuery.type(obj) === "array";
260 },
261
262 isWindow: function( obj ) {
263 /* jshint eqeqeq: false */
264 return obj != null && obj == obj.window;
265 },
266
267 isNumeric: function( obj ) {
268 // parseFloat NaNs numeric-cast false positives (null|true|false|"")
269 // ...but misinterprets leading-number strings, particularly hex literals ("0x...")
270 // subtraction forces infinities to NaN
271 return !jQuery.isArray( obj ) && obj - parseFloat( obj ) >= 0;
272 },
273
274 isEmptyObject: function( obj ) {
275 var name;
276 for ( name in obj ) {
277 return false;
278 }
279 return true;
280 },
281
282 isPlainObject: function( obj ) {
283 var key;
284
285 // Must be an Object.
286 // Because of IE, we also have to check the presence of the constructor property.
287 // Make sure that DOM nodes and window objects don't pass through, as well
288 if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
289 return false;
290 }
291
292 try {
293 // Not own constructor property must be Object
294 if ( obj.constructor &&
295 !hasOwn.call(obj, "constructor") &&
296 !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
297 return false;
298 }
299 } catch ( e ) {
300 // IE8,9 Will throw exceptions on certain host objects #9897
301 return false;
302 }
303
304 // Support: IE<9
305 // Handle iteration over inherited properties before own properties.
306 if ( support.ownLast ) {
307 for ( key in obj ) {
308 return hasOwn.call( obj, key );
309 }
310 }
311
312 // Own properties are enumerated firstly, so to speed up,
313 // if last one is own, then all properties are own.
314 for ( key in obj ) {}
315
316 return key === undefined || hasOwn.call( obj, key );
317 },
318
319 type: function( obj ) {
320 if ( obj == null ) {
321 return obj + "";
322 }
323 return typeof obj === "object" || typeof obj === "function" ?
324 class2type[ toString.call(obj) ] || "object" :
325 typeof obj;
326 },
327
328 // Evaluates a script in a global context
329 // Workarounds based on findings by Jim Driscoll
330 // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
331 globalEval: function( data ) {
332 if ( data && jQuery.trim( data ) ) {
333 // We use execScript on Internet Explorer
334 // We use an anonymous function so that context is window
335 // rather than jQuery in Firefox
336 ( window.execScript || function( data ) {
337 window[ "eval" ].call( window, data );
338 } )( data );
339 }
340 },
341
342 // Convert dashed to camelCase; used by the css and data modules
343 // Microsoft forgot to hump their vendor prefix (#9572)
344 camelCase: function( string ) {
345 return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
346 },
347
348 nodeName: function( elem, name ) {
349 return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
350 },
351
352 // args is for internal usage only
353 each: function( obj, callback, args ) {
354 var value,
355 i = 0,
356 length = obj.length,
357 isArray = isArraylike( obj );
358
359 if ( args ) {
360 if ( isArray ) {
361 for ( ; i < length; i++ ) {
362 value = callback.apply( obj[ i ], args );
363
364 if ( value === false ) {
365 break;
366 }
367 }
368 } else {
369 for ( i in obj ) {
370 value = callback.apply( obj[ i ], args );
371
372 if ( value === false ) {
373 break;
374 }
375 }
376 }
377
378 // A special, fast, case for the most common use of each
379 } else {
380 if ( isArray ) {
381 for ( ; i < length; i++ ) {
382 value = callback.call( obj[ i ], i, obj[ i ] );
383
384 if ( value === false ) {
385 break;
386 }
387 }
388 } else {
389 for ( i in obj ) {
390 value = callback.call( obj[ i ], i, obj[ i ] );
391
392 if ( value === false ) {
393 break;
394 }
395 }
396 }
397 }
398
399 return obj;
400 },
401
402 // Support: Android<4.1, IE<9
403 trim: function( text ) {
404 return text == null ?
405 "" :
406 ( text + "" ).replace( rtrim, "" );
407 },
408
409 // results is for internal usage only
410 makeArray: function( arr, results ) {
411 var ret = results || [];
412
413 if ( arr != null ) {
414 if ( isArraylike( Object(arr) ) ) {
415 jQuery.merge( ret,
416 typeof arr === "string" ?
417 [ arr ] : arr
418 );
419 } else {
420 push.call( ret, arr );
421 }
422 }
423
424 return ret;
425 },
426
427 inArray: function( elem, arr, i ) {
428 var len;
429
430 if ( arr ) {
431 if ( indexOf ) {
432 return indexOf.call( arr, elem, i );
433 }
434
435 len = arr.length;
436 i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
437
438 for ( ; i < len; i++ ) {
439 // Skip accessing in sparse arrays
440 if ( i in arr && arr[ i ] === elem ) {
441 return i;
442 }
443 }
444 }
445
446 return -1;
447 },
448
449 merge: function( first, second ) {
450 var len = +second.length,
451 j = 0,
452 i = first.length;
453
454 while ( j < len ) {
455 first[ i++ ] = second[ j++ ];
456 }
457
458 // Support: IE<9
459 // Workaround casting of .length to NaN on otherwise arraylike objects (e.g., NodeLists)
460 if ( len !== len ) {
461 while ( second[j] !== undefined ) {
462 first[ i++ ] = second[ j++ ];
463 }
464 }
465
466 first.length = i;
467
468 return first;
469 },
470
471 grep: function( elems, callback, invert ) {
472 var callbackInverse,
473 matches = [],
474 i = 0,
475 length = elems.length,
476 callbackExpect = !invert;
477
478 // Go through the array, only saving the items
479 // that pass the validator function
480 for ( ; i < length; i++ ) {
481 callbackInverse = !callback( elems[ i ], i );
482 if ( callbackInverse !== callbackExpect ) {
483 matches.push( elems[ i ] );
484 }
485 }
486
487 return matches;
488 },
489
490 // arg is for internal usage only
491 map: function( elems, callback, arg ) {
492 var value,
493 i = 0,
494 length = elems.length,
495 isArray = isArraylike( elems ),
496 ret = [];
497
498 // Go through the array, translating each of the items to their new values
499 if ( isArray ) {
500 for ( ; i < length; i++ ) {
501 value = callback( elems[ i ], i, arg );
502
503 if ( value != null ) {
504 ret.push( value );
505 }
506 }
507
508 // Go through every key on the object,
509 } else {
510 for ( i in elems ) {
511 value = callback( elems[ i ], i, arg );
512
513 if ( value != null ) {
514 ret.push( value );
515 }
516 }
517 }
518
519 // Flatten any nested arrays
520 return concat.apply( [], ret );
521 },
522
523 // A global GUID counter for objects
524 guid: 1,
525
526 // Bind a function to a context, optionally partially applying any
527 // arguments.
528 proxy: function( fn, context ) {
529 var args, proxy, tmp;
530
531 if ( typeof context === "string" ) {
532 tmp = fn[ context ];
533 context = fn;
534 fn = tmp;
535 }
536
537 // Quick check to determine if target is callable, in the spec
538 // this throws a TypeError, but we will just return undefined.
539 if ( !jQuery.isFunction( fn ) ) {
540 return undefined;
541 }
542
543 // Simulated bind
544 args = slice.call( arguments, 2 );
545 proxy = function() {
546 return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
547 };
548
549 // Set the guid of unique handler to the same of original handler, so it can be removed
550 proxy.guid = fn.guid = fn.guid || jQuery.guid++;
551
552 return proxy;
553 },
554
555 now: function() {
556 return +( new Date() );
557 },
558
559 // jQuery.support is not used in Core but other projects attach their
560 // properties to it so it needs to exist.
561 support: support
562 });
563
564 // Populate the class2type map
565 jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
566 class2type[ "[object " + name + "]" ] = name.toLowerCase();
567 });
568
569 function isArraylike( obj ) {
570 var length = obj.length,
571 type = jQuery.type( obj );
572
573 if ( type === "function" || jQuery.isWindow( obj ) ) {
574 return false;
575 }
576
577 if ( obj.nodeType === 1 && length ) {
578 return true;
579 }
580
581 return type === "array" || length === 0 ||
582 typeof length === "number" && length > 0 && ( length - 1 ) in obj;
583 }
584 var Sizzle =
585 /*!
586 * Sizzle CSS Selector Engine v1.10.19
587 * http://sizzlejs.com/
588 *
589 * Copyright 2013 jQuery Foundation, Inc. and other contributors
590 * Released under the MIT license
591 * http://jquery.org/license
592 *
593 * Date: 2014-04-18
594 */
595 (function( window ) {
596
597 var i,
598 support,
599 Expr,
600 getText,
601 isXML,
602 tokenize,
603 compile,
604 select,
605 outermostContext,
606 sortInput,
607 hasDuplicate,
608
609 // Local document vars
610 setDocument,
611 document,
612 docElem,
613 documentIsHTML,
614 rbuggyQSA,
615 rbuggyMatches,
616 matches,
617 contains,
618
619 // Instance-specific data
620 expando = "sizzle" + -(new Date()),
621 preferredDoc = window.document,
622 dirruns = 0,
623 done = 0,
624 classCache = createCache(),
625 tokenCache = createCache(),
626 compilerCache = createCache(),
627 sortOrder = function( a, b ) {
628 if ( a === b ) {
629 hasDuplicate = true;
630 }
631 return 0;
632 },
633
634 // General-purpose constants
635 strundefined = typeof undefined,
636 MAX_NEGATIVE = 1 << 31,
637
638 // Instance methods
639 hasOwn = ({}).hasOwnProperty,
640 arr = [],
641 pop = arr.pop,
642 push_native = arr.push,
643 push = arr.push,
644 slice = arr.slice,
645 // Use a stripped-down indexOf if we can't use a native one
646 indexOf = arr.indexOf || function( elem ) {
647 var i = 0,
648 len = this.length;
649 for ( ; i < len; i++ ) {
650 if ( this[i] === elem ) {
651 return i;
652 }
653 }
654 return -1;
655 },
656
657 booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
658
659 // Regular expressions
660
661 // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
662 whitespace = "[\\x20\\t\\r\\n\\f]",
663 // http://www.w3.org/TR/css3-syntax/#characters
664 characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
665
666 // Loosely modeled on CSS identifier characters
667 // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
668 // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
669 identifier = characterEncoding.replace( "w", "w#" ),
670
671 // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
672 attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace +
673 // Operator (capture 2)
674 "*([*^$|!~]?=)" + whitespace +
675 // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
676 "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
677 "*\\]",
678
679 pseudos = ":(" + characterEncoding + ")(?:\\((" +
680 // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
681 // 1. quoted (capture 3; capture 4 or capture 5)
682 "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
683 // 2. simple (capture 6)
684 "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
685 // 3. anything else (capture 2)
686 ".*" +
687 ")\\)|)",
688
689 // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
690 rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
691
692 rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
693 rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
694
695 rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
696
697 rpseudo = new RegExp( pseudos ),
698 ridentifier = new RegExp( "^" + identifier + "$" ),
699
700 matchExpr = {
701 "ID": new RegExp( "^#(" + characterEncoding + ")" ),
702 "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
703 "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
704 "ATTR": new RegExp( "^" + attributes ),
705 "PSEUDO": new RegExp( "^" + pseudos ),
706 "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
707 "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
708 "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
709 "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
710 // For use in libraries implementing .is()
711 // We use this for POS matching in `select`
712 "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
713 whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
714 },
715
716 rinputs = /^(?:input|select|textarea|button)$/i,
717 rheader = /^h\d$/i,
718
719 rnative = /^[^{]+\{\s*\[native \w/,
720
721 // Easily-parseable/retrievable ID or TAG or CLASS selectors
722 rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
723
724 rsibling = /[+~]/,
725 rescape = /'|\\/g,
726
727 // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
728 runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
729 funescape = function( _, escaped, escapedWhitespace ) {
730 var high = "0x" + escaped - 0x10000;
731 // NaN means non-codepoint
732 // Support: Firefox<24
733 // Workaround erroneous numeric interpretation of +"0x"
734 return high !== high || escapedWhitespace ?
735 escaped :
736 high < 0 ?
737 // BMP codepoint
738 String.fromCharCode( high + 0x10000 ) :
739 // Supplemental Plane codepoint (surrogate pair)
740 String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
741 };
742
743 // Optimize for push.apply( _, NodeList )
744 try {
745 push.apply(
746 (arr = slice.call( preferredDoc.childNodes )),
747 preferredDoc.childNodes
748 );
749 // Support: Android<4.0
750 // Detect silently failing push.apply
751 arr[ preferredDoc.childNodes.length ].nodeType;
752 } catch ( e ) {
753 push = { apply: arr.length ?
754
755 // Leverage slice if possible
756 function( target, els ) {
757 push_native.apply( target, slice.call(els) );
758 } :
759
760 // Support: IE<9
761 // Otherwise append directly
762 function( target, els ) {
763 var j = target.length,
764 i = 0;
765 // Can't trust NodeList.length
766 while ( (target[j++] = els[i++]) ) {}
767 target.length = j - 1;
768 }
769 };
770 }
771
772 function Sizzle( selector, context, results, seed ) {
773 var match, elem, m, nodeType,
774 // QSA vars
775 i, groups, old, nid, newContext, newSelector;
776
777 if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
778 setDocument( context );
779 }
780
781 context = context || document;
782 results = results || [];
783
784 if ( !selector || typeof selector !== "string" ) {
785 return results;
786 }
787
788 if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {
789 return [];
790 }
791
792 if ( documentIsHTML && !seed ) {
793
794 // Shortcuts
795 if ( (match = rquickExpr.exec( selector )) ) {
796 // Speed-up: Sizzle("#ID")
797 if ( (m = match[1]) ) {
798 if ( nodeType === 9 ) {
799 elem = context.getElementById( m );
800 // Check parentNode to catch when Blackberry 4.6 returns
801 // nodes that are no longer in the document (jQuery #6963)
802 if ( elem && elem.parentNode ) {
803 // Handle the case where IE, Opera, and Webkit return items
804 // by name instead of ID
805 if ( elem.id === m ) {
806 results.push( elem );
807 return results;
808 }
809 } else {
810 return results;
811 }
812 } else {
813 // Context is not a document
814 if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
815 contains( context, elem ) && elem.id === m ) {
816 results.push( elem );
817 return results;
818 }
819 }
820
821 // Speed-up: Sizzle("TAG")
822 } else if ( match[2] ) {
823 push.apply( results, context.getElementsByTagName( selector ) );
824 return results;
825
826 // Speed-up: Sizzle(".CLASS")
827 } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) {
828 push.apply( results, context.getElementsByClassName( m ) );
829 return results;
830 }
831 }
832
833 // QSA path
834 if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
835 nid = old = expando;
836 newContext = context;
837 newSelector = nodeType === 9 && selector;
838
839 // qSA works strangely on Element-rooted queries
840 // We can work around this by specifying an extra ID on the root
841 // and working up from there (Thanks to Andrew Dupont for the technique)
842 // IE 8 doesn't work on object elements
843 if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
844 groups = tokenize( selector );
845
846 if ( (old = context.getAttribute("id")) ) {
847 nid = old.replace( rescape, "\\$&" );
848 } else {
849 context.setAttribute( "id", nid );
850 }
851 nid = "[id='" + nid + "'] ";
852
853 i = groups.length;
854 while ( i-- ) {
855 groups[i] = nid + toSelector( groups[i] );
856 }
857 newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context;
858 newSelector = groups.join(",");
859 }
860
861 if ( newSelector ) {
862 try {
863 push.apply( results,
864 newContext.querySelectorAll( newSelector )
865 );
866 return results;
867 } catch(qsaError) {
868 } finally {
869 if ( !old ) {
870 context.removeAttribute("id");
871 }
872 }
873 }
874 }
875 }
876
877 // All others
878 return select( selector.replace( rtrim, "$1" ), context, results, seed );
879 }
880
881 /**
882 * Create key-value caches of limited size
883 * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
884 * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
885 * deleting the oldest entry
886 */
887 function createCache() {
888 var keys = [];
889
890 function cache( key, value ) {
891 // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
892 if ( keys.push( key + " " ) > Expr.cacheLength ) {
893 // Only keep the most recent entries
894 delete cache[ keys.shift() ];
895 }
896 return (cache[ key + " " ] = value);
897 }
898 return cache;
899 }
900
901 /**
902 * Mark a function for special use by Sizzle
903 * @param {Function} fn The function to mark
904 */
905 function markFunction( fn ) {
906 fn[ expando ] = true;
907 return fn;
908 }
909
910 /**
911 * Support testing using an element
912 * @param {Function} fn Passed the created div and expects a boolean result
913 */
914 function assert( fn ) {
915 var div = document.createElement("div");
916
917 try {
918 return !!fn( div );
919 } catch (e) {
920 return false;
921 } finally {
922 // Remove from its parent by default
923 if ( div.parentNode ) {
924 div.parentNode.removeChild( div );
925 }
926 // release memory in IE
927 div = null;
928 }
929 }
930
931 /**
932 * Adds the same handler for all of the specified attrs
933 * @param {String} attrs Pipe-separated list of attributes
934 * @param {Function} handler The method that will be applied
935 */
936 function addHandle( attrs, handler ) {
937 var arr = attrs.split("|"),
938 i = attrs.length;
939
940 while ( i-- ) {
941 Expr.attrHandle[ arr[i] ] = handler;
942 }
943 }
944
945 /**
946 * Checks document order of two siblings
947 * @param {Element} a
948 * @param {Element} b
949 * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
950 */
951 function siblingCheck( a, b ) {
952 var cur = b && a,
953 diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
954 ( ~b.sourceIndex || MAX_NEGATIVE ) -
955 ( ~a.sourceIndex || MAX_NEGATIVE );
956
957 // Use IE sourceIndex if available on both nodes
958 if ( diff ) {
959 return diff;
960 }
961
962 // Check if b follows a
963 if ( cur ) {
964 while ( (cur = cur.nextSibling) ) {
965 if ( cur === b ) {
966 return -1;
967 }
968 }
969 }
970
971 return a ? 1 : -1;
972 }
973
974 /**
975 * Returns a function to use in pseudos for input types
976 * @param {String} type
977 */
978 function createInputPseudo( type ) {
979 return function( elem ) {
980 var name = elem.nodeName.toLowerCase();
981 return name === "input" && elem.type === type;
982 };
983 }
984
985 /**
986 * Returns a function to use in pseudos for buttons
987 * @param {String} type
988 */
989 function createButtonPseudo( type ) {
990 return function( elem ) {
991 var name = elem.nodeName.toLowerCase();
992 return (name === "input" || name === "button") && elem.type === type;
993 };
994 }
995
996 /**
997 * Returns a function to use in pseudos for positionals
998 * @param {Function} fn
999 */
1000 function createPositionalPseudo( fn ) {
1001 return markFunction(function( argument ) {
1002 argument = +argument;
1003 return markFunction(function( seed, matches ) {
1004 var j,
1005 matchIndexes = fn( [], seed.length, argument ),
1006 i = matchIndexes.length;
1007
1008 // Match elements found at the specified indexes
1009 while ( i-- ) {
1010 if ( seed[ (j = matchIndexes[i]) ] ) {
1011 seed[j] = !(matches[j] = seed[j]);
1012 }
1013 }
1014 });
1015 });
1016 }
1017
1018 /**
1019 * Checks a node for validity as a Sizzle context
1020 * @param {Element|Object=} context
1021 * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
1022 */
1023 function testContext( context ) {
1024 return context && typeof context.getElementsByTagName !== strundefined && context;
1025 }
1026
1027 // Expose support vars for convenience
1028 support = Sizzle.support = {};
1029
1030 /**
1031 * Detects XML nodes
1032 * @param {Element|Object} elem An element or a document
1033 * @returns {Boolean} True iff elem is a non-HTML XML node
1034 */
1035 isXML = Sizzle.isXML = function( elem ) {
1036 // documentElement is verified for cases where it doesn't yet exist
1037 // (such as loading iframes in IE - #4833)
1038 var documentElement = elem && (elem.ownerDocument || elem).documentElement;
1039 return documentElement ? documentElement.nodeName !== "HTML" : false;
1040 };
1041
1042 /**
1043 * Sets document-related variables once based on the current document
1044 * @param {Element|Object} [doc] An element or document object to use to set the document
1045 * @returns {Object} Returns the current document
1046 */
1047 setDocument = Sizzle.setDocument = function( node ) {
1048 var hasCompare,
1049 doc = node ? node.ownerDocument || node : preferredDoc,
1050 parent = doc.defaultView;
1051
1052 // If no document and documentElement is available, return
1053 if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
1054 return document;
1055 }
1056
1057 // Set our document
1058 document = doc;
1059 docElem = doc.documentElement;
1060
1061 // Support tests
1062 documentIsHTML = !isXML( doc );
1063
1064 // Support: IE>8
1065 // If iframe document is assigned to "document" variable and if iframe has been reloaded,
1066 // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
1067 // IE6-8 do not support the defaultView property so parent will be undefined
1068 if ( parent && parent !== parent.top ) {
1069 // IE11 does not have attachEvent, so all must suffer
1070 if ( parent.addEventListener ) {
1071 parent.addEventListener( "unload", function() {
1072 setDocument();
1073 }, false );
1074 } else if ( parent.attachEvent ) {
1075 parent.attachEvent( "onunload", function() {
1076 setDocument();
1077 });
1078 }
1079 }
1080
1081 /* Attributes
1082 ---------------------------------------------------------------------- */
1083
1084 // Support: IE<8
1085 // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans)
1086 support.attributes = assert(function( div ) {
1087 div.className = "i";
1088 return !div.getAttribute("className");
1089 });
1090
1091 /* getElement(s)By*
1092 ---------------------------------------------------------------------- */
1093
1094 // Check if getElementsByTagName("*") returns only elements
1095 support.getElementsByTagName = assert(function( div ) {
1096 div.appendChild( doc.createComment("") );
1097 return !div.getElementsByTagName("*").length;
1098 });
1099
1100 // Check if getElementsByClassName can be trusted
1101 support.getElementsByClassName = rnative.test( doc.getElementsByClassName ) && assert(function( div ) {
1102 div.innerHTML = "<div class='a'></div><div class='a i'></div>";
1103
1104 // Support: Safari<4
1105 // Catch class over-caching
1106 div.firstChild.className = "i";
1107 // Support: Opera<10
1108 // Catch gEBCN failure to find non-leading classes
1109 return div.getElementsByClassName("i").length === 2;
1110 });
1111
1112 // Support: IE<10
1113 // Check if getElementById returns elements by name
1114 // The broken getElementById methods don't pick up programatically-set names,
1115 // so use a roundabout getElementsByName test
1116 support.getById = assert(function( div ) {
1117 docElem.appendChild( div ).id = expando;
1118 return !doc.getElementsByName || !doc.getElementsByName( expando ).length;
1119 });
1120
1121 // ID find and filter
1122 if ( support.getById ) {
1123 Expr.find["ID"] = function( id, context ) {
1124 if ( typeof context.getElementById !== strundefined && documentIsHTML ) {
1125 var m = context.getElementById( id );
1126 // Check parentNode to catch when Blackberry 4.6 returns
1127 // nodes that are no longer in the document #6963
1128 return m && m.parentNode ? [ m ] : [];
1129 }
1130 };
1131 Expr.filter["ID"] = function( id ) {
1132 var attrId = id.replace( runescape, funescape );
1133 return function( elem ) {
1134 return elem.getAttribute("id") === attrId;
1135 };
1136 };
1137 } else {
1138 // Support: IE6/7
1139 // getElementById is not reliable as a find shortcut
1140 delete Expr.find["ID"];
1141
1142 Expr.filter["ID"] = function( id ) {
1143 var attrId = id.replace( runescape, funescape );
1144 return function( elem ) {
1145 var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
1146 return node && node.value === attrId;
1147 };
1148 };
1149 }
1150
1151 // Tag
1152 Expr.find["TAG"] = support.getElementsByTagName ?
1153 function( tag, context ) {
1154 if ( typeof context.getElementsByTagName !== strundefined ) {
1155 return context.getElementsByTagName( tag );
1156 }
1157 } :
1158 function( tag, context ) {
1159 var elem,
1160 tmp = [],
1161 i = 0,
1162 results = context.getElementsByTagName( tag );
1163
1164 // Filter out possible comments
1165 if ( tag === "*" ) {
1166 while ( (elem = results[i++]) ) {
1167 if ( elem.nodeType === 1 ) {
1168 tmp.push( elem );
1169 }
1170 }
1171
1172 return tmp;
1173 }
1174 return results;
1175 };
1176
1177 // Class
1178 Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
1179 if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) {
1180 return context.getElementsByClassName( className );
1181 }
1182 };
1183
1184 /* QSA/matchesSelector
1185 ---------------------------------------------------------------------- */
1186
1187 // QSA and matchesSelector support
1188
1189 // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
1190 rbuggyMatches = [];
1191
1192 // qSa(:focus) reports false when true (Chrome 21)
1193 // We allow this because of a bug in IE8/9 that throws an error
1194 // whenever `document.activeElement` is accessed on an iframe
1195 // So, we allow :focus to pass through QSA all the time to avoid the IE error
1196 // See http://bugs.jquery.com/ticket/13378
1197 rbuggyQSA = [];
1198
1199 if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {
1200 // Build QSA regex
1201 // Regex strategy adopted from Diego Perini
1202 assert(function( div ) {
1203 // Select is set to empty string on purpose
1204 // This is to test IE's treatment of not explicitly
1205 // setting a boolean content attribute,
1206 // since its presence should be enough
1207 // http://bugs.jquery.com/ticket/12359
1208 div.innerHTML = "<select msallowclip=''><option selected=''></option></select>";
1209
1210 // Support: IE8, Opera 11-12.16
1211 // Nothing should be selected when empty strings follow ^= or $= or *=
1212 // The test attribute must be unknown in Opera but "safe" for WinRT
1213 // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
1214 if ( div.querySelectorAll("[msallowclip^='']").length ) {
1215 rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
1216 }
1217
1218 // Support: IE8
1219 // Boolean attributes and "value" are not treated correctly
1220 if ( !div.querySelectorAll("[selected]").length ) {
1221 rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
1222 }
1223
1224 // Webkit/Opera - :checked should return selected option elements
1225 // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
1226 // IE8 throws error here and will not see later tests
1227 if ( !div.querySelectorAll(":checked").length ) {
1228 rbuggyQSA.push(":checked");
1229 }
1230 });
1231
1232 assert(function( div ) {
1233 // Support: Windows 8 Native Apps
1234 // The type and name attributes are restricted during .innerHTML assignment
1235 var input = doc.createElement("input");
1236 input.setAttribute( "type", "hidden" );
1237 div.appendChild( input ).setAttribute( "name", "D" );
1238
1239 // Support: IE8
1240 // Enforce case-sensitivity of name attribute
1241 if ( div.querySelectorAll("[name=d]").length ) {
1242 rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
1243 }
1244
1245 // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
1246 // IE8 throws error here and will not see later tests
1247 if ( !div.querySelectorAll(":enabled").length ) {
1248 rbuggyQSA.push( ":enabled", ":disabled" );
1249 }
1250
1251 // Opera 10-11 does not throw on post-comma invalid pseudos
1252 div.querySelectorAll("*,:x");
1253 rbuggyQSA.push(",.*:");
1254 });
1255 }
1256
1257 if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
1258 docElem.webkitMatchesSelector ||
1259 docElem.mozMatchesSelector ||
1260 docElem.oMatchesSelector ||
1261 docElem.msMatchesSelector) )) ) {
1262
1263 assert(function( div ) {
1264 // Check to see if it's possible to do matchesSelector
1265 // on a disconnected node (IE 9)
1266 support.disconnectedMatch = matches.call( div, "div" );
1267
1268 // This should fail with an exception
1269 // Gecko does not error, returns false instead
1270 matches.call( div, "[s!='']:x" );
1271 rbuggyMatches.push( "!=", pseudos );
1272 });
1273 }
1274
1275 rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
1276 rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
1277
1278 /* Contains
1279 ---------------------------------------------------------------------- */
1280 hasCompare = rnative.test( docElem.compareDocumentPosition );
1281
1282 // Element contains another
1283 // Purposefully does not implement inclusive descendent
1284 // As in, an element does not contain itself
1285 contains = hasCompare || rnative.test( docElem.contains ) ?
1286 function( a, b ) {
1287 var adown = a.nodeType === 9 ? a.documentElement : a,
1288 bup = b && b.parentNode;
1289 return a === bup || !!( bup && bup.nodeType === 1 && (
1290 adown.contains ?
1291 adown.contains( bup ) :
1292 a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
1293 ));
1294 } :
1295 function( a, b ) {
1296 if ( b ) {
1297 while ( (b = b.parentNode) ) {
1298 if ( b === a ) {
1299 return true;
1300 }
1301 }
1302 }
1303 return false;
1304 };
1305
1306 /* Sorting
1307 ---------------------------------------------------------------------- */
1308
1309 // Document order sorting
1310 sortOrder = hasCompare ?
1311 function( a, b ) {
1312
1313 // Flag for duplicate removal
1314 if ( a === b ) {
1315 hasDuplicate = true;
1316 return 0;
1317 }
1318
1319 // Sort on method existence if only one input has compareDocumentPosition
1320 var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
1321 if ( compare ) {
1322 return compare;
1323 }
1324
1325 // Calculate position if both inputs belong to the same document
1326 compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
1327 a.compareDocumentPosition( b ) :
1328
1329 // Otherwise we know they are disconnected
1330 1;
1331
1332 // Disconnected nodes
1333 if ( compare & 1 ||
1334 (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
1335
1336 // Choose the first element that is related to our preferred document
1337 if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
1338 return -1;
1339 }
1340 if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
1341 return 1;
1342 }
1343
1344 // Maintain original order
1345 return sortInput ?
1346 ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
1347 0;
1348 }
1349
1350 return compare & 4 ? -1 : 1;
1351 } :
1352 function( a, b ) {
1353 // Exit early if the nodes are identical
1354 if ( a === b ) {
1355 hasDuplicate = true;
1356 return 0;
1357 }
1358
1359 var cur,
1360 i = 0,
1361 aup = a.parentNode,
1362 bup = b.parentNode,
1363 ap = [ a ],
1364 bp = [ b ];
1365
1366 // Parentless nodes are either documents or disconnected
1367 if ( !aup || !bup ) {
1368 return a === doc ? -1 :
1369 b === doc ? 1 :
1370 aup ? -1 :
1371 bup ? 1 :
1372 sortInput ?
1373 ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
1374 0;
1375
1376 // If the nodes are siblings, we can do a quick check
1377 } else if ( aup === bup ) {
1378 return siblingCheck( a, b );
1379 }
1380
1381 // Otherwise we need full lists of their ancestors for comparison
1382 cur = a;
1383 while ( (cur = cur.parentNode) ) {
1384 ap.unshift( cur );
1385 }
1386 cur = b;
1387 while ( (cur = cur.parentNode) ) {
1388 bp.unshift( cur );
1389 }
1390
1391 // Walk down the tree looking for a discrepancy
1392 while ( ap[i] === bp[i] ) {
1393 i++;
1394 }
1395
1396 return i ?
1397 // Do a sibling check if the nodes have a common ancestor
1398 siblingCheck( ap[i], bp[i] ) :
1399
1400 // Otherwise nodes in our document sort first
1401 ap[i] === preferredDoc ? -1 :
1402 bp[i] === preferredDoc ? 1 :
1403 0;
1404 };
1405
1406 return doc;
1407 };
1408
1409 Sizzle.matches = function( expr, elements ) {
1410 return Sizzle( expr, null, null, elements );
1411 };
1412
1413 Sizzle.matchesSelector = function( elem, expr ) {
1414 // Set document vars if needed
1415 if ( ( elem.ownerDocument || elem ) !== document ) {
1416 setDocument( elem );
1417 }
1418
1419 // Make sure that attribute selectors are quoted
1420 expr = expr.replace( rattributeQuotes, "='$1']" );
1421
1422 if ( support.matchesSelector && documentIsHTML &&
1423 ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
1424 ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
1425
1426 try {
1427 var ret = matches.call( elem, expr );
1428
1429 // IE 9's matchesSelector returns false on disconnected nodes
1430 if ( ret || support.disconnectedMatch ||
1431 // As well, disconnected nodes are said to be in a document
1432 // fragment in IE 9
1433 elem.document && elem.document.nodeType !== 11 ) {
1434 return ret;
1435 }
1436 } catch(e) {}
1437 }
1438
1439 return Sizzle( expr, document, null, [ elem ] ).length > 0;
1440 };
1441
1442 Sizzle.contains = function( context, elem ) {
1443 // Set document vars if needed
1444 if ( ( context.ownerDocument || context ) !== document ) {
1445 setDocument( context );
1446 }
1447 return contains( context, elem );
1448 };
1449
1450 Sizzle.attr = function( elem, name ) {
1451 // Set document vars if needed
1452 if ( ( elem.ownerDocument || elem ) !== document ) {
1453 setDocument( elem );
1454 }
1455
1456 var fn = Expr.attrHandle[ name.toLowerCase() ],
1457 // Don't get fooled by Object.prototype properties (jQuery #13807)
1458 val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
1459 fn( elem, name, !documentIsHTML ) :
1460 undefined;
1461
1462 return val !== undefined ?
1463 val :
1464 support.attributes || !documentIsHTML ?
1465 elem.getAttribute( name ) :
1466 (val = elem.getAttributeNode(name)) && val.specified ?
1467 val.value :
1468 null;
1469 };
1470
1471 Sizzle.error = function( msg ) {
1472 throw new Error( "Syntax error, unrecognized expression: " + msg );
1473 };
1474
1475 /**
1476 * Document sorting and removing duplicates
1477 * @param {ArrayLike} results
1478 */
1479 Sizzle.uniqueSort = function( results ) {
1480 var elem,
1481 duplicates = [],
1482 j = 0,
1483 i = 0;
1484
1485 // Unless we *know* we can detect duplicates, assume their presence
1486 hasDuplicate = !support.detectDuplicates;
1487 sortInput = !support.sortStable && results.slice( 0 );
1488 results.sort( sortOrder );
1489
1490 if ( hasDuplicate ) {
1491 while ( (elem = results[i++]) ) {
1492 if ( elem === results[ i ] ) {
1493 j = duplicates.push( i );
1494 }
1495 }
1496 while ( j-- ) {
1497 results.splice( duplicates[ j ], 1 );
1498 }
1499 }
1500
1501 // Clear input after sorting to release objects
1502 // See https://github.com/jquery/sizzle/pull/225
1503 sortInput = null;
1504
1505 return results;
1506 };
1507
1508 /**
1509 * Utility function for retrieving the text value of an array of DOM nodes
1510 * @param {Array|Element} elem
1511 */
1512 getText = Sizzle.getText = function( elem ) {
1513 var node,
1514 ret = "",
1515 i = 0,
1516 nodeType = elem.nodeType;
1517
1518 if ( !nodeType ) {
1519 // If no nodeType, this is expected to be an array
1520 while ( (node = elem[i++]) ) {
1521 // Do not traverse comment nodes
1522 ret += getText( node );
1523 }
1524 } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
1525 // Use textContent for elements
1526 // innerText usage removed for consistency of new lines (jQuery #11153)
1527 if ( typeof elem.textContent === "string" ) {
1528 return elem.textContent;
1529 } else {
1530 // Traverse its children
1531 for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
1532 ret += getText( elem );
1533 }
1534 }
1535 } else if ( nodeType === 3 || nodeType === 4 ) {
1536 return elem.nodeValue;
1537 }
1538 // Do not include comment or processing instruction nodes
1539
1540 return ret;
1541 };
1542
1543 Expr = Sizzle.selectors = {
1544
1545 // Can be adjusted by the user
1546 cacheLength: 50,
1547
1548 createPseudo: markFunction,
1549
1550 match: matchExpr,
1551
1552 attrHandle: {},
1553
1554 find: {},
1555
1556 relative: {
1557 ">": { dir: "parentNode", first: true },
1558 " ": { dir: "parentNode" },
1559 "+": { dir: "previousSibling", first: true },
1560 "~": { dir: "previousSibling" }
1561 },
1562
1563 preFilter: {
1564 "ATTR": function( match ) {
1565 match[1] = match[1].replace( runescape, funescape );
1566
1567 // Move the given value to match[3] whether quoted or unquoted
1568 match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );
1569
1570 if ( match[2] === "~=" ) {
1571 match[3] = " " + match[3] + " ";
1572 }
1573
1574 return match.slice( 0, 4 );
1575 },
1576
1577 "CHILD": function( match ) {
1578 /* matches from matchExpr["CHILD"]
1579 1 type (only|nth|...)
1580 2 what (child|of-type)
1581 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
1582 4 xn-component of xn+y argument ([+-]?\d*n|)
1583 5 sign of xn-component
1584 6 x of xn-component
1585 7 sign of y-component
1586 8 y of y-component
1587 */
1588 match[1] = match[1].toLowerCase();
1589
1590 if ( match[1].slice( 0, 3 ) === "nth" ) {
1591 // nth-* requires argument
1592 if ( !match[3] ) {
1593 Sizzle.error( match[0] );
1594 }
1595
1596 // numeric x and y parameters for Expr.filter.CHILD
1597 // remember that false/true cast respectively to 0/1
1598 match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
1599 match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
1600
1601 // other types prohibit arguments
1602 } else if ( match[3] ) {
1603 Sizzle.error( match[0] );
1604 }
1605
1606 return match;
1607 },
1608
1609 "PSEUDO": function( match ) {
1610 var excess,
1611 unquoted = !match[6] && match[2];
1612
1613 if ( matchExpr["CHILD"].test( match[0] ) ) {
1614 return null;
1615 }
1616
1617 // Accept quoted arguments as-is
1618 if ( match[3] ) {
1619 match[2] = match[4] || match[5] || "";
1620
1621 // Strip excess characters from unquoted arguments
1622 } else if ( unquoted && rpseudo.test( unquoted ) &&
1623 // Get excess from tokenize (recursively)
1624 (excess = tokenize( unquoted, true )) &&
1625 // advance to the next closing parenthesis
1626 (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
1627
1628 // excess is a negative index
1629 match[0] = match[0].slice( 0, excess );
1630 match[2] = unquoted.slice( 0, excess );
1631 }
1632
1633 // Return only captures needed by the pseudo filter method (type and argument)
1634 return match.slice( 0, 3 );
1635 }
1636 },
1637
1638 filter: {
1639
1640 "TAG": function( nodeNameSelector ) {
1641 var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
1642 return nodeNameSelector === "*" ?
1643 function() { return true; } :
1644 function( elem ) {
1645 return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
1646 };
1647 },
1648
1649 "CLASS": function( className ) {
1650 var pattern = classCache[ className + " " ];
1651
1652 return pattern ||
1653 (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
1654 classCache( className, function( elem ) {
1655 return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" );
1656 });
1657 },
1658
1659 "ATTR": function( name, operator, check ) {
1660 return function( elem ) {
1661 var result = Sizzle.attr( elem, name );
1662
1663 if ( result == null ) {
1664 return operator === "!=";
1665 }
1666 if ( !operator ) {
1667 return true;
1668 }
1669
1670 result += "";
1671
1672 return operator === "=" ? result === check :
1673 operator === "!=" ? result !== check :
1674 operator === "^=" ? check && result.indexOf( check ) === 0 :
1675 operator === "*=" ? check && result.indexOf( check ) > -1 :
1676 operator === "$=" ? check && result.slice( -check.length ) === check :
1677 operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :
1678 operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
1679 false;
1680 };
1681 },
1682
1683 "CHILD": function( type, what, argument, first, last ) {
1684 var simple = type.slice( 0, 3 ) !== "nth",
1685 forward = type.slice( -4 ) !== "last",
1686 ofType = what === "of-type";
1687
1688 return first === 1 && last === 0 ?
1689
1690 // Shortcut for :nth-*(n)
1691 function( elem ) {
1692 return !!elem.parentNode;
1693 } :
1694
1695 function( elem, context, xml ) {
1696 var cache, outerCache, node, diff, nodeIndex, start,
1697 dir = simple !== forward ? "nextSibling" : "previousSibling",
1698 parent = elem.parentNode,
1699 name = ofType && elem.nodeName.toLowerCase(),
1700 useCache = !xml && !ofType;
1701
1702 if ( parent ) {
1703
1704 // :(first|last|only)-(child|of-type)
1705 if ( simple ) {
1706 while ( dir ) {
1707 node = elem;
1708 while ( (node = node[ dir ]) ) {
1709 if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
1710 return false;
1711 }
1712 }
1713 // Reverse direction for :only-* (if we haven't yet done so)
1714 start = dir = type === "only" && !start && "nextSibling";
1715 }
1716 return true;
1717 }
1718
1719 start = [ forward ? parent.firstChild : parent.lastChild ];
1720
1721 // non-xml :nth-child(...) stores cache data on `parent`
1722 if ( forward && useCache ) {
1723 // Seek `elem` from a previously-cached index
1724 outerCache = parent[ expando ] || (parent[ expando ] = {});
1725 cache = outerCache[ type ] || [];
1726 nodeIndex = cache[0] === dirruns && cache[1];
1727 diff = cache[0] === dirruns && cache[2];
1728 node = nodeIndex && parent.childNodes[ nodeIndex ];
1729
1730 while ( (node = ++nodeIndex && node && node[ dir ] ||
1731
1732 // Fallback to seeking `elem` from the start
1733 (diff = nodeIndex = 0) || start.pop()) ) {
1734
1735 // When found, cache indexes on `parent` and break
1736 if ( node.nodeType === 1 && ++diff && node === elem ) {
1737 outerCache[ type ] = [ dirruns, nodeIndex, diff ];
1738 break;
1739 }
1740 }
1741
1742 // Use previously-cached element index if available
1743 } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
1744 diff = cache[1];
1745
1746 // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
1747 } else {
1748 // Use the same loop as above to seek `elem` from the start
1749 while ( (node = ++nodeIndex && node && node[ dir ] ||
1750 (diff = nodeIndex = 0) || start.pop()) ) {
1751
1752 if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
1753 // Cache the index of each encountered element
1754 if ( useCache ) {
1755 (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
1756 }
1757
1758 if ( node === elem ) {
1759 break;
1760 }
1761 }
1762 }
1763 }
1764
1765 // Incorporate the offset, then check against cycle size
1766 diff -= last;
1767 return diff === first || ( diff % first === 0 && diff / first >= 0 );
1768 }
1769 };
1770 },
1771
1772 "PSEUDO": function( pseudo, argument ) {
1773 // pseudo-class names are case-insensitive
1774 // http://www.w3.org/TR/selectors/#pseudo-classes
1775 // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
1776 // Remember that setFilters inherits from pseudos
1777 var args,
1778 fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
1779 Sizzle.error( "unsupported pseudo: " + pseudo );
1780
1781 // The user may use createPseudo to indicate that
1782 // arguments are needed to create the filter function
1783 // just as Sizzle does
1784 if ( fn[ expando ] ) {
1785 return fn( argument );
1786 }
1787
1788 // But maintain support for old signatures
1789 if ( fn.length > 1 ) {
1790 args = [ pseudo, pseudo, "", argument ];
1791 return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
1792 markFunction(function( seed, matches ) {
1793 var idx,
1794 matched = fn( seed, argument ),
1795 i = matched.length;
1796 while ( i-- ) {
1797 idx = indexOf.call( seed, matched[i] );
1798 seed[ idx ] = !( matches[ idx ] = matched[i] );
1799 }
1800 }) :
1801 function( elem ) {
1802 return fn( elem, 0, args );
1803 };
1804 }
1805
1806 return fn;
1807 }
1808 },
1809
1810 pseudos: {
1811 // Potentially complex pseudos
1812 "not": markFunction(function( selector ) {
1813 // Trim the selector passed to compile
1814 // to avoid treating leading and trailing
1815 // spaces as combinators
1816 var input = [],
1817 results = [],
1818 matcher = compile( selector.replace( rtrim, "$1" ) );
1819
1820 return matcher[ expando ] ?
1821 markFunction(function( seed, matches, context, xml ) {
1822 var elem,
1823 unmatched = matcher( seed, null, xml, [] ),
1824 i = seed.length;
1825
1826 // Match elements unmatched by `matcher`
1827 while ( i-- ) {
1828 if ( (elem = unmatched[i]) ) {
1829 seed[i] = !(matches[i] = elem);
1830 }
1831 }
1832 }) :
1833 function( elem, context, xml ) {
1834 input[0] = elem;
1835 matcher( input, null, xml, results );
1836 return !results.pop();
1837 };
1838 }),
1839
1840 "has": markFunction(function( selector ) {
1841 return function( elem ) {
1842 return Sizzle( selector, elem ).length > 0;
1843 };
1844 }),
1845
1846 "contains": markFunction(function( text ) {
1847 return function( elem ) {
1848 return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
1849 };
1850 }),
1851
1852 // "Whether an element is represented by a :lang() selector
1853 // is based solely on the element's language value
1854 // being equal to the identifier C,
1855 // or beginning with the identifier C immediately followed by "-".
1856 // The matching of C against the element's language value is performed case-insensitively.
1857 // The identifier C does not have to be a valid language name."
1858 // http://www.w3.org/TR/selectors/#lang-pseudo
1859 "lang": markFunction( function( lang ) {
1860 // lang value must be a valid identifier
1861 if ( !ridentifier.test(lang || "") ) {
1862 Sizzle.error( "unsupported lang: " + lang );
1863 }
1864 lang = lang.replace( runescape, funescape ).toLowerCase();
1865 return function( elem ) {
1866 var elemLang;
1867 do {
1868 if ( (elemLang = documentIsHTML ?
1869 elem.lang :
1870 elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
1871
1872 elemLang = elemLang.toLowerCase();
1873 return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
1874 }
1875 } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
1876 return false;
1877 };
1878 }),
1879
1880 // Miscellaneous
1881 "target": function( elem ) {
1882 var hash = window.location && window.location.hash;
1883 return hash && hash.slice( 1 ) === elem.id;
1884 },
1885
1886 "root": function( elem ) {
1887 return elem === docElem;
1888 },
1889
1890 "focus": function( elem ) {
1891 return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
1892 },
1893
1894 // Boolean properties
1895 "enabled": function( elem ) {
1896 return elem.disabled === false;
1897 },
1898
1899 "disabled": function( elem ) {
1900 return elem.disabled === true;
1901 },
1902
1903 "checked": function( elem ) {
1904 // In CSS3, :checked should return both checked and selected elements
1905 // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
1906 var nodeName = elem.nodeName.toLowerCase();
1907 return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
1908 },
1909
1910 "selected": function( elem ) {
1911 // Accessing this property makes selected-by-default
1912 // options in Safari work properly
1913 if ( elem.parentNode ) {
1914 elem.parentNode.selectedIndex;
1915 }
1916
1917 return elem.selected === true;
1918 },
1919
1920 // Contents
1921 "empty": function( elem ) {
1922 // http://www.w3.org/TR/selectors/#empty-pseudo
1923 // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
1924 // but not by others (comment: 8; processing instruction: 7; etc.)
1925 // nodeType < 6 works because attributes (2) do not appear as children
1926 for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
1927 if ( elem.nodeType < 6 ) {
1928 return false;
1929 }
1930 }
1931 return true;
1932 },
1933
1934 "parent": function( elem ) {
1935 return !Expr.pseudos["empty"]( elem );
1936 },
1937
1938 // Element/input types
1939 "header": function( elem ) {
1940 return rheader.test( elem.nodeName );
1941 },
1942
1943 "input": function( elem ) {
1944 return rinputs.test( elem.nodeName );
1945 },
1946
1947 "button": function( elem ) {
1948 var name = elem.nodeName.toLowerCase();
1949 return name === "input" && elem.type === "button" || name === "button";
1950 },
1951
1952 "text": function( elem ) {
1953 var attr;
1954 return elem.nodeName.toLowerCase() === "input" &&
1955 elem.type === "text" &&
1956
1957 // Support: IE<8
1958 // New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
1959 ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
1960 },
1961
1962 // Position-in-collection
1963 "first": createPositionalPseudo(function() {
1964 return [ 0 ];
1965 }),
1966
1967 "last": createPositionalPseudo(function( matchIndexes, length ) {
1968 return [ length - 1 ];
1969 }),
1970
1971 "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
1972 return [ argument < 0 ? argument + length : argument ];
1973 }),
1974
1975 "even": createPositionalPseudo(function( matchIndexes, length ) {
1976 var i = 0;
1977 for ( ; i < length; i += 2 ) {
1978 matchIndexes.push( i );
1979 }
1980 return matchIndexes;
1981 }),
1982
1983 "odd": createPositionalPseudo(function( matchIndexes, length ) {
1984 var i = 1;
1985 for ( ; i < length; i += 2 ) {
1986 matchIndexes.push( i );
1987 }
1988 return matchIndexes;
1989 }),
1990
1991 "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
1992 var i = argument < 0 ? argument + length : argument;
1993 for ( ; --i >= 0; ) {
1994 matchIndexes.push( i );
1995 }
1996 return matchIndexes;
1997 }),
1998
1999 "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
2000 var i = argument < 0 ? argument + length : argument;
2001 for ( ; ++i < length; ) {
2002 matchIndexes.push( i );
2003 }
2004 return matchIndexes;
2005 })
2006 }
2007 };
2008
2009 Expr.pseudos["nth"] = Expr.pseudos["eq"];
2010
2011 // Add button/input type pseudos
2012 for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
2013 Expr.pseudos[ i ] = createInputPseudo( i );
2014 }
2015 for ( i in { submit: true, reset: true } ) {
2016 Expr.pseudos[ i ] = createButtonPseudo( i );
2017 }
2018
2019 // Easy API for creating new setFilters
2020 function setFilters() {}
2021 setFilters.prototype = Expr.filters = Expr.pseudos;
2022 Expr.setFilters = new setFilters();
2023
2024 tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
2025 var matched, match, tokens, type,
2026 soFar, groups, preFilters,
2027 cached = tokenCache[ selector + " " ];
2028
2029 if ( cached ) {
2030 return parseOnly ? 0 : cached.slice( 0 );
2031 }
2032
2033 soFar = selector;
2034 groups = [];
2035 preFilters = Expr.preFilter;
2036
2037 while ( soFar ) {
2038
2039 // Comma and first run
2040 if ( !matched || (match = rcomma.exec( soFar )) ) {
2041 if ( match ) {
2042 // Don't consume trailing commas as valid
2043 soFar = soFar.slice( match[0].length ) || soFar;
2044 }
2045 groups.push( (tokens = []) );
2046 }
2047
2048 matched = false;
2049
2050 // Combinators
2051 if ( (match = rcombinators.exec( soFar )) ) {
2052 matched = match.shift();
2053 tokens.push({
2054 value: matched,
2055 // Cast descendant combinators to space
2056 type: match[0].replace( rtrim, " " )
2057 });
2058 soFar = soFar.slice( matched.length );
2059 }
2060
2061 // Filters
2062 for ( type in Expr.filter ) {
2063 if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
2064 (match = preFilters[ type ]( match ))) ) {
2065 matched = match.shift();
2066 tokens.push({
2067 value: matched,
2068 type: type,
2069 matches: match
2070 });
2071 soFar = soFar.slice( matched.length );
2072 }
2073 }
2074
2075 if ( !matched ) {
2076 break;
2077 }
2078 }
2079
2080 // Return the length of the invalid excess
2081 // if we're just parsing
2082 // Otherwise, throw an error or return tokens
2083 return parseOnly ?
2084 soFar.length :
2085 soFar ?
2086 Sizzle.error( selector ) :
2087 // Cache the tokens
2088 tokenCache( selector, groups ).slice( 0 );
2089 };
2090
2091 function toSelector( tokens ) {
2092 var i = 0,
2093 len = tokens.length,
2094 selector = "";
2095 for ( ; i < len; i++ ) {
2096 selector += tokens[i].value;
2097 }
2098 return selector;
2099 }
2100
2101 function addCombinator( matcher, combinator, base ) {
2102 var dir = combinator.dir,
2103 checkNonElements = base && dir === "parentNode",
2104 doneName = done++;
2105
2106 return combinator.first ?
2107 // Check against closest ancestor/preceding element
2108 function( elem, context, xml ) {
2109 while ( (elem = elem[ dir ]) ) {
2110 if ( elem.nodeType === 1 || checkNonElements ) {
2111 return matcher( elem, context, xml );
2112 }
2113 }
2114 } :
2115
2116 // Check against all ancestor/preceding elements
2117 function( elem, context, xml ) {
2118 var oldCache, outerCache,
2119 newCache = [ dirruns, doneName ];
2120
2121 // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
2122 if ( xml ) {
2123 while ( (elem = elem[ dir ]) ) {
2124 if ( elem.nodeType === 1 || checkNonElements ) {
2125 if ( matcher( elem, context, xml ) ) {
2126 return true;
2127 }
2128 }
2129 }
2130 } else {
2131 while ( (elem = elem[ dir ]) ) {
2132 if ( elem.nodeType === 1 || checkNonElements ) {
2133 outerCache = elem[ expando ] || (elem[ expando ] = {});
2134 if ( (oldCache = outerCache[ dir ]) &&
2135 oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
2136
2137 // Assign to newCache so results back-propagate to previous elements
2138 return (newCache[ 2 ] = oldCache[ 2 ]);
2139 } else {
2140 // Reuse newcache so results back-propagate to previous elements
2141 outerCache[ dir ] = newCache;
2142
2143 // A match means we're done; a fail means we have to keep checking
2144 if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
2145 return true;
2146 }
2147 }
2148 }
2149 }
2150 }
2151 };
2152 }
2153
2154 function elementMatcher( matchers ) {
2155 return matchers.length > 1 ?
2156 function( elem, context, xml ) {
2157 var i = matchers.length;
2158 while ( i-- ) {
2159 if ( !matchers[i]( elem, context, xml ) ) {
2160 return false;
2161 }
2162 }
2163 return true;
2164 } :
2165 matchers[0];
2166 }
2167
2168 function multipleContexts( selector, contexts, results ) {
2169 var i = 0,
2170 len = contexts.length;
2171 for ( ; i < len; i++ ) {
2172 Sizzle( selector, contexts[i], results );
2173 }
2174 return results;
2175 }
2176
2177 function condense( unmatched, map, filter, context, xml ) {
2178 var elem,
2179 newUnmatched = [],
2180 i = 0,
2181 len = unmatched.length,
2182 mapped = map != null;
2183
2184 for ( ; i < len; i++ ) {
2185 if ( (elem = unmatched[i]) ) {
2186 if ( !filter || filter( elem, context, xml ) ) {
2187 newUnmatched.push( elem );
2188 if ( mapped ) {
2189 map.push( i );
2190 }
2191 }
2192 }
2193 }
2194
2195 return newUnmatched;
2196 }
2197
2198 function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
2199 if ( postFilter && !postFilter[ expando ] ) {
2200 postFilter = setMatcher( postFilter );
2201 }
2202 if ( postFinder && !postFinder[ expando ] ) {
2203 postFinder = setMatcher( postFinder, postSelector );
2204 }
2205 return markFunction(function( seed, results, context, xml ) {
2206 var temp, i, elem,
2207 preMap = [],
2208 postMap = [],
2209 preexisting = results.length,
2210
2211 // Get initial elements from seed or context
2212 elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
2213
2214 // Prefilter to get matcher input, preserving a map for seed-results synchronization
2215 matcherIn = preFilter && ( seed || !selector ) ?
2216 condense( elems, preMap, preFilter, context, xml ) :
2217 elems,
2218
2219 matcherOut = matcher ?
2220 // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
2221 postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
2222
2223 // ...intermediate processing is necessary
2224 [] :
2225
2226 // ...otherwise use results directly
2227 results :
2228 matcherIn;
2229
2230 // Find primary matches
2231 if ( matcher ) {
2232 matcher( matcherIn, matcherOut, context, xml );
2233 }
2234
2235 // Apply postFilter
2236 if ( postFilter ) {
2237 temp = condense( matcherOut, postMap );
2238 postFilter( temp, [], context, xml );
2239
2240 // Un-match failing elements by moving them back to matcherIn
2241 i = temp.length;
2242 while ( i-- ) {
2243 if ( (elem = temp[i]) ) {
2244 matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
2245 }
2246 }
2247 }
2248
2249 if ( seed ) {
2250 if ( postFinder || preFilter ) {
2251 if ( postFinder ) {
2252 // Get the final matcherOut by condensing this intermediate into postFinder contexts
2253 temp = [];
2254 i = matcherOut.length;
2255 while ( i-- ) {
2256 if ( (elem = matcherOut[i]) ) {
2257 // Restore matcherIn since elem is not yet a final match
2258 temp.push( (matcherIn[i] = elem) );
2259 }
2260 }
2261 postFinder( null, (matcherOut = []), temp, xml );
2262 }
2263
2264 // Move matched elements from seed to results to keep them synchronized
2265 i = matcherOut.length;
2266 while ( i-- ) {
2267 if ( (elem = matcherOut[i]) &&
2268 (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {
2269
2270 seed[temp] = !(results[temp] = elem);
2271 }
2272 }
2273 }
2274
2275 // Add elements to results, through postFinder if defined
2276 } else {
2277 matcherOut = condense(
2278 matcherOut === results ?
2279 matcherOut.splice( preexisting, matcherOut.length ) :
2280 matcherOut
2281 );
2282 if ( postFinder ) {
2283 postFinder( null, results, matcherOut, xml );
2284 } else {
2285 push.apply( results, matcherOut );
2286 }
2287 }
2288 });
2289 }
2290
2291 function matcherFromTokens( tokens ) {
2292 var checkContext, matcher, j,
2293 len = tokens.length,
2294 leadingRelative = Expr.relative[ tokens[0].type ],
2295 implicitRelative = leadingRelative || Expr.relative[" "],
2296 i = leadingRelative ? 1 : 0,
2297
2298 // The foundational matcher ensures that elements are reachable from top-level context(s)
2299 matchContext = addCombinator( function( elem ) {
2300 return elem === checkContext;
2301 }, implicitRelative, true ),
2302 matchAnyContext = addCombinator( function( elem ) {
2303 return indexOf.call( checkContext, elem ) > -1;
2304 }, implicitRelative, true ),
2305 matchers = [ function( elem, context, xml ) {
2306 return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
2307 (checkContext = context).nodeType ?
2308 matchContext( elem, context, xml ) :
2309 matchAnyContext( elem, context, xml ) );
2310 } ];
2311
2312 for ( ; i < len; i++ ) {
2313 if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
2314 matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
2315 } else {
2316 matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
2317
2318 // Return special upon seeing a positional matcher
2319 if ( matcher[ expando ] ) {
2320 // Find the next relative operator (if any) for proper handling
2321 j = ++i;
2322 for ( ; j < len; j++ ) {
2323 if ( Expr.relative[ tokens[j].type ] ) {
2324 break;
2325 }
2326 }
2327 return setMatcher(
2328 i > 1 && elementMatcher( matchers ),
2329 i > 1 && toSelector(
2330 // If the preceding token was a descendant combinator, insert an implicit any-element `*`
2331 tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
2332 ).replace( rtrim, "$1" ),
2333 matcher,
2334 i < j && matcherFromTokens( tokens.slice( i, j ) ),
2335 j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
2336 j < len && toSelector( tokens )
2337 );
2338 }
2339 matchers.push( matcher );
2340 }
2341 }
2342
2343 return elementMatcher( matchers );
2344 }
2345
2346 function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
2347 var bySet = setMatchers.length > 0,
2348 byElement = elementMatchers.length > 0,
2349 superMatcher = function( seed, context, xml, results, outermost ) {
2350 var elem, j, matcher,
2351 matchedCount = 0,
2352 i = "0",
2353 unmatched = seed && [],
2354 setMatched = [],
2355 contextBackup = outermostContext,
2356 // We must always have either seed elements or outermost context
2357 elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
2358 // Use integer dirruns iff this is the outermost matcher
2359 dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
2360 len = elems.length;
2361
2362 if ( outermost ) {
2363 outermostContext = context !== document && context;
2364 }
2365
2366 // Add elements passing elementMatchers directly to results
2367 // Keep `i` a string if there are no elements so `matchedCount` will be "00" below
2368 // Support: IE<9, Safari
2369 // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
2370 for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
2371 if ( byElement && elem ) {
2372 j = 0;
2373 while ( (matcher = elementMatchers[j++]) ) {
2374 if ( matcher( elem, context, xml ) ) {
2375 results.push( elem );
2376 break;
2377 }
2378 }
2379 if ( outermost ) {
2380 dirruns = dirrunsUnique;
2381 }
2382 }
2383
2384 // Track unmatched elements for set filters
2385 if ( bySet ) {
2386 // They will have gone through all possible matchers
2387 if ( (elem = !matcher && elem) ) {
2388 matchedCount--;
2389 }
2390
2391 // Lengthen the array for every element, matched or not
2392 if ( seed ) {
2393 unmatched.push( elem );
2394 }
2395 }
2396 }
2397
2398 // Apply set filters to unmatched elements
2399 matchedCount += i;
2400 if ( bySet && i !== matchedCount ) {
2401 j = 0;
2402 while ( (matcher = setMatchers[j++]) ) {
2403 matcher( unmatched, setMatched, context, xml );
2404 }
2405
2406 if ( seed ) {
2407 // Reintegrate element matches to eliminate the need for sorting
2408 if ( matchedCount > 0 ) {
2409 while ( i-- ) {
2410 if ( !(unmatched[i] || setMatched[i]) ) {
2411 setMatched[i] = pop.call( results );
2412 }
2413 }
2414 }
2415
2416 // Discard index placeholder values to get only actual matches
2417 setMatched = condense( setMatched );
2418 }
2419
2420 // Add matches to results
2421 push.apply( results, setMatched );
2422
2423 // Seedless set matches succeeding multiple successful matchers stipulate sorting
2424 if ( outermost && !seed && setMatched.length > 0 &&
2425 ( matchedCount + setMatchers.length ) > 1 ) {
2426
2427 Sizzle.uniqueSort( results );
2428 }
2429 }
2430
2431 // Override manipulation of globals by nested matchers
2432 if ( outermost ) {
2433 dirruns = dirrunsUnique;
2434 outermostContext = contextBackup;
2435 }
2436
2437 return unmatched;
2438 };
2439
2440 return bySet ?
2441 markFunction( superMatcher ) :
2442 superMatcher;
2443 }
2444
2445 compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
2446 var i,
2447 setMatchers = [],
2448 elementMatchers = [],
2449 cached = compilerCache[ selector + " " ];
2450
2451 if ( !cached ) {
2452 // Generate a function of recursive functions that can be used to check each element
2453 if ( !match ) {
2454 match = tokenize( selector );
2455 }
2456 i = match.length;
2457 while ( i-- ) {
2458 cached = matcherFromTokens( match[i] );
2459 if ( cached[ expando ] ) {
2460 setMatchers.push( cached );
2461 } else {
2462 elementMatchers.push( cached );
2463 }
2464 }
2465
2466 // Cache the compiled function
2467 cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
2468
2469 // Save selector and tokenization
2470 cached.selector = selector;
2471 }
2472 return cached;
2473 };
2474
2475 /**
2476 * A low-level selection function that works with Sizzle's compiled
2477 * selector functions
2478 * @param {String|Function} selector A selector or a pre-compiled
2479 * selector function built with Sizzle.compile
2480 * @param {Element} context
2481 * @param {Array} [results]
2482 * @param {Array} [seed] A set of elements to match against
2483 */
2484 select = Sizzle.select = function( selector, context, results, seed ) {
2485 var i, tokens, token, type, find,
2486 compiled = typeof selector === "function" && selector,
2487 match = !seed && tokenize( (selector = compiled.selector || selector) );
2488
2489 results = results || [];
2490
2491 // Try to minimize operations if there is no seed and only one group
2492 if ( match.length === 1 ) {
2493
2494 // Take a shortcut and set the context if the root selector is an ID
2495 tokens = match[0] = match[0].slice( 0 );
2496 if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
2497 support.getById && context.nodeType === 9 && documentIsHTML &&
2498 Expr.relative[ tokens[1].type ] ) {
2499
2500 context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
2501 if ( !context ) {
2502 return results;
2503
2504 // Precompiled matchers will still verify ancestry, so step up a level
2505 } else if ( compiled ) {
2506 context = context.parentNode;
2507 }
2508
2509 selector = selector.slice( tokens.shift().value.length );
2510 }
2511
2512 // Fetch a seed set for right-to-left matching
2513 i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
2514 while ( i-- ) {
2515 token = tokens[i];
2516
2517 // Abort if we hit a combinator
2518 if ( Expr.relative[ (type = token.type) ] ) {
2519 break;
2520 }
2521 if ( (find = Expr.find[ type ]) ) {
2522 // Search, expanding context for leading sibling combinators
2523 if ( (seed = find(
2524 token.matches[0].replace( runescape, funescape ),
2525 rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
2526 )) ) {
2527
2528 // If seed is empty or no tokens remain, we can return early
2529 tokens.splice( i, 1 );
2530 selector = seed.length && toSelector( tokens );
2531 if ( !selector ) {
2532 push.apply( results, seed );
2533 return results;
2534 }
2535
2536 break;
2537 }
2538 }
2539 }
2540 }
2541
2542 // Compile and execute a filtering function if one is not provided
2543 // Provide `match` to avoid retokenization if we modified the selector above
2544 ( compiled || compile( selector, match ) )(
2545 seed,
2546 context,
2547 !documentIsHTML,
2548 results,
2549 rsibling.test( selector ) && testContext( context.parentNode ) || context
2550 );
2551 return results;
2552 };
2553
2554 // One-time assignments
2555
2556 // Sort stability
2557 support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
2558
2559 // Support: Chrome<14
2560 // Always assume duplicates if they aren't passed to the comparison function
2561 support.detectDuplicates = !!hasDuplicate;
2562
2563 // Initialize against the default document
2564 setDocument();
2565
2566 // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
2567 // Detached nodes confoundingly follow *each other*
2568 support.sortDetached = assert(function( div1 ) {
2569 // Should return 1, but returns 4 (following)
2570 return div1.compareDocumentPosition( document.createElement("div") ) & 1;
2571 });
2572
2573 // Support: IE<8
2574 // Prevent attribute/property "interpolation"
2575 // http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
2576 if ( !assert(function( div ) {
2577 div.innerHTML = "<a href='#'></a>";
2578 return div.firstChild.getAttribute("href") === "#" ;
2579 }) ) {
2580 addHandle( "type|href|height|width", function( elem, name, isXML ) {
2581 if ( !isXML ) {
2582 return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
2583 }
2584 });
2585 }
2586
2587 // Support: IE<9
2588 // Use defaultValue in place of getAttribute("value")
2589 if ( !support.attributes || !assert(function( div ) {
2590 div.innerHTML = "<input/>";
2591 div.firstChild.setAttribute( "value", "" );
2592 return div.firstChild.getAttribute( "value" ) === "";
2593 }) ) {
2594 addHandle( "value", function( elem, name, isXML ) {
2595 if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
2596 return elem.defaultValue;
2597 }
2598 });
2599 }
2600
2601 // Support: IE<9
2602 // Use getAttributeNode to fetch booleans when getAttribute lies
2603 if ( !assert(function( div ) {
2604 return div.getAttribute("disabled") == null;
2605 }) ) {
2606 addHandle( booleans, function( elem, name, isXML ) {
2607 var val;
2608 if ( !isXML ) {
2609 return elem[ name ] === true ? name.toLowerCase() :
2610 (val = elem.getAttributeNode( name )) && val.specified ?
2611 val.value :
2612 null;
2613 }
2614 });
2615 }
2616
2617 return Sizzle;
2618
2619 })( window );
2620
2621
2622
2623 jQuery.find = Sizzle;
2624 jQuery.expr = Sizzle.selectors;
2625 jQuery.expr[":"] = jQuery.expr.pseudos;
2626 jQuery.unique = Sizzle.uniqueSort;
2627 jQuery.text = Sizzle.getText;
2628 jQuery.isXMLDoc = Sizzle.isXML;
2629 jQuery.contains = Sizzle.contains;
2630
2631
2632
2633 var rneedsContext = jQuery.expr.match.needsContext;
2634
2635 var rsingleTag = (/^<(\w+)\s*\/?>(?:<\/\1>|)$/);
2636
2637
2638
2639 var risSimple = /^.[^:#\[\.,]*$/;
2640
2641 // Implement the identical functionality for filter and not
2642 function winnow( elements, qualifier, not ) {
2643 if ( jQuery.isFunction( qualifier ) ) {
2644 return jQuery.grep( elements, function( elem, i ) {
2645 /* jshint -W018 */
2646 return !!qualifier.call( elem, i, elem ) !== not;
2647 });
2648
2649 }
2650
2651 if ( qualifier.nodeType ) {
2652 return jQuery.grep( elements, function( elem ) {
2653 return ( elem === qualifier ) !== not;
2654 });
2655
2656 }
2657
2658 if ( typeof qualifier === "string" ) {
2659 if ( risSimple.test( qualifier ) ) {
2660 return jQuery.filter( qualifier, elements, not );
2661 }
2662
2663 qualifier = jQuery.filter( qualifier, elements );
2664 }
2665
2666 return jQuery.grep( elements, function( elem ) {
2667 return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not;
2668 });
2669 }
2670
2671 jQuery.filter = function( expr, elems, not ) {
2672 var elem = elems[ 0 ];
2673
2674 if ( not ) {
2675 expr = ":not(" + expr + ")";
2676 }
2677
2678 return elems.length === 1 && elem.nodeType === 1 ?
2679 jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
2680 jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
2681 return elem.nodeType === 1;
2682 }));
2683 };
2684
2685 jQuery.fn.extend({
2686 find: function( selector ) {
2687 var i,
2688 ret = [],
2689 self = this,
2690 len = self.length;
2691
2692 if ( typeof selector !== "string" ) {
2693 return this.pushStack( jQuery( selector ).filter(function() {
2694 for ( i = 0; i < len; i++ ) {
2695 if ( jQuery.contains( self[ i ], this ) ) {
2696 return true;
2697 }
2698 }
2699 }) );
2700 }
2701
2702 for ( i = 0; i < len; i++ ) {
2703 jQuery.find( selector, self[ i ], ret );
2704 }
2705
2706 // Needed because $( selector, context ) becomes $( context ).find( selector )
2707 ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
2708 ret.selector = this.selector ? this.selector + " " + selector : selector;
2709 return ret;
2710 },
2711 filter: function( selector ) {
2712 return this.pushStack( winnow(this, selector || [], false) );
2713 },
2714 not: function( selector ) {
2715 return this.pushStack( winnow(this, selector || [], true) );
2716 },
2717 is: function( selector ) {
2718 return !!winnow(
2719 this,
2720
2721 // If this is a positional/relative selector, check membership in the returned set
2722 // so $("p:first").is("p:last") won't return true for a doc with two "p".
2723 typeof selector === "string" && rneedsContext.test( selector ) ?
2724 jQuery( selector ) :
2725 selector || [],
2726 false
2727 ).length;
2728 }
2729 });
2730
2731
2732 // Initialize a jQuery object
2733
2734
2735 // A central reference to the root jQuery(document)
2736 var rootjQuery,
2737
2738 // Use the correct document accordingly with window argument (sandbox)
2739 document = window.document,
2740
2741 // A simple way to check for HTML strings
2742 // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
2743 // Strict HTML recognition (#11290: must start with <)
2744 rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
2745
2746 init = jQuery.fn.init = function( selector, context ) {
2747 var match, elem;
2748
2749 // HANDLE: $(""), $(null), $(undefined), $(false)
2750 if ( !selector ) {
2751 return this;
2752 }
2753
2754 // Handle HTML strings
2755 if ( typeof selector === "string" ) {
2756 if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
2757 // Assume that strings that start and end with <> are HTML and skip the regex check
2758 match = [ null, selector, null ];
2759
2760 } else {
2761 match = rquickExpr.exec( selector );
2762 }
2763
2764 // Match html or make sure no context is specified for #id
2765 if ( match && (match[1] || !context) ) {
2766
2767 // HANDLE: $(html) -> $(array)
2768 if ( match[1] ) {
2769 context = context instanceof jQuery ? context[0] : context;
2770
2771 // scripts is true for back-compat
2772 // Intentionally let the error be thrown if parseHTML is not present
2773 jQuery.merge( this, jQuery.parseHTML(
2774 match[1],
2775 context && context.nodeType ? context.ownerDocument || context : document,
2776 true
2777 ) );
2778
2779 // HANDLE: $(html, props)
2780 if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
2781 for ( match in context ) {
2782 // Properties of context are called as methods if possible
2783 if ( jQuery.isFunction( this[ match ] ) ) {
2784 this[ match ]( context[ match ] );
2785
2786 // ...and otherwise set as attributes
2787 } else {
2788 this.attr( match, context[ match ] );
2789 }
2790 }
2791 }
2792
2793 return this;
2794
2795 // HANDLE: $(#id)
2796 } else {
2797 elem = document.getElementById( match[2] );
2798
2799 // Check parentNode to catch when Blackberry 4.6 returns
2800 // nodes that are no longer in the document #6963
2801 if ( elem && elem.parentNode ) {
2802 // Handle the case where IE and Opera return items
2803 // by name instead of ID
2804 if ( elem.id !== match[2] ) {
2805 return rootjQuery.find( selector );
2806 }
2807
2808 // Otherwise, we inject the element directly into the jQuery object
2809 this.length = 1;
2810 this[0] = elem;
2811 }
2812
2813 this.context = document;
2814 this.selector = selector;
2815 return this;
2816 }
2817
2818 // HANDLE: $(expr, $(...))
2819 } else if ( !context || context.jquery ) {
2820 return ( context || rootjQuery ).find( selector );
2821
2822 // HANDLE: $(expr, context)
2823 // (which is just equivalent to: $(context).find(expr)
2824 } else {
2825 return this.constructor( context ).find( selector );
2826 }
2827
2828 // HANDLE: $(DOMElement)
2829 } else if ( selector.nodeType ) {
2830 this.context = this[0] = selector;
2831 this.length = 1;
2832 return this;
2833
2834 // HANDLE: $(function)
2835 // Shortcut for document ready
2836 } else if ( jQuery.isFunction( selector ) ) {
2837 return typeof rootjQuery.ready !== "undefined" ?
2838 rootjQuery.ready( selector ) :
2839 // Execute immediately if ready is not present
2840 selector( jQuery );
2841 }
2842
2843 if ( selector.selector !== undefined ) {
2844 this.selector = selector.selector;
2845 this.context = selector.context;
2846 }
2847
2848 return jQuery.makeArray( selector, this );
2849 };
2850
2851 // Give the init function the jQuery prototype for later instantiation
2852 init.prototype = jQuery.fn;
2853
2854 // Initialize central reference
2855 rootjQuery = jQuery( document );
2856
2857
2858 var rparentsprev = /^(?:parents|prev(?:Until|All))/,
2859 // methods guaranteed to produce a unique set when starting from a unique set
2860 guaranteedUnique = {
2861 children: true,
2862 contents: true,
2863 next: true,
2864 prev: true
2865 };
2866
2867 jQuery.extend({
2868 dir: function( elem, dir, until ) {
2869 var matched = [],
2870 cur = elem[ dir ];
2871
2872 while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
2873 if ( cur.nodeType === 1 ) {
2874 matched.push( cur );
2875 }
2876 cur = cur[dir];
2877 }
2878 return matched;
2879 },
2880
2881 sibling: function( n, elem ) {
2882 var r = [];
2883
2884 for ( ; n; n = n.nextSibling ) {
2885 if ( n.nodeType === 1 && n !== elem ) {
2886 r.push( n );
2887 }
2888 }
2889
2890 return r;
2891 }
2892 });
2893
2894 jQuery.fn.extend({
2895 has: function( target ) {
2896 var i,
2897 targets = jQuery( target, this ),
2898 len = targets.length;
2899
2900 return this.filter(function() {
2901 for ( i = 0; i < len; i++ ) {
2902 if ( jQuery.contains( this, targets[i] ) ) {
2903 return true;
2904 }
2905 }
2906 });
2907 },
2908
2909 closest: function( selectors, context ) {
2910 var cur,
2911 i = 0,
2912 l = this.length,
2913 matched = [],
2914 pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
2915 jQuery( selectors, context || this.context ) :
2916 0;
2917
2918 for ( ; i < l; i++ ) {
2919 for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) {
2920 // Always skip document fragments
2921 if ( cur.nodeType < 11 && (pos ?
2922 pos.index(cur) > -1 :
2923
2924 // Don't pass non-elements to Sizzle
2925 cur.nodeType === 1 &&
2926 jQuery.find.matchesSelector(cur, selectors)) ) {
2927
2928 matched.push( cur );
2929 break;
2930 }
2931 }
2932 }
2933
2934 return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched );
2935 },
2936
2937 // Determine the position of an element within
2938 // the matched set of elements
2939 index: function( elem ) {
2940
2941 // No argument, return index in parent
2942 if ( !elem ) {
2943 return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1;
2944 }
2945
2946 // index in selector
2947 if ( typeof elem === "string" ) {
2948 return jQuery.inArray( this[0], jQuery( elem ) );
2949 }
2950
2951 // Locate the position of the desired element
2952 return jQuery.inArray(
2953 // If it receives a jQuery object, the first element is used
2954 elem.jquery ? elem[0] : elem, this );
2955 },
2956
2957 add: function( selector, context ) {
2958 return this.pushStack(
2959 jQuery.unique(
2960 jQuery.merge( this.get(), jQuery( selector, context ) )
2961 )
2962 );
2963 },
2964
2965 addBack: function( selector ) {
2966 return this.add( selector == null ?
2967 this.prevObject : this.prevObject.filter(selector)
2968 );
2969 }
2970 });
2971
2972 function sibling( cur, dir ) {
2973 do {
2974 cur = cur[ dir ];
2975 } while ( cur && cur.nodeType !== 1 );
2976
2977 return cur;
2978 }
2979
2980 jQuery.each({
2981 parent: function( elem ) {
2982 var parent = elem.parentNode;
2983 return parent && parent.nodeType !== 11 ? parent : null;
2984 },
2985 parents: function( elem ) {
2986 return jQuery.dir( elem, "parentNode" );
2987 },
2988 parentsUntil: function( elem, i, until ) {
2989 return jQuery.dir( elem, "parentNode", until );
2990 },
2991 next: function( elem ) {
2992 return sibling( elem, "nextSibling" );
2993 },
2994 prev: function( elem ) {
2995 return sibling( elem, "previousSibling" );
2996 },
2997 nextAll: function( elem ) {
2998 return jQuery.dir( elem, "nextSibling" );
2999 },
3000 prevAll: function( elem ) {
3001 return jQuery.dir( elem, "previousSibling" );
3002 },
3003 nextUntil: function( elem, i, until ) {
3004 return jQuery.dir( elem, "nextSibling", until );
3005 },
3006 prevUntil: function( elem, i, until ) {
3007 return jQuery.dir( elem, "previousSibling", until );
3008 },
3009 siblings: function( elem ) {
3010 return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
3011 },
3012 children: function( elem ) {
3013 return jQuery.sibling( elem.firstChild );
3014 },
3015 contents: function( elem ) {
3016 return jQuery.nodeName( elem, "iframe" ) ?
3017 elem.contentDocument || elem.contentWindow.document :
3018 jQuery.merge( [], elem.childNodes );
3019 }
3020 }, function( name, fn ) {
3021 jQuery.fn[ name ] = function( until, selector ) {
3022 var ret = jQuery.map( this, fn, until );
3023
3024 if ( name.slice( -5 ) !== "Until" ) {
3025 selector = until;
3026 }
3027
3028 if ( selector && typeof selector === "string" ) {
3029 ret = jQuery.filter( selector, ret );
3030 }
3031
3032 if ( this.length > 1 ) {
3033 // Remove duplicates
3034 if ( !guaranteedUnique[ name ] ) {
3035 ret = jQuery.unique( ret );
3036 }
3037
3038 // Reverse order for parents* and prev-derivatives
3039 if ( rparentsprev.test( name ) ) {
3040 ret = ret.reverse();
3041 }
3042 }
3043
3044 return this.pushStack( ret );
3045 };
3046 });
3047 var rnotwhite = (/\S+/g);
3048
3049
3050
3051 // String to Object options format cache
3052 var optionsCache = {};
3053
3054 // Convert String-formatted options into Object-formatted ones and store in cache
3055 function createOptions( options ) {
3056 var object = optionsCache[ options ] = {};
3057 jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {
3058 object[ flag ] = true;
3059 });
3060 return object;
3061 }
3062
3063 /*
3064 * Create a callback list using the following parameters:
3065 *
3066 * options: an optional list of space-separated options that will change how
3067 * the callback list behaves or a more traditional option object
3068 *
3069 * By default a callback list will act like an event callback list and can be
3070 * "fired" multiple times.
3071 *
3072 * Possible options:
3073 *
3074 * once: will ensure the callback list can only be fired once (like a Deferred)
3075 *
3076 * memory: will keep track of previous values and will call any callback added
3077 * after the list has been fired right away with the latest "memorized"
3078 * values (like a Deferred)
3079 *
3080 * unique: will ensure a callback can only be added once (no duplicate in the list)
3081 *
3082 * stopOnFalse: interrupt callings when a callback returns false
3083 *
3084 */
3085 jQuery.Callbacks = function( options ) {
3086
3087 // Convert options from String-formatted to Object-formatted if needed
3088 // (we check in cache first)
3089 options = typeof options === "string" ?
3090 ( optionsCache[ options ] || createOptions( options ) ) :
3091 jQuery.extend( {}, options );
3092
3093 var // Flag to know if list is currently firing
3094 firing,
3095 // Last fire value (for non-forgettable lists)
3096 memory,
3097 // Flag to know if list was already fired
3098 fired,
3099 // End of the loop when firing
3100 firingLength,
3101 // Index of currently firing callback (modified by remove if needed)
3102 firingIndex,
3103 // First callback to fire (used internally by add and fireWith)
3104 firingStart,
3105 // Actual callback list
3106 list = [],
3107 // Stack of fire calls for repeatable lists
3108 stack = !options.once && [],
3109 // Fire callbacks
3110 fire = function( data ) {
3111 memory = options.memory && data;
3112 fired = true;
3113 firingIndex = firingStart || 0;
3114 firingStart = 0;
3115 firingLength = list.length;
3116 firing = true;
3117 for ( ; list && firingIndex < firingLength; firingIndex++ ) {
3118 if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
3119 memory = false; // To prevent further calls using add
3120 break;
3121 }
3122 }
3123 firing = false;
3124 if ( list ) {
3125 if ( stack ) {
3126 if ( stack.length ) {
3127 fire( stack.shift() );
3128 }
3129 } else if ( memory ) {
3130 list = [];
3131 } else {
3132 self.disable();
3133 }
3134 }
3135 },
3136 // Actual Callbacks object
3137 self = {
3138 // Add a callback or a collection of callbacks to the list
3139 add: function() {
3140 if ( list ) {
3141 // First, we save the current length
3142 var start = list.length;
3143 (function add( args ) {
3144 jQuery.each( args, function( _, arg ) {
3145 var type = jQuery.type( arg );
3146 if ( type === "function" ) {
3147 if ( !options.unique || !self.has( arg ) ) {
3148 list.push( arg );
3149 }
3150 } else if ( arg && arg.length && type !== "string" ) {
3151 // Inspect recursively
3152 add( arg );
3153 }
3154 });
3155 })( arguments );
3156 // Do we need to add the callbacks to the
3157 // current firing batch?
3158 if ( firing ) {
3159 firingLength = list.length;
3160 // With memory, if we're not firing then
3161 // we should call right away
3162 } else if ( memory ) {
3163 firingStart = start;
3164 fire( memory );
3165 }
3166 }
3167 return this;
3168 },
3169 // Remove a callback from the list
3170 remove: function() {
3171 if ( list ) {
3172 jQuery.each( arguments, function( _, arg ) {
3173 var index;
3174 while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
3175 list.splice( index, 1 );
3176 // Handle firing indexes
3177 if ( firing ) {
3178 if ( index <= firingLength ) {
3179 firingLength--;
3180 }
3181 if ( index <= firingIndex ) {
3182 firingIndex--;
3183 }
3184 }
3185 }
3186 });
3187 }
3188 return this;
3189 },
3190 // Check if a given callback is in the list.
3191 // If no argument is given, return whether or not list has callbacks attached.
3192 has: function( fn ) {
3193 return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );
3194 },
3195 // Remove all callbacks from the list
3196 empty: function() {
3197 list = [];
3198 firingLength = 0;
3199 return this;
3200 },
3201 // Have the list do nothing anymore
3202 disable: function() {
3203 list = stack = memory = undefined;
3204 return this;
3205 },
3206 // Is it disabled?
3207 disabled: function() {
3208 return !list;
3209 },
3210 // Lock the list in its current state
3211 lock: function() {
3212 stack = undefined;
3213 if ( !memory ) {
3214 self.disable();
3215 }
3216 return this;
3217 },
3218 // Is it locked?
3219 locked: function() {
3220 return !stack;
3221 },
3222 // Call all callbacks with the given context and arguments
3223 fireWith: function( context, args ) {
3224 if ( list && ( !fired || stack ) ) {
3225 args = args || [];
3226 args = [ context, args.slice ? args.slice() : args ];
3227 if ( firing ) {
3228 stack.push( args );
3229 } else {
3230 fire( args );
3231 }
3232 }
3233 return this;
3234 },
3235 // Call all the callbacks with the given arguments
3236 fire: function() {
3237 self.fireWith( this, arguments );
3238 return this;
3239 },
3240 // To know if the callbacks have already been called at least once
3241 fired: function() {
3242 return !!fired;
3243 }
3244 };
3245
3246 return self;
3247 };
3248
3249
3250 jQuery.extend({
3251
3252 Deferred: function( func ) {
3253 var tuples = [
3254 // action, add listener, listener list, final state
3255 [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
3256 [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
3257 [ "notify", "progress", jQuery.Callbacks("memory") ]
3258 ],
3259 state = "pending",
3260 promise = {
3261 state: function() {
3262 return state;
3263 },
3264 always: function() {
3265 deferred.done( arguments ).fail( arguments );
3266 return this;
3267 },
3268 then: function( /* fnDone, fnFail, fnProgress */ ) {
3269 var fns = arguments;
3270 return jQuery.Deferred(function( newDefer ) {
3271 jQuery.each( tuples, function( i, tuple ) {
3272 var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
3273 // deferred[ done | fail | progress ] for forwarding actions to newDefer
3274 deferred[ tuple[1] ](function() {
3275 var returned = fn && fn.apply( this, arguments );
3276 if ( returned && jQuery.isFunction( returned.promise ) ) {
3277 returned.promise()
3278 .done( newDefer.resolve )
3279 .fail( newDefer.reject )
3280 .progress( newDefer.notify );
3281 } else {
3282 newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
3283 }
3284 });
3285 });
3286 fns = null;
3287 }).promise();
3288 },
3289 // Get a promise for this deferred
3290 // If obj is provided, the promise aspect is added to the object
3291 promise: function( obj ) {
3292 return obj != null ? jQuery.extend( obj, promise ) : promise;
3293 }
3294 },
3295 deferred = {};
3296
3297 // Keep pipe for back-compat
3298 promise.pipe = promise.then;
3299
3300 // Add list-specific methods
3301 jQuery.each( tuples, function( i, tuple ) {
3302 var list = tuple[ 2 ],
3303 stateString = tuple[ 3 ];
3304
3305 // promise[ done | fail | progress ] = list.add
3306 promise[ tuple[1] ] = list.add;
3307
3308 // Handle state
3309 if ( stateString ) {
3310 list.add(function() {
3311 // state = [ resolved | rejected ]
3312 state = stateString;
3313
3314 // [ reject_list | resolve_list ].disable; progress_list.lock
3315 }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
3316 }
3317
3318 // deferred[ resolve | reject | notify ]
3319 deferred[ tuple[0] ] = function() {
3320 deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );
3321 return this;
3322 };
3323 deferred[ tuple[0] + "With" ] = list.fireWith;
3324 });
3325
3326 // Make the deferred a promise
3327 promise.promise( deferred );
3328
3329 // Call given func if any
3330 if ( func ) {
3331 func.call( deferred, deferred );
3332 }
3333
3334 // All done!
3335 return deferred;
3336 },
3337
3338 // Deferred helper
3339 when: function( subordinate /* , ..., subordinateN */ ) {
3340 var i = 0,
3341 resolveValues = slice.call( arguments ),
3342 length = resolveValues.length,
3343
3344 // the count of uncompleted subordinates
3345 remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
3346
3347 // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
3348 deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
3349
3350 // Update function for both resolve and progress values
3351 updateFunc = function( i, contexts, values ) {
3352 return function( value ) {
3353 contexts[ i ] = this;
3354 values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
3355 if ( values === progressValues ) {
3356 deferred.notifyWith( contexts, values );
3357
3358 } else if ( !(--remaining) ) {
3359 deferred.resolveWith( contexts, values );
3360 }
3361 };
3362 },
3363
3364 progressValues, progressContexts, resolveContexts;
3365
3366 // add listeners to Deferred subordinates; treat others as resolved
3367 if ( length > 1 ) {
3368 progressValues = new Array( length );
3369 progressContexts = new Array( length );
3370 resolveContexts = new Array( length );
3371 for ( ; i < length; i++ ) {
3372 if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
3373 resolveValues[ i ].promise()
3374 .done( updateFunc( i, resolveContexts, resolveValues ) )
3375 .fail( deferred.reject )
3376 .progress( updateFunc( i, progressContexts, progressValues ) );
3377 } else {
3378 --remaining;
3379 }
3380 }
3381 }
3382
3383 // if we're not waiting on anything, resolve the master
3384 if ( !remaining ) {
3385 deferred.resolveWith( resolveContexts, resolveValues );
3386 }
3387
3388 return deferred.promise();
3389 }
3390 });
3391
3392
3393 // The deferred used on DOM ready
3394 var readyList;
3395
3396 jQuery.fn.ready = function( fn ) {
3397 // Add the callback
3398 jQuery.ready.promise().done( fn );
3399
3400 return this;
3401 };
3402
3403 jQuery.extend({
3404 // Is the DOM ready to be used? Set to true once it occurs.
3405 isReady: false,
3406
3407 // A counter to track how many items to wait for before
3408 // the ready event fires. See #6781
3409 readyWait: 1,
3410
3411 // Hold (or release) the ready event
3412 holdReady: function( hold ) {
3413 if ( hold ) {
3414 jQuery.readyWait++;
3415 } else {
3416 jQuery.ready( true );
3417 }
3418 },
3419
3420 // Handle when the DOM is ready
3421 ready: function( wait ) {
3422
3423 // Abort if there are pending holds or we're already ready
3424 if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
3425 return;
3426 }
3427
3428 // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
3429 if ( !document.body ) {
3430 return setTimeout( jQuery.ready );
3431 }
3432
3433 // Remember that the DOM is ready
3434 jQuery.isReady = true;
3435
3436 // If a normal DOM Ready event fired, decrement, and wait if need be
3437 if ( wait !== true && --jQuery.readyWait > 0 ) {
3438 return;
3439 }
3440
3441 // If there are functions bound, to execute
3442 readyList.resolveWith( document, [ jQuery ] );
3443
3444 // Trigger any bound ready events
3445 if ( jQuery.fn.triggerHandler ) {
3446 jQuery( document ).triggerHandler( "ready" );
3447 jQuery( document ).off( "ready" );
3448 }
3449 }
3450 });
3451
3452 /**
3453 * Clean-up method for dom ready events
3454 */
3455 function detach() {
3456 if ( document.addEventListener ) {
3457 document.removeEventListener( "DOMContentLoaded", completed, false );
3458 window.removeEventListener( "load", completed, false );
3459
3460 } else {
3461 document.detachEvent( "onreadystatechange", completed );
3462 window.detachEvent( "onload", completed );
3463 }
3464 }
3465
3466 /**
3467 * The ready event handler and self cleanup method
3468 */
3469 function completed() {
3470 // readyState === "complete" is good enough for us to call the dom ready in oldIE
3471 if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) {
3472 detach();
3473 jQuery.ready();
3474 }
3475 }
3476
3477 jQuery.ready.promise = function( obj ) {
3478 if ( !readyList ) {
3479
3480 readyList = jQuery.Deferred();
3481
3482 // Catch cases where $(document).ready() is called after the browser event has already occurred.
3483 // we once tried to use readyState "interactive" here, but it caused issues like the one
3484 // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
3485 if ( document.readyState === "complete" ) {
3486 // Handle it asynchronously to allow scripts the opportunity to delay ready
3487 setTimeout( jQuery.ready );
3488
3489 // Standards-based browsers support DOMContentLoaded
3490 } else if ( document.addEventListener ) {
3491 // Use the handy event callback
3492 document.addEventListener( "DOMContentLoaded", completed, false );
3493
3494 // A fallback to window.onload, that will always work
3495 window.addEventListener( "load", completed, false );
3496
3497 // If IE event model is used
3498 } else {
3499 // Ensure firing before onload, maybe late but safe also for iframes
3500 document.attachEvent( "onreadystatechange", completed );
3501
3502 // A fallback to window.onload, that will always work
3503 window.attachEvent( "onload", completed );
3504
3505 // If IE and not a frame
3506 // continually check to see if the document is ready
3507 var top = false;
3508
3509 try {
3510 top = window.frameElement == null && document.documentElement;
3511 } catch(e) {}
3512
3513 if ( top && top.doScroll ) {
3514 (function doScrollCheck() {
3515 if ( !jQuery.isReady ) {
3516
3517 try {
3518 // Use the trick by Diego Perini
3519 // http://javascript.nwbox.com/IEContentLoaded/
3520 top.doScroll("left");
3521 } catch(e) {
3522 return setTimeout( doScrollCheck, 50 );
3523 }
3524
3525 // detach all dom ready events
3526 detach();
3527
3528 // and execute any waiting functions
3529 jQuery.ready();
3530 }
3531 })();
3532 }
3533 }
3534 }
3535 return readyList.promise( obj );
3536 };
3537
3538
3539 var strundefined = typeof undefined;
3540
3541
3542
3543 // Support: IE<9
3544 // Iteration over object's inherited properties before its own
3545 var i;
3546 for ( i in jQuery( support ) ) {
3547 break;
3548 }
3549 support.ownLast = i !== "0";
3550
3551 // Note: most support tests are defined in their respective modules.
3552 // false until the test is run
3553 support.inlineBlockNeedsLayout = false;
3554
3555 // Execute ASAP in case we need to set body.style.zoom
3556 jQuery(function() {
3557 // Minified: var a,b,c,d
3558 var val, div, body, container;
3559
3560 body = document.getElementsByTagName( "body" )[ 0 ];
3561 if ( !body || !body.style ) {
3562 // Return for frameset docs that don't have a body
3563 return;
3564 }
3565
3566 // Setup
3567 div = document.createElement( "div" );
3568 container = document.createElement( "div" );
3569 container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px";
3570 body.appendChild( container ).appendChild( div );
3571
3572 if ( typeof div.style.zoom !== strundefined ) {
3573 // Support: IE<8
3574 // Check if natively block-level elements act like inline-block
3575 // elements when setting their display to 'inline' and giving
3576 // them layout
3577 div.style.cssText = "display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1";
3578
3579 support.inlineBlockNeedsLayout = val = div.offsetWidth === 3;
3580 if ( val ) {
3581 // Prevent IE 6 from affecting layout for positioned elements #11048
3582 // Prevent IE from shrinking the body in IE 7 mode #12869
3583 // Support: IE<8
3584 body.style.zoom = 1;
3585 }
3586 }
3587
3588 body.removeChild( container );
3589 });
3590
3591
3592
3593
3594 (function() {
3595 var div = document.createElement( "div" );
3596
3597 // Execute the test only if not already executed in another module.
3598 if (support.deleteExpando == null) {
3599 // Support: IE<9
3600 support.deleteExpando = true;
3601 try {
3602 delete div.test;
3603 } catch( e ) {
3604 support.deleteExpando = false;
3605 }
3606 }
3607
3608 // Null elements to avoid leaks in IE.
3609 div = null;
3610 })();
3611
3612
3613 /**
3614 * Determines whether an object can have data
3615 */
3616 jQuery.acceptData = function( elem ) {
3617 var noData = jQuery.noData[ (elem.nodeName + " ").toLowerCase() ],
3618 nodeType = +elem.nodeType || 1;
3619
3620 // Do not set data on non-element DOM nodes because it will not be cleared (#8335).
3621 return nodeType !== 1 && nodeType !== 9 ?
3622 false :
3623
3624 // Nodes accept data unless otherwise specified; rejection can be conditional
3625 !noData || noData !== true && elem.getAttribute("classid") === noData;
3626 };
3627
3628
3629 var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
3630 rmultiDash = /([A-Z])/g;
3631
3632 function dataAttr( elem, key, data ) {
3633 // If nothing was found internally, try to fetch any
3634 // data from the HTML5 data-* attribute
3635 if ( data === undefined && elem.nodeType === 1 ) {
3636
3637 var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
3638
3639 data = elem.getAttribute( name );
3640
3641 if ( typeof data === "string" ) {
3642 try {
3643 data = data === "true" ? true :
3644 data === "false" ? false :
3645 data === "null" ? null :
3646 // Only convert to a number if it doesn't change the string
3647 +data + "" === data ? +data :
3648 rbrace.test( data ) ? jQuery.parseJSON( data ) :
3649 data;
3650 } catch( e ) {}
3651
3652 // Make sure we set the data so it isn't changed later
3653 jQuery.data( elem, key, data );
3654
3655 } else {
3656 data = undefined;
3657 }
3658 }
3659
3660 return data;
3661 }
3662
3663 // checks a cache object for emptiness
3664 function isEmptyDataObject( obj ) {
3665 var name;
3666 for ( name in obj ) {
3667
3668 // if the public data object is empty, the private is still empty
3669 if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
3670 continue;
3671 }
3672 if ( name !== "toJSON" ) {
3673 return false;
3674 }
3675 }
3676
3677 return true;
3678 }
3679
3680 function internalData( elem, name, data, pvt /* Internal Use Only */ ) {
3681 if ( !jQuery.acceptData( elem ) ) {
3682 return;
3683 }
3684
3685 var ret, thisCache,
3686 internalKey = jQuery.expando,
3687
3688 // We have to handle DOM nodes and JS objects differently because IE6-7
3689 // can't GC object references properly across the DOM-JS boundary
3690 isNode = elem.nodeType,
3691
3692 // Only DOM nodes need the global jQuery cache; JS object data is
3693 // attached directly to the object so GC can occur automatically
3694 cache = isNode ? jQuery.cache : elem,
3695
3696 // Only defining an ID for JS objects if its cache already exists allows
3697 // the code to shortcut on the same path as a DOM node with no cache
3698 id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;
3699
3700 // Avoid doing any more work than we need to when trying to get data on an
3701 // object that has no data at all
3702 if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) {
3703 return;
3704 }
3705
3706 if ( !id ) {
3707 // Only DOM nodes need a new unique ID for each element since their data
3708 // ends up in the global cache
3709 if ( isNode ) {
3710 id = elem[ internalKey ] = deletedIds.pop() || jQuery.guid++;
3711 } else {
3712 id = internalKey;
3713 }
3714 }
3715
3716 if ( !cache[ id ] ) {
3717 // Avoid exposing jQuery metadata on plain JS objects when the object
3718 // is serialized using JSON.stringify
3719 cache[ id ] = isNode ? {} : { toJSON: jQuery.noop };
3720 }
3721
3722 // An object can be passed to jQuery.data instead of a key/value pair; this gets
3723 // shallow copied over onto the existing cache
3724 if ( typeof name === "object" || typeof name === "function" ) {
3725 if ( pvt ) {
3726 cache[ id ] = jQuery.extend( cache[ id ], name );
3727 } else {
3728 cache[ id ].data = jQuery.extend( cache[ id ].data, name );
3729 }
3730 }
3731
3732 thisCache = cache[ id ];
3733
3734 // jQuery data() is stored in a separate object inside the object's internal data
3735 // cache in order to avoid key collisions between internal data and user-defined
3736 // data.
3737 if ( !pvt ) {
3738 if ( !thisCache.data ) {
3739 thisCache.data = {};
3740 }
3741
3742 thisCache = thisCache.data;
3743 }
3744
3745 if ( data !== undefined ) {
3746 thisCache[ jQuery.camelCase( name ) ] = data;
3747 }
3748
3749 // Check for both converted-to-camel and non-converted data property names
3750 // If a data property was specified
3751 if ( typeof name === "string" ) {
3752
3753 // First Try to find as-is property data
3754 ret = thisCache[ name ];
3755
3756 // Test for null|undefined property data
3757 if ( ret == null ) {
3758
3759 // Try to find the camelCased property
3760 ret = thisCache[ jQuery.camelCase( name ) ];
3761 }
3762 } else {
3763 ret = thisCache;
3764 }
3765
3766 return ret;
3767 }
3768
3769 function internalRemoveData( elem, name, pvt ) {
3770 if ( !jQuery.acceptData( elem ) ) {
3771 return;
3772 }
3773
3774 var thisCache, i,
3775 isNode = elem.nodeType,
3776
3777 // See jQuery.data for more information
3778 cache = isNode ? jQuery.cache : elem,
3779 id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
3780
3781 // If there is already no cache entry for this object, there is no
3782 // purpose in continuing
3783 if ( !cache[ id ] ) {
3784 return;
3785 }
3786
3787 if ( name ) {
3788
3789 thisCache = pvt ? cache[ id ] : cache[ id ].data;
3790
3791 if ( thisCache ) {
3792
3793 // Support array or space separated string names for data keys
3794 if ( !jQuery.isArray( name ) ) {
3795
3796 // try the string as a key before any manipulation
3797 if ( name in thisCache ) {
3798 name = [ name ];
3799 } else {
3800
3801 // split the camel cased version by spaces unless a key with the spaces exists
3802 name = jQuery.camelCase( name );
3803 if ( name in thisCache ) {
3804 name = [ name ];
3805 } else {
3806 name = name.split(" ");
3807 }
3808 }
3809 } else {
3810 // If "name" is an array of keys...
3811 // When data is initially created, via ("key", "val") signature,
3812 // keys will be converted to camelCase.
3813 // Since there is no way to tell _how_ a key was added, remove
3814 // both plain key and camelCase key. #12786
3815 // This will only penalize the array argument path.
3816 name = name.concat( jQuery.map( name, jQuery.camelCase ) );
3817 }
3818
3819 i = name.length;
3820 while ( i-- ) {
3821 delete thisCache[ name[i] ];
3822 }
3823
3824 // If there is no data left in the cache, we want to continue
3825 // and let the cache object itself get destroyed
3826 if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) {
3827 return;
3828 }
3829 }
3830 }
3831
3832 // See jQuery.data for more information
3833 if ( !pvt ) {
3834 delete cache[ id ].data;
3835
3836 // Don't destroy the parent cache unless the internal data object
3837 // had been the only thing left in it
3838 if ( !isEmptyDataObject( cache[ id ] ) ) {
3839 return;
3840 }
3841 }
3842
3843 // Destroy the cache
3844 if ( isNode ) {
3845 jQuery.cleanData( [ elem ], true );
3846
3847 // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
3848 /* jshint eqeqeq: false */
3849 } else if ( support.deleteExpando || cache != cache.window ) {
3850 /* jshint eqeqeq: true */
3851 delete cache[ id ];
3852
3853 // When all else fails, null
3854 } else {
3855 cache[ id ] = null;
3856 }
3857 }
3858
3859 jQuery.extend({
3860 cache: {},
3861
3862 // The following elements (space-suffixed to avoid Object.prototype collisions)
3863 // throw uncatchable exceptions if you attempt to set expando properties
3864 noData: {
3865 "applet ": true,
3866 "embed ": true,
3867 // ...but Flash objects (which have this classid) *can* handle expandos
3868 "object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
3869 },
3870
3871 hasData: function( elem ) {
3872 elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
3873 return !!elem && !isEmptyDataObject( elem );
3874 },
3875
3876 data: function( elem, name, data ) {
3877 return internalData( elem, name, data );
3878 },
3879
3880 removeData: function( elem, name ) {
3881 return internalRemoveData( elem, name );
3882 },
3883
3884 // For internal use only.
3885 _data: function( elem, name, data ) {
3886 return internalData( elem, name, data, true );
3887 },
3888
3889 _removeData: function( elem, name ) {
3890 return internalRemoveData( elem, name, true );
3891 }
3892 });
3893
3894 jQuery.fn.extend({
3895 data: function( key, value ) {
3896 var i, name, data,
3897 elem = this[0],
3898 attrs = elem && elem.attributes;
3899
3900 // Special expections of .data basically thwart jQuery.access,
3901 // so implement the relevant behavior ourselves
3902
3903 // Gets all values
3904 if ( key === undefined ) {
3905 if ( this.length ) {
3906 data = jQuery.data( elem );
3907
3908 if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
3909 i = attrs.length;
3910 while ( i-- ) {
3911
3912 // Support: IE11+
3913 // The attrs elements can be null (#14894)
3914 if ( attrs[ i ] ) {
3915 name = attrs[ i ].name;
3916 if ( name.indexOf( "data-" ) === 0 ) {
3917 name = jQuery.camelCase( name.slice(5) );
3918 dataAttr( elem, name, data[ name ] );
3919 }
3920 }
3921 }
3922 jQuery._data( elem, "parsedAttrs", true );
3923 }
3924 }
3925
3926 return data;
3927 }
3928
3929 // Sets multiple values
3930 if ( typeof key === "object" ) {
3931 return this.each(function() {
3932 jQuery.data( this, key );
3933 });
3934 }
3935
3936 return arguments.length > 1 ?
3937
3938 // Sets one value
3939 this.each(function() {
3940 jQuery.data( this, key, value );
3941 }) :
3942
3943 // Gets one value
3944 // Try to fetch any internally stored data first
3945 elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : undefined;
3946 },
3947
3948 removeData: function( key ) {
3949 return this.each(function() {
3950 jQuery.removeData( this, key );
3951 });
3952 }
3953 });
3954
3955
3956 jQuery.extend({
3957 queue: function( elem, type, data ) {
3958 var queue;
3959
3960 if ( elem ) {
3961 type = ( type || "fx" ) + "queue";
3962 queue = jQuery._data( elem, type );
3963
3964 // Speed up dequeue by getting out quickly if this is just a lookup
3965 if ( data ) {
3966 if ( !queue || jQuery.isArray(data) ) {
3967 queue = jQuery._data( elem, type, jQuery.makeArray(data) );
3968 } else {
3969 queue.push( data );
3970 }
3971 }
3972 return queue || [];
3973 }
3974 },
3975
3976 dequeue: function( elem, type ) {
3977 type = type || "fx";
3978
3979 var queue = jQuery.queue( elem, type ),
3980 startLength = queue.length,
3981 fn = queue.shift(),
3982 hooks = jQuery._queueHooks( elem, type ),
3983 next = function() {
3984 jQuery.dequeue( elem, type );
3985 };
3986
3987 // If the fx queue is dequeued, always remove the progress sentinel
3988 if ( fn === "inprogress" ) {
3989 fn = queue.shift();
3990 startLength--;
3991 }
3992
3993 if ( fn ) {
3994
3995 // Add a progress sentinel to prevent the fx queue from being
3996 // automatically dequeued
3997 if ( type === "fx" ) {
3998 queue.unshift( "inprogress" );
3999 }
4000
4001 // clear up the last queue stop function
4002 delete hooks.stop;
4003 fn.call( elem, next, hooks );
4004 }
4005
4006 if ( !startLength && hooks ) {
4007 hooks.empty.fire();
4008 }
4009 },
4010
4011 // not intended for public consumption - generates a queueHooks object, or returns the current one
4012 _queueHooks: function( elem, type ) {
4013 var key = type + "queueHooks";
4014 return jQuery._data( elem, key ) || jQuery._data( elem, key, {
4015 empty: jQuery.Callbacks("once memory").add(function() {
4016 jQuery._removeData( elem, type + "queue" );
4017 jQuery._removeData( elem, key );
4018 })
4019 });
4020 }
4021 });
4022
4023 jQuery.fn.extend({
4024 queue: function( type, data ) {
4025 var setter = 2;
4026
4027 if ( typeof type !== "string" ) {
4028 data = type;
4029 type = "fx";
4030 setter--;
4031 }
4032
4033 if ( arguments.length < setter ) {
4034 return jQuery.queue( this[0], type );
4035 }
4036
4037 return data === undefined ?
4038 this :
4039 this.each(function() {
4040 var queue = jQuery.queue( this, type, data );
4041
4042 // ensure a hooks for this queue
4043 jQuery._queueHooks( this, type );
4044
4045 if ( type === "fx" && queue[0] !== "inprogress" ) {
4046 jQuery.dequeue( this, type );
4047 }
4048 });
4049 },
4050 dequeue: function( type ) {
4051 return this.each(function() {
4052 jQuery.dequeue( this, type );
4053 });
4054 },
4055 clearQueue: function( type ) {
4056 return this.queue( type || "fx", [] );
4057 },
4058 // Get a promise resolved when queues of a certain type
4059 // are emptied (fx is the type by default)
4060 promise: function( type, obj ) {
4061 var tmp,
4062 count = 1,
4063 defer = jQuery.Deferred(),
4064 elements = this,
4065 i = this.length,
4066 resolve = function() {
4067 if ( !( --count ) ) {
4068 defer.resolveWith( elements, [ elements ] );
4069 }
4070 };
4071
4072 if ( typeof type !== "string" ) {
4073 obj = type;
4074 type = undefined;
4075 }
4076 type = type || "fx";
4077
4078 while ( i-- ) {
4079 tmp = jQuery._data( elements[ i ], type + "queueHooks" );
4080 if ( tmp && tmp.empty ) {
4081 count++;
4082 tmp.empty.add( resolve );
4083 }
4084 }
4085 resolve();
4086 return defer.promise( obj );
4087 }
4088 });
4089 var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source;
4090
4091 var cssExpand = [ "Top", "Right", "Bottom", "Left" ];
4092
4093 var isHidden = function( elem, el ) {
4094 // isHidden might be called from jQuery#filter function;
4095 // in that case, element will be second argument
4096 elem = el || elem;
4097 return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
4098 };
4099
4100
4101
4102 // Multifunctional method to get and set values of a collection
4103 // The value/s can optionally be executed if it's a function
4104 var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
4105 var i = 0,
4106 length = elems.length,
4107 bulk = key == null;
4108
4109 // Sets many values
4110 if ( jQuery.type( key ) === "object" ) {
4111 chainable = true;
4112 for ( i in key ) {
4113 jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
4114 }
4115
4116 // Sets one value
4117 } else if ( value !== undefined ) {
4118 chainable = true;
4119
4120 if ( !jQuery.isFunction( value ) ) {
4121 raw = true;
4122 }
4123
4124 if ( bulk ) {
4125 // Bulk operations run against the entire set
4126 if ( raw ) {
4127 fn.call( elems, value );
4128 fn = null;
4129
4130 // ...except when executing function values
4131 } else {
4132 bulk = fn;
4133 fn = function( elem, key, value ) {
4134 return bulk.call( jQuery( elem ), value );
4135 };
4136 }
4137 }
4138
4139 if ( fn ) {
4140 for ( ; i < length; i++ ) {
4141 fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
4142 }
4143 }
4144 }
4145
4146 return chainable ?
4147 elems :
4148
4149 // Gets
4150 bulk ?
4151 fn.call( elems ) :
4152 length ? fn( elems[0], key ) : emptyGet;
4153 };
4154 var rcheckableType = (/^(?:checkbox|radio)$/i);
4155
4156
4157
4158 (function() {
4159 // Minified: var a,b,c
4160 var input = document.createElement( "input" ),
4161 div = document.createElement( "div" ),
4162 fragment = document.createDocumentFragment();
4163
4164 // Setup
4165 div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
4166
4167 // IE strips leading whitespace when .innerHTML is used
4168 support.leadingWhitespace = div.firstChild.nodeType === 3;
4169
4170 // Make sure that tbody elements aren't automatically inserted
4171 // IE will insert them into empty tables
4172 support.tbody = !div.getElementsByTagName( "tbody" ).length;
4173
4174 // Make sure that link elements get serialized correctly by innerHTML
4175 // This requires a wrapper element in IE
4176 support.htmlSerialize = !!div.getElementsByTagName( "link" ).length;
4177
4178 // Makes sure cloning an html5 element does not cause problems
4179 // Where outerHTML is undefined, this still works
4180 support.html5Clone =
4181 document.createElement( "nav" ).cloneNode( true ).outerHTML !== "<:nav></:nav>";
4182
4183 // Check if a disconnected checkbox will retain its checked
4184 // value of true after appended to the DOM (IE6/7)
4185 input.type = "checkbox";
4186 input.checked = true;
4187 fragment.appendChild( input );
4188 support.appendChecked = input.checked;
4189
4190 // Make sure textarea (and checkbox) defaultValue is properly cloned
4191 // Support: IE6-IE11+
4192 div.innerHTML = "<textarea>x</textarea>";
4193 support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
4194
4195 // #11217 - WebKit loses check when the name is after the checked attribute
4196 fragment.appendChild( div );
4197 div.innerHTML = "<input type='radio' checked='checked' name='t'/>";
4198
4199 // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3
4200 // old WebKit doesn't clone checked state correctly in fragments
4201 support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
4202
4203 // Support: IE<9
4204 // Opera does not clone events (and typeof div.attachEvent === undefined).
4205 // IE9-10 clones events bound via attachEvent, but they don't trigger with .click()
4206 support.noCloneEvent = true;
4207 if ( div.attachEvent ) {
4208 div.attachEvent( "onclick", function() {
4209 support.noCloneEvent = false;
4210 });
4211
4212 div.cloneNode( true ).click();
4213 }
4214
4215 // Execute the test only if not already executed in another module.
4216 if (support.deleteExpando == null) {
4217 // Support: IE<9
4218 support.deleteExpando = true;
4219 try {
4220 delete div.test;
4221 } catch( e ) {
4222 support.deleteExpando = false;
4223 }
4224 }
4225 })();
4226
4227
4228 (function() {
4229 var i, eventName,
4230 div = document.createElement( "div" );
4231
4232 // Support: IE<9 (lack submit/change bubble), Firefox 23+ (lack focusin event)
4233 for ( i in { submit: true, change: true, focusin: true }) {
4234 eventName = "on" + i;
4235
4236 if ( !(support[ i + "Bubbles" ] = eventName in window) ) {
4237 // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)
4238 div.setAttribute( eventName, "t" );
4239 support[ i + "Bubbles" ] = div.attributes[ eventName ].expando === false;
4240 }
4241 }
4242
4243 // Null elements to avoid leaks in IE.
4244 div = null;
4245 })();
4246
4247
4248 var rformElems = /^(?:input|select|textarea)$/i,
4249 rkeyEvent = /^key/,
4250 rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/,
4251 rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
4252 rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
4253
4254 function returnTrue() {
4255 return true;
4256 }
4257
4258 function returnFalse() {
4259 return false;
4260 }
4261
4262 function safeActiveElement() {
4263 try {
4264 return document.activeElement;
4265 } catch ( err ) { }
4266 }
4267
4268 /*
4269 * Helper functions for managing events -- not part of the public interface.
4270 * Props to Dean Edwards' addEvent library for many of the ideas.
4271 */
4272 jQuery.event = {
4273
4274 global: {},
4275
4276 add: function( elem, types, handler, data, selector ) {
4277 var tmp, events, t, handleObjIn,
4278 special, eventHandle, handleObj,
4279 handlers, type, namespaces, origType,
4280 elemData = jQuery._data( elem );
4281
4282 // Don't attach events to noData or text/comment nodes (but allow plain objects)
4283 if ( !elemData ) {
4284 return;
4285 }
4286
4287 // Caller can pass in an object of custom data in lieu of the handler
4288 if ( handler.handler ) {
4289 handleObjIn = handler;
4290 handler = handleObjIn.handler;
4291 selector = handleObjIn.selector;
4292 }
4293
4294 // Make sure that the handler has a unique ID, used to find/remove it later
4295 if ( !handler.guid ) {
4296 handler.guid = jQuery.guid++;
4297 }
4298
4299 // Init the element's event structure and main handler, if this is the first
4300 if ( !(events = elemData.events) ) {
4301 events = elemData.events = {};
4302 }
4303 if ( !(eventHandle = elemData.handle) ) {
4304 eventHandle = elemData.handle = function( e ) {
4305 // Discard the second event of a jQuery.event.trigger() and
4306 // when an event is called after a page has unloaded
4307 return typeof jQuery !== strundefined && (!e || jQuery.event.triggered !== e.type) ?
4308 jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
4309 undefined;
4310 };
4311 // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
4312 eventHandle.elem = elem;
4313 }
4314
4315 // Handle multiple events separated by a space
4316 types = ( types || "" ).match( rnotwhite ) || [ "" ];
4317 t = types.length;
4318 while ( t-- ) {
4319 tmp = rtypenamespace.exec( types[t] ) || [];
4320 type = origType = tmp[1];
4321 namespaces = ( tmp[2] || "" ).split( "." ).sort();
4322
4323 // There *must* be a type, no attaching namespace-only handlers
4324 if ( !type ) {
4325 continue;
4326 }
4327
4328 // If event changes its type, use the special event handlers for the changed type
4329 special = jQuery.event.special[ type ] || {};
4330
4331 // If selector defined, determine special event api type, otherwise given type
4332 type = ( selector ? special.delegateType : special.bindType ) || type;
4333
4334 // Update special based on newly reset type
4335 special = jQuery.event.special[ type ] || {};
4336
4337 // handleObj is passed to all event handlers
4338 handleObj = jQuery.extend({
4339 type: type,
4340 origType: origType,
4341 data: data,
4342 handler: handler,
4343 guid: handler.guid,
4344 selector: selector,
4345 needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
4346 namespace: namespaces.join(".")
4347 }, handleObjIn );
4348
4349 // Init the event handler queue if we're the first
4350 if ( !(handlers = events[ type ]) ) {
4351 handlers = events[ type ] = [];
4352 handlers.delegateCount = 0;
4353
4354 // Only use addEventListener/attachEvent if the special events handler returns false
4355 if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
4356 // Bind the global event handler to the element
4357 if ( elem.addEventListener ) {
4358 elem.addEventListener( type, eventHandle, false );
4359
4360 } else if ( elem.attachEvent ) {
4361 elem.attachEvent( "on" + type, eventHandle );
4362 }
4363 }
4364 }
4365
4366 if ( special.add ) {
4367 special.add.call( elem, handleObj );
4368
4369 if ( !handleObj.handler.guid ) {
4370 handleObj.handler.guid = handler.guid;
4371 }
4372 }
4373
4374 // Add to the element's handler list, delegates in front
4375 if ( selector ) {
4376 handlers.splice( handlers.delegateCount++, 0, handleObj );
4377 } else {
4378 handlers.push( handleObj );
4379 }
4380
4381 // Keep track of which events have ever been used, for event optimization
4382 jQuery.event.global[ type ] = true;
4383 }
4384
4385 // Nullify elem to prevent memory leaks in IE
4386 elem = null;
4387 },
4388
4389 // Detach an event or set of events from an element
4390 remove: function( elem, types, handler, selector, mappedTypes ) {
4391 var j, handleObj, tmp,
4392 origCount, t, events,
4393 special, handlers, type,
4394 namespaces, origType,
4395 elemData = jQuery.hasData( elem ) && jQuery._data( elem );
4396
4397 if ( !elemData || !(events = elemData.events) ) {
4398 return;
4399 }
4400
4401 // Once for each type.namespace in types; type may be omitted
4402 types = ( types || "" ).match( rnotwhite ) || [ "" ];
4403 t = types.length;
4404 while ( t-- ) {
4405 tmp = rtypenamespace.exec( types[t] ) || [];
4406 type = origType = tmp[1];
4407 namespaces = ( tmp[2] || "" ).split( "." ).sort();
4408
4409 // Unbind all events (on this namespace, if provided) for the element
4410 if ( !type ) {
4411 for ( type in events ) {
4412 jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
4413 }
4414 continue;
4415 }
4416
4417 special = jQuery.event.special[ type ] || {};
4418 type = ( selector ? special.delegateType : special.bindType ) || type;
4419 handlers = events[ type ] || [];
4420 tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" );
4421
4422 // Remove matching events
4423 origCount = j = handlers.length;
4424 while ( j-- ) {
4425 handleObj = handlers[ j ];
4426
4427 if ( ( mappedTypes || origType === handleObj.origType ) &&
4428 ( !handler || handler.guid === handleObj.guid ) &&
4429 ( !tmp || tmp.test( handleObj.namespace ) ) &&
4430 ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
4431 handlers.splice( j, 1 );
4432
4433 if ( handleObj.selector ) {
4434 handlers.delegateCount--;
4435 }
4436 if ( special.remove ) {
4437 special.remove.call( elem, handleObj );
4438 }
4439 }
4440 }
4441
4442 // Remove generic event handler if we removed something and no more handlers exist
4443 // (avoids potential for endless recursion during removal of special event handlers)
4444 if ( origCount && !handlers.length ) {
4445 if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
4446 jQuery.removeEvent( elem, type, elemData.handle );
4447 }
4448
4449 delete events[ type ];
4450 }
4451 }
4452
4453 // Remove the expando if it's no longer used
4454 if ( jQuery.isEmptyObject( events ) ) {
4455 delete elemData.handle;
4456
4457 // removeData also checks for emptiness and clears the expando if empty
4458 // so use it instead of delete
4459 jQuery._removeData( elem, "events" );
4460 }
4461 },
4462
4463 trigger: function( event, data, elem, onlyHandlers ) {
4464 var handle, ontype, cur,
4465 bubbleType, special, tmp, i,
4466 eventPath = [ elem || document ],
4467 type = hasOwn.call( event, "type" ) ? event.type : event,
4468 namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : [];
4469
4470 cur = tmp = elem = elem || document;
4471
4472 // Don't do events on text and comment nodes
4473 if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
4474 return;
4475 }
4476
4477 // focus/blur morphs to focusin/out; ensure we're not firing them right now
4478 if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
4479 return;
4480 }
4481
4482 if ( type.indexOf(".") >= 0 ) {
4483 // Namespaced trigger; create a regexp to match event type in handle()
4484 namespaces = type.split(".");
4485 type = namespaces.shift();
4486 namespaces.sort();
4487 }
4488 ontype = type.indexOf(":") < 0 && "on" + type;
4489
4490 // Caller can pass in a jQuery.Event object, Object, or just an event type string
4491 event = event[ jQuery.expando ] ?
4492 event :
4493 new jQuery.Event( type, typeof event === "object" && event );
4494
4495 // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
4496 event.isTrigger = onlyHandlers ? 2 : 3;
4497 event.namespace = namespaces.join(".");
4498 event.namespace_re = event.namespace ?
4499 new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :
4500 null;
4501
4502 // Clean up the event in case it is being reused
4503 event.result = undefined;
4504 if ( !event.target ) {
4505 event.target = elem;
4506 }
4507
4508 // Clone any incoming data and prepend the event, creating the handler arg list
4509 data = data == null ?
4510 [ event ] :
4511 jQuery.makeArray( data, [ event ] );
4512
4513 // Allow special events to draw outside the lines
4514 special = jQuery.event.special[ type ] || {};
4515 if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
4516 return;
4517 }
4518
4519 // Determine event propagation path in advance, per W3C events spec (#9951)
4520 // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
4521 if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
4522
4523 bubbleType = special.delegateType || type;
4524 if ( !rfocusMorph.test( bubbleType + type ) ) {
4525 cur = cur.parentNode;
4526 }
4527 for ( ; cur; cur = cur.parentNode ) {
4528 eventPath.push( cur );
4529 tmp = cur;
4530 }
4531
4532 // Only add window if we got to document (e.g., not plain obj or detached DOM)
4533 if ( tmp === (elem.ownerDocument || document) ) {
4534 eventPath.push( tmp.defaultView || tmp.parentWindow || window );
4535 }
4536 }
4537
4538 // Fire handlers on the event path
4539 i = 0;
4540 while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {
4541
4542 event.type = i > 1 ?
4543 bubbleType :
4544 special.bindType || type;
4545
4546 // jQuery handler
4547 handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
4548 if ( handle ) {
4549 handle.apply( cur, data );
4550 }
4551
4552 // Native handler
4553 handle = ontype && cur[ ontype ];
4554 if ( handle && handle.apply && jQuery.acceptData( cur ) ) {
4555 event.result = handle.apply( cur, data );
4556 if ( event.result === false ) {
4557 event.preventDefault();
4558 }
4559 }
4560 }
4561 event.type = type;
4562
4563 // If nobody prevented the default action, do it now
4564 if ( !onlyHandlers && !event.isDefaultPrevented() ) {
4565
4566 if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) &&
4567 jQuery.acceptData( elem ) ) {
4568
4569 // Call a native DOM method on the target with the same name name as the event.
4570 // Can't use an .isFunction() check here because IE6/7 fails that test.
4571 // Don't do default actions on window, that's where global variables be (#6170)
4572 if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {
4573
4574 // Don't re-trigger an onFOO event when we call its FOO() method
4575 tmp = elem[ ontype ];
4576
4577 if ( tmp ) {
4578 elem[ ontype ] = null;
4579 }
4580
4581 // Prevent re-triggering of the same event, since we already bubbled it above
4582 jQuery.event.triggered = type;
4583 try {
4584 elem[ type ]();
4585 } catch ( e ) {
4586 // IE<9 dies on focus/blur to hidden element (#1486,#12518)
4587 // only reproducible on winXP IE8 native, not IE9 in IE8 mode
4588 }
4589 jQuery.event.triggered = undefined;
4590
4591 if ( tmp ) {
4592 elem[ ontype ] = tmp;
4593 }
4594 }
4595 }
4596 }
4597
4598 return event.result;
4599 },
4600
4601 dispatch: function( event ) {
4602
4603 // Make a writable jQuery.Event from the native event object
4604 event = jQuery.event.fix( event );
4605
4606 var i, ret, handleObj, matched, j,
4607 handlerQueue = [],
4608 args = slice.call( arguments ),
4609 handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [],
4610 special = jQuery.event.special[ event.type ] || {};
4611
4612 // Use the fix-ed jQuery.Event rather than the (read-only) native event
4613 args[0] = event;
4614 event.delegateTarget = this;
4615
4616 // Call the preDispatch hook for the mapped type, and let it bail if desired
4617 if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
4618 return;
4619 }
4620
4621 // Determine handlers
4622 handlerQueue = jQuery.event.handlers.call( this, event, handlers );
4623
4624 // Run delegates first; they may want to stop propagation beneath us
4625 i = 0;
4626 while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {
4627 event.currentTarget = matched.elem;
4628
4629 j = 0;
4630 while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {
4631
4632 // Triggered event must either 1) have no namespace, or
4633 // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
4634 if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {
4635
4636 event.handleObj = handleObj;
4637 event.data = handleObj.data;
4638
4639 ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
4640 .apply( matched.elem, args );
4641
4642 if ( ret !== undefined ) {
4643 if ( (event.result = ret) === false ) {
4644 event.preventDefault();
4645 event.stopPropagation();
4646 }
4647 }
4648 }
4649 }
4650 }
4651
4652 // Call the postDispatch hook for the mapped type
4653 if ( special.postDispatch ) {
4654 special.postDispatch.call( this, event );
4655 }
4656
4657 return event.result;
4658 },
4659
4660 handlers: function( event, handlers ) {
4661 var sel, handleObj, matches, i,
4662 handlerQueue = [],
4663 delegateCount = handlers.delegateCount,
4664 cur = event.target;
4665
4666 // Find delegate handlers
4667 // Black-hole SVG <use> instance trees (#13180)
4668 // Avoid non-left-click bubbling in Firefox (#3861)
4669 if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {
4670
4671 /* jshint eqeqeq: false */
4672 for ( ; cur != this; cur = cur.parentNode || this ) {
4673 /* jshint eqeqeq: true */
4674
4675 // Don't check non-elements (#13208)
4676 // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
4677 if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) {
4678 matches = [];
4679 for ( i = 0; i < delegateCount; i++ ) {
4680 handleObj = handlers[ i ];
4681
4682 // Don't conflict with Object.prototype properties (#13203)
4683 sel = handleObj.selector + " ";
4684
4685 if ( matches[ sel ] === undefined ) {
4686 matches[ sel ] = handleObj.needsContext ?
4687 jQuery( sel, this ).index( cur ) >= 0 :
4688 jQuery.find( sel, this, null, [ cur ] ).length;
4689 }
4690 if ( matches[ sel ] ) {
4691 matches.push( handleObj );
4692 }
4693 }
4694 if ( matches.length ) {
4695 handlerQueue.push({ elem: cur, handlers: matches });
4696 }
4697 }
4698 }
4699 }
4700
4701 // Add the remaining (directly-bound) handlers
4702 if ( delegateCount < handlers.length ) {
4703 handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });
4704 }
4705
4706 return handlerQueue;
4707 },
4708
4709 fix: function( event ) {
4710 if ( event[ jQuery.expando ] ) {
4711 return event;
4712 }
4713
4714 // Create a writable copy of the event object and normalize some properties
4715 var i, prop, copy,
4716 type = event.type,
4717 originalEvent = event,
4718 fixHook = this.fixHooks[ type ];
4719
4720 if ( !fixHook ) {
4721 this.fixHooks[ type ] = fixHook =
4722 rmouseEvent.test( type ) ? this.mouseHooks :
4723 rkeyEvent.test( type ) ? this.keyHooks :
4724 {};
4725 }
4726 copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
4727
4728 event = new jQuery.Event( originalEvent );
4729
4730 i = copy.length;
4731 while ( i-- ) {
4732 prop = copy[ i ];
4733 event[ prop ] = originalEvent[ prop ];
4734 }
4735
4736 // Support: IE<9
4737 // Fix target property (#1925)
4738 if ( !event.target ) {
4739 event.target = originalEvent.srcElement || document;
4740 }
4741
4742 // Support: Chrome 23+, Safari?
4743 // Target should not be a text node (#504, #13143)
4744 if ( event.target.nodeType === 3 ) {
4745 event.target = event.target.parentNode;
4746 }
4747
4748 // Support: IE<9
4749 // For mouse/key events, metaKey==false if it's undefined (#3368, #11328)
4750 event.metaKey = !!event.metaKey;
4751
4752 return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
4753 },
4754
4755 // Includes some event props shared by KeyEvent and MouseEvent
4756 props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
4757
4758 fixHooks: {},
4759
4760 keyHooks: {
4761 props: "char charCode key keyCode".split(" "),
4762 filter: function( event, original ) {
4763
4764 // Add which for key events
4765 if ( event.which == null ) {
4766 event.which = original.charCode != null ? original.charCode : original.keyCode;
4767 }
4768
4769 return event;
4770 }
4771 },
4772
4773 mouseHooks: {
4774 props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
4775 filter: function( event, original ) {
4776 var body, eventDoc, doc,
4777 button = original.button,
4778 fromElement = original.fromElement;
4779
4780 // Calculate pageX/Y if missing and clientX/Y available
4781 if ( event.pageX == null && original.clientX != null ) {
4782 eventDoc = event.target.ownerDocument || document;
4783 doc = eventDoc.documentElement;
4784 body = eventDoc.body;
4785
4786 event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
4787 event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
4788 }
4789
4790 // Add relatedTarget, if necessary
4791 if ( !event.relatedTarget && fromElement ) {
4792 event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
4793 }
4794
4795 // Add which for click: 1 === left; 2 === middle; 3 === right
4796 // Note: button is not normalized, so don't use it
4797 if ( !event.which && button !== undefined ) {
4798 event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
4799 }
4800
4801 return event;
4802 }
4803 },
4804
4805 special: {
4806 load: {
4807 // Prevent triggered image.load events from bubbling to window.load
4808 noBubble: true
4809 },
4810 focus: {
4811 // Fire native event if possible so blur/focus sequence is correct
4812 trigger: function() {
4813 if ( this !== safeActiveElement() && this.focus ) {
4814 try {
4815 this.focus();
4816 return false;
4817 } catch ( e ) {
4818 // Support: IE<9
4819 // If we error on focus to hidden element (#1486, #12518),
4820 // let .trigger() run the handlers
4821 }
4822 }
4823 },
4824 delegateType: "focusin"
4825 },
4826 blur: {
4827 trigger: function() {
4828 if ( this === safeActiveElement() && this.blur ) {
4829 this.blur();
4830 return false;
4831 }
4832 },
4833 delegateType: "focusout"
4834 },
4835 click: {
4836 // For checkbox, fire native event so checked state will be right
4837 trigger: function() {
4838 if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) {
4839 this.click();
4840 return false;
4841 }
4842 },
4843
4844 // For cross-browser consistency, don't fire native .click() on links
4845 _default: function( event ) {
4846 return jQuery.nodeName( event.target, "a" );
4847 }
4848 },
4849
4850 beforeunload: {
4851 postDispatch: function( event ) {
4852
4853 // Support: Firefox 20+
4854 // Firefox doesn't alert if the returnValue field is not set.
4855 if ( event.result !== undefined && event.originalEvent ) {
4856 event.originalEvent.returnValue = event.result;
4857 }
4858 }
4859 }
4860 },
4861
4862 simulate: function( type, elem, event, bubble ) {
4863 // Piggyback on a donor event to simulate a different one.
4864 // Fake originalEvent to avoid donor's stopPropagation, but if the
4865 // simulated event prevents default then we do the same on the donor.
4866 var e = jQuery.extend(
4867 new jQuery.Event(),
4868 event,
4869 {
4870 type: type,
4871 isSimulated: true,
4872 originalEvent: {}
4873 }
4874 );
4875 if ( bubble ) {
4876 jQuery.event.trigger( e, null, elem );
4877 } else {
4878 jQuery.event.dispatch.call( elem, e );
4879 }
4880 if ( e.isDefaultPrevented() ) {
4881 event.preventDefault();
4882 }
4883 }
4884 };
4885
4886 jQuery.removeEvent = document.removeEventListener ?
4887 function( elem, type, handle ) {
4888 if ( elem.removeEventListener ) {
4889 elem.removeEventListener( type, handle, false );
4890 }
4891 } :
4892 function( elem, type, handle ) {
4893 var name = "on" + type;
4894
4895 if ( elem.detachEvent ) {
4896
4897 // #8545, #7054, preventing memory leaks for custom events in IE6-8
4898 // detachEvent needed property on element, by name of that event, to properly expose it to GC
4899 if ( typeof elem[ name ] === strundefined ) {
4900 elem[ name ] = null;
4901 }
4902
4903 elem.detachEvent( name, handle );
4904 }
4905 };
4906
4907 jQuery.Event = function( src, props ) {
4908 // Allow instantiation without the 'new' keyword
4909 if ( !(this instanceof jQuery.Event) ) {
4910 return new jQuery.Event( src, props );
4911 }
4912
4913 // Event object
4914 if ( src && src.type ) {
4915 this.originalEvent = src;
4916 this.type = src.type;
4917
4918 // Events bubbling up the document may have been marked as prevented
4919 // by a handler lower down the tree; reflect the correct value.
4920 this.isDefaultPrevented = src.defaultPrevented ||
4921 src.defaultPrevented === undefined &&
4922 // Support: IE < 9, Android < 4.0
4923 src.returnValue === false ?
4924 returnTrue :
4925 returnFalse;
4926
4927 // Event type
4928 } else {
4929 this.type = src;
4930 }
4931
4932 // Put explicitly provided properties onto the event object
4933 if ( props ) {
4934 jQuery.extend( this, props );
4935 }
4936
4937 // Create a timestamp if incoming event doesn't have one
4938 this.timeStamp = src && src.timeStamp || jQuery.now();
4939
4940 // Mark it as fixed
4941 this[ jQuery.expando ] = true;
4942 };
4943
4944 // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
4945 // http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
4946 jQuery.Event.prototype = {
4947 isDefaultPrevented: returnFalse,
4948 isPropagationStopped: returnFalse,
4949 isImmediatePropagationStopped: returnFalse,
4950
4951 preventDefault: function() {
4952 var e = this.originalEvent;
4953
4954 this.isDefaultPrevented = returnTrue;
4955 if ( !e ) {
4956 return;
4957 }
4958
4959 // If preventDefault exists, run it on the original event
4960 if ( e.preventDefault ) {
4961 e.preventDefault();
4962
4963 // Support: IE
4964 // Otherwise set the returnValue property of the original event to false
4965 } else {
4966 e.returnValue = false;
4967 }
4968 },
4969 stopPropagation: function() {
4970 var e = this.originalEvent;
4971
4972 this.isPropagationStopped = returnTrue;
4973 if ( !e ) {
4974 return;
4975 }
4976 // If stopPropagation exists, run it on the original event
4977 if ( e.stopPropagation ) {
4978 e.stopPropagation();
4979 }
4980
4981 // Support: IE
4982 // Set the cancelBubble property of the original event to true
4983 e.cancelBubble = true;
4984 },
4985 stopImmediatePropagation: function() {
4986 var e = this.originalEvent;
4987
4988 this.isImmediatePropagationStopped = returnTrue;
4989
4990 if ( e && e.stopImmediatePropagation ) {
4991 e.stopImmediatePropagation();
4992 }
4993
4994 this.stopPropagation();
4995 }
4996 };
4997
4998 // Create mouseenter/leave events using mouseover/out and event-time checks
4999 jQuery.each({
5000 mouseenter: "mouseover",
5001 mouseleave: "mouseout",
5002 pointerenter: "pointerover",
5003 pointerleave: "pointerout"
5004 }, function( orig, fix ) {
5005 jQuery.event.special[ orig ] = {
5006 delegateType: fix,
5007 bindType: fix,
5008
5009 handle: function( event ) {
5010 var ret,
5011 target = this,
5012 related = event.relatedTarget,
5013 handleObj = event.handleObj;
5014
5015 // For mousenter/leave call the handler if related is outside the target.
5016 // NB: No relatedTarget if the mouse left/entered the browser window
5017 if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
5018 event.type = handleObj.origType;
5019 ret = handleObj.handler.apply( this, arguments );
5020 event.type = fix;
5021 }
5022 return ret;
5023 }
5024 };
5025 });
5026
5027 // IE submit delegation
5028 if ( !support.submitBubbles ) {
5029
5030 jQuery.event.special.submit = {
5031 setup: function() {
5032 // Only need this for delegated form submit events
5033 if ( jQuery.nodeName( this, "form" ) ) {
5034 return false;
5035 }
5036
5037 // Lazy-add a submit handler when a descendant form may potentially be submitted
5038 jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
5039 // Node name check avoids a VML-related crash in IE (#9807)
5040 var elem = e.target,
5041 form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
5042 if ( form && !jQuery._data( form, "submitBubbles" ) ) {
5043 jQuery.event.add( form, "submit._submit", function( event ) {
5044 event._submit_bubble = true;
5045 });
5046 jQuery._data( form, "submitBubbles", true );
5047 }
5048 });
5049 // return undefined since we don't need an event listener
5050 },
5051
5052 postDispatch: function( event ) {
5053 // If form was submitted by the user, bubble the event up the tree
5054 if ( event._submit_bubble ) {
5055 delete event._submit_bubble;
5056 if ( this.parentNode && !event.isTrigger ) {
5057 jQuery.event.simulate( "submit", this.parentNode, event, true );
5058 }
5059 }
5060 },
5061
5062 teardown: function() {
5063 // Only need this for delegated form submit events
5064 if ( jQuery.nodeName( this, "form" ) ) {
5065 return false;
5066 }
5067
5068 // Remove delegated handlers; cleanData eventually reaps submit handlers attached above
5069 jQuery.event.remove( this, "._submit" );
5070 }
5071 };
5072 }
5073
5074 // IE change delegation and checkbox/radio fix
5075 if ( !support.changeBubbles ) {
5076
5077 jQuery.event.special.change = {
5078
5079 setup: function() {
5080
5081 if ( rformElems.test( this.nodeName ) ) {
5082 // IE doesn't fire change on a check/radio until blur; trigger it on click
5083 // after a propertychange. Eat the blur-change in special.change.handle.
5084 // This still fires onchange a second time for check/radio after blur.
5085 if ( this.type === "checkbox" || this.type === "radio" ) {
5086 jQuery.event.add( this, "propertychange._change", function( event ) {
5087 if ( event.originalEvent.propertyName === "checked" ) {
5088 this._just_changed = true;
5089 }
5090 });
5091 jQuery.event.add( this, "click._change", function( event ) {
5092 if ( this._just_changed && !event.isTrigger ) {
5093 this._just_changed = false;
5094 }
5095 // Allow triggered, simulated change events (#11500)
5096 jQuery.event.simulate( "change", this, event, true );
5097 });
5098 }
5099 return false;
5100 }
5101 // Delegated event; lazy-add a change handler on descendant inputs
5102 jQuery.event.add( this, "beforeactivate._change", function( e ) {
5103 var elem = e.target;
5104
5105 if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) {
5106 jQuery.event.add( elem, "change._change", function( event ) {
5107 if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
5108 jQuery.event.simulate( "change", this.parentNode, event, true );
5109 }
5110 });
5111 jQuery._data( elem, "changeBubbles", true );
5112 }
5113 });
5114 },
5115
5116 handle: function( event ) {
5117 var elem = event.target;
5118
5119 // Swallow native change events from checkbox/radio, we already triggered them above
5120 if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
5121 return event.handleObj.handler.apply( this, arguments );
5122 }
5123 },
5124
5125 teardown: function() {
5126 jQuery.event.remove( this, "._change" );
5127
5128 return !rformElems.test( this.nodeName );
5129 }
5130 };
5131 }
5132
5133 // Create "bubbling" focus and blur events
5134 if ( !support.focusinBubbles ) {
5135 jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
5136
5137 // Attach a single capturing handler on the document while someone wants focusin/focusout
5138 var handler = function( event ) {
5139 jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
5140 };
5141
5142 jQuery.event.special[ fix ] = {
5143 setup: function() {
5144 var doc = this.ownerDocument || this,
5145 attaches = jQuery._data( doc, fix );
5146
5147 if ( !attaches ) {
5148 doc.addEventListener( orig, handler, true );
5149 }
5150 jQuery._data( doc, fix, ( attaches || 0 ) + 1 );
5151 },
5152 teardown: function() {
5153 var doc = this.ownerDocument || this,
5154 attaches = jQuery._data( doc, fix ) - 1;
5155
5156 if ( !attaches ) {
5157 doc.removeEventListener( orig, handler, true );
5158 jQuery._removeData( doc, fix );
5159 } else {
5160 jQuery._data( doc, fix, attaches );
5161 }
5162 }
5163 };
5164 });
5165 }
5166
5167 jQuery.fn.extend({
5168
5169 on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
5170 var type, origFn;
5171
5172 // Types can be a map of types/handlers
5173 if ( typeof types === "object" ) {
5174 // ( types-Object, selector, data )
5175 if ( typeof selector !== "string" ) {
5176 // ( types-Object, data )
5177 data = data || selector;
5178 selector = undefined;
5179 }
5180 for ( type in types ) {
5181 this.on( type, selector, data, types[ type ], one );
5182 }
5183 return this;
5184 }
5185
5186 if ( data == null && fn == null ) {
5187 // ( types, fn )
5188 fn = selector;
5189 data = selector = undefined;
5190 } else if ( fn == null ) {
5191 if ( typeof selector === "string" ) {
5192 // ( types, selector, fn )
5193 fn = data;
5194 data = undefined;
5195 } else {
5196 // ( types, data, fn )
5197 fn = data;
5198 data = selector;
5199 selector = undefined;
5200 }
5201 }
5202 if ( fn === false ) {
5203 fn = returnFalse;
5204 } else if ( !fn ) {
5205 return this;
5206 }
5207
5208 if ( one === 1 ) {
5209 origFn = fn;
5210 fn = function( event ) {
5211 // Can use an empty set, since event contains the info
5212 jQuery().off( event );
5213 return origFn.apply( this, arguments );
5214 };
5215 // Use same guid so caller can remove using origFn
5216 fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
5217 }
5218 return this.each( function() {
5219 jQuery.event.add( this, types, fn, data, selector );
5220 });
5221 },
5222 one: function( types, selector, data, fn ) {
5223 return this.on( types, selector, data, fn, 1 );
5224 },
5225 off: function( types, selector, fn ) {
5226 var handleObj, type;
5227 if ( types && types.preventDefault && types.handleObj ) {
5228 // ( event ) dispatched jQuery.Event
5229 handleObj = types.handleObj;
5230 jQuery( types.delegateTarget ).off(
5231 handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
5232 handleObj.selector,
5233 handleObj.handler
5234 );
5235 return this;
5236 }
5237 if ( typeof types === "object" ) {
5238 // ( types-object [, selector] )
5239 for ( type in types ) {
5240 this.off( type, selector, types[ type ] );
5241 }
5242 return this;
5243 }
5244 if ( selector === false || typeof selector === "function" ) {
5245 // ( types [, fn] )
5246 fn = selector;
5247 selector = undefined;
5248 }
5249 if ( fn === false ) {
5250 fn = returnFalse;
5251 }
5252 return this.each(function() {
5253 jQuery.event.remove( this, types, fn, selector );
5254 });
5255 },
5256
5257 trigger: function( type, data ) {
5258 return this.each(function() {
5259 jQuery.event.trigger( type, data, this );
5260 });
5261 },
5262 triggerHandler: function( type, data ) {
5263 var elem = this[0];
5264 if ( elem ) {
5265 return jQuery.event.trigger( type, data, elem, true );
5266 }
5267 }
5268 });
5269
5270
5271 function createSafeFragment( document ) {
5272 var list = nodeNames.split( "|" ),
5273 safeFrag = document.createDocumentFragment();
5274
5275 if ( safeFrag.createElement ) {
5276 while ( list.length ) {
5277 safeFrag.createElement(
5278 list.pop()
5279 );
5280 }
5281 }
5282 return safeFrag;
5283 }
5284
5285 var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
5286 "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
5287 rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
5288 rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
5289 rleadingWhitespace = /^\s+/,
5290 rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
5291 rtagName = /<([\w:]+)/,
5292 rtbody = /<tbody/i,
5293 rhtml = /<|&#?\w+;/,
5294 rnoInnerhtml = /<(?:script|style|link)/i,
5295 // checked="checked" or checked
5296 rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
5297 rscriptType = /^$|\/(?:java|ecma)script/i,
5298 rscriptTypeMasked = /^true\/(.*)/,
5299 rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
5300
5301 // We have to close these tags to support XHTML (#13200)
5302 wrapMap = {
5303 option: [ 1, "<select multiple='multiple'>", "</select>" ],
5304 legend: [ 1, "<fieldset>", "</fieldset>" ],
5305 area: [ 1, "<map>", "</map>" ],
5306 param: [ 1, "<object>", "</object>" ],
5307 thead: [ 1, "<table>", "</table>" ],
5308 tr: [ 2, "<table><tbody>", "</tbody></table>" ],
5309 col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
5310 td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
5311
5312 // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,
5313 // unless wrapped in a div with non-breaking characters in front of it.
5314 _default: support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ]
5315 },
5316 safeFragment = createSafeFragment( document ),
5317 fragmentDiv = safeFragment.appendChild( document.createElement("div") );
5318
5319 wrapMap.optgroup = wrapMap.option;
5320 wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
5321 wrapMap.th = wrapMap.td;
5322
5323 function getAll( context, tag ) {
5324 var elems, elem,
5325 i = 0,
5326 found = typeof context.getElementsByTagName !== strundefined ? context.getElementsByTagName( tag || "*" ) :
5327 typeof context.querySelectorAll !== strundefined ? context.querySelectorAll( tag || "*" ) :
5328 undefined;
5329
5330 if ( !found ) {
5331 for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) {
5332 if ( !tag || jQuery.nodeName( elem, tag ) ) {
5333 found.push( elem );
5334 } else {
5335 jQuery.merge( found, getAll( elem, tag ) );
5336 }
5337 }
5338 }
5339
5340 return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
5341 jQuery.merge( [ context ], found ) :
5342 found;
5343 }
5344
5345 // Used in buildFragment, fixes the defaultChecked property
5346 function fixDefaultChecked( elem ) {
5347 if ( rcheckableType.test( elem.type ) ) {
5348 elem.defaultChecked = elem.checked;
5349 }
5350 }
5351
5352 // Support: IE<8
5353 // Manipulating tables requires a tbody
5354 function manipulationTarget( elem, content ) {
5355 return jQuery.nodeName( elem, "table" ) &&
5356 jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ?
5357
5358 elem.getElementsByTagName("tbody")[0] ||
5359 elem.appendChild( elem.ownerDocument.createElement("tbody") ) :
5360 elem;
5361 }
5362
5363 // Replace/restore the type attribute of script elements for safe DOM manipulation
5364 function disableScript( elem ) {
5365 elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type;
5366 return elem;
5367 }
5368 function restoreScript( elem ) {
5369 var match = rscriptTypeMasked.exec( elem.type );
5370 if ( match ) {
5371 elem.type = match[1];
5372 } else {
5373 elem.removeAttribute("type");
5374 }
5375 return elem;
5376 }
5377
5378 // Mark scripts as having already been evaluated
5379 function setGlobalEval( elems, refElements ) {
5380 var elem,
5381 i = 0;
5382 for ( ; (elem = elems[i]) != null; i++ ) {
5383 jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) );
5384 }
5385 }
5386
5387 function cloneCopyEvent( src, dest ) {
5388
5389 if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
5390 return;
5391 }
5392
5393 var type, i, l,
5394 oldData = jQuery._data( src ),
5395 curData = jQuery._data( dest, oldData ),
5396 events = oldData.events;
5397
5398 if ( events ) {
5399 delete curData.handle;
5400 curData.events = {};
5401
5402 for ( type in events ) {
5403 for ( i = 0, l = events[ type ].length; i < l; i++ ) {
5404 jQuery.event.add( dest, type, events[ type ][ i ] );
5405 }
5406 }
5407 }
5408
5409 // make the cloned public data object a copy from the original
5410 if ( curData.data ) {
5411 curData.data = jQuery.extend( {}, curData.data );
5412 }
5413 }
5414
5415 function fixCloneNodeIssues( src, dest ) {
5416 var nodeName, e, data;
5417
5418 // We do not need to do anything for non-Elements
5419 if ( dest.nodeType !== 1 ) {
5420 return;
5421 }
5422
5423 nodeName = dest.nodeName.toLowerCase();
5424
5425 // IE6-8 copies events bound via attachEvent when using cloneNode.
5426 if ( !support.noCloneEvent && dest[ jQuery.expando ] ) {
5427 data = jQuery._data( dest );
5428
5429 for ( e in data.events ) {
5430 jQuery.removeEvent( dest, e, data.handle );
5431 }
5432
5433 // Event data gets referenced instead of copied if the expando gets copied too
5434 dest.removeAttribute( jQuery.expando );
5435 }
5436
5437 // IE blanks contents when cloning scripts, and tries to evaluate newly-set text
5438 if ( nodeName === "script" && dest.text !== src.text ) {
5439 disableScript( dest ).text = src.text;
5440 restoreScript( dest );
5441
5442 // IE6-10 improperly clones children of object elements using classid.
5443 // IE10 throws NoModificationAllowedError if parent is null, #12132.
5444 } else if ( nodeName === "object" ) {
5445 if ( dest.parentNode ) {
5446 dest.outerHTML = src.outerHTML;
5447 }
5448
5449 // This path appears unavoidable for IE9. When cloning an object
5450 // element in IE9, the outerHTML strategy above is not sufficient.
5451 // If the src has innerHTML and the destination does not,
5452 // copy the src.innerHTML into the dest.innerHTML. #10324
5453 if ( support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) {
5454 dest.innerHTML = src.innerHTML;
5455 }
5456
5457 } else if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
5458 // IE6-8 fails to persist the checked state of a cloned checkbox
5459 // or radio button. Worse, IE6-7 fail to give the cloned element
5460 // a checked appearance if the defaultChecked value isn't also set
5461
5462 dest.defaultChecked = dest.checked = src.checked;
5463
5464 // IE6-7 get confused and end up setting the value of a cloned
5465 // checkbox/radio button to an empty string instead of "on"
5466 if ( dest.value !== src.value ) {
5467 dest.value = src.value;
5468 }
5469
5470 // IE6-8 fails to return the selected option to the default selected
5471 // state when cloning options
5472 } else if ( nodeName === "option" ) {
5473 dest.defaultSelected = dest.selected = src.defaultSelected;
5474
5475 // IE6-8 fails to set the defaultValue to the correct value when
5476 // cloning other types of input fields
5477 } else if ( nodeName === "input" || nodeName === "textarea" ) {
5478 dest.defaultValue = src.defaultValue;
5479 }
5480 }
5481
5482 jQuery.extend({
5483 clone: function( elem, dataAndEvents, deepDataAndEvents ) {
5484 var destElements, node, clone, i, srcElements,
5485 inPage = jQuery.contains( elem.ownerDocument, elem );
5486
5487 if ( support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {
5488 clone = elem.cloneNode( true );
5489
5490 // IE<=8 does not properly clone detached, unknown element nodes
5491 } else {
5492 fragmentDiv.innerHTML = elem.outerHTML;
5493 fragmentDiv.removeChild( clone = fragmentDiv.firstChild );
5494 }
5495
5496 if ( (!support.noCloneEvent || !support.noCloneChecked) &&
5497 (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
5498
5499 // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
5500 destElements = getAll( clone );
5501 srcElements = getAll( elem );
5502
5503 // Fix all IE cloning issues
5504 for ( i = 0; (node = srcElements[i]) != null; ++i ) {
5505 // Ensure that the destination node is not null; Fixes #9587
5506 if ( destElements[i] ) {
5507 fixCloneNodeIssues( node, destElements[i] );
5508 }
5509 }
5510 }
5511
5512 // Copy the events from the original to the clone
5513 if ( dataAndEvents ) {
5514 if ( deepDataAndEvents ) {
5515 srcElements = srcElements || getAll( elem );
5516 destElements = destElements || getAll( clone );
5517
5518 for ( i = 0; (node = srcElements[i]) != null; i++ ) {
5519 cloneCopyEvent( node, destElements[i] );
5520 }
5521 } else {
5522 cloneCopyEvent( elem, clone );
5523 }
5524 }
5525
5526 // Preserve script evaluation history
5527 destElements = getAll( clone, "script" );
5528 if ( destElements.length > 0 ) {
5529 setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
5530 }
5531
5532 destElements = srcElements = node = null;
5533
5534 // Return the cloned set
5535 return clone;
5536 },
5537
5538 buildFragment: function( elems, context, scripts, selection ) {
5539 var j, elem, contains,
5540 tmp, tag, tbody, wrap,
5541 l = elems.length,
5542
5543 // Ensure a safe fragment
5544 safe = createSafeFragment( context ),
5545
5546 nodes = [],
5547 i = 0;
5548
5549 for ( ; i < l; i++ ) {
5550 elem = elems[ i ];
5551
5552 if ( elem || elem === 0 ) {
5553
5554 // Add nodes directly
5555 if ( jQuery.type( elem ) === "object" ) {
5556 jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
5557
5558 // Convert non-html into a text node
5559 } else if ( !rhtml.test( elem ) ) {
5560 nodes.push( context.createTextNode( elem ) );
5561
5562 // Convert html into DOM nodes
5563 } else {
5564 tmp = tmp || safe.appendChild( context.createElement("div") );
5565
5566 // Deserialize a standard representation
5567 tag = (rtagName.exec( elem ) || [ "", "" ])[ 1 ].toLowerCase();
5568 wrap = wrapMap[ tag ] || wrapMap._default;
5569
5570 tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2];
5571
5572 // Descend through wrappers to the right content
5573 j = wrap[0];
5574 while ( j-- ) {
5575 tmp = tmp.lastChild;
5576 }
5577
5578 // Manually add leading whitespace removed by IE
5579 if ( !support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
5580 nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) );
5581 }
5582
5583 // Remove IE's autoinserted <tbody> from table fragments
5584 if ( !support.tbody ) {
5585
5586 // String was a <table>, *may* have spurious <tbody>
5587 elem = tag === "table" && !rtbody.test( elem ) ?
5588 tmp.firstChild :
5589
5590 // String was a bare <thead> or <tfoot>
5591 wrap[1] === "<table>" && !rtbody.test( elem ) ?
5592 tmp :
5593 0;
5594
5595 j = elem && elem.childNodes.length;
5596 while ( j-- ) {
5597 if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) {
5598 elem.removeChild( tbody );
5599 }
5600 }
5601 }
5602
5603 jQuery.merge( nodes, tmp.childNodes );
5604
5605 // Fix #12392 for WebKit and IE > 9
5606 tmp.textContent = "";
5607
5608 // Fix #12392 for oldIE
5609 while ( tmp.firstChild ) {
5610 tmp.removeChild( tmp.firstChild );
5611 }
5612
5613 // Remember the top-level container for proper cleanup
5614 tmp = safe.lastChild;
5615 }
5616 }
5617 }
5618
5619 // Fix #11356: Clear elements from fragment
5620 if ( tmp ) {
5621 safe.removeChild( tmp );
5622 }
5623
5624 // Reset defaultChecked for any radios and checkboxes
5625 // about to be appended to the DOM in IE 6/7 (#8060)
5626 if ( !support.appendChecked ) {
5627 jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked );
5628 }
5629
5630 i = 0;
5631 while ( (elem = nodes[ i++ ]) ) {
5632
5633 // #4087 - If origin and destination elements are the same, and this is
5634 // that element, do not do anything
5635 if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {
5636 continue;
5637 }
5638
5639 contains = jQuery.contains( elem.ownerDocument, elem );
5640
5641 // Append to fragment
5642 tmp = getAll( safe.appendChild( elem ), "script" );
5643
5644 // Preserve script evaluation history
5645 if ( contains ) {
5646 setGlobalEval( tmp );
5647 }
5648
5649 // Capture executables
5650 if ( scripts ) {
5651 j = 0;
5652 while ( (elem = tmp[ j++ ]) ) {
5653 if ( rscriptType.test( elem.type || "" ) ) {
5654 scripts.push( elem );
5655 }
5656 }
5657 }
5658 }
5659
5660 tmp = null;
5661
5662 return safe;
5663 },
5664
5665 cleanData: function( elems, /* internal */ acceptData ) {
5666 var elem, type, id, data,
5667 i = 0,
5668 internalKey = jQuery.expando,
5669 cache = jQuery.cache,
5670 deleteExpando = support.deleteExpando,
5671 special = jQuery.event.special;
5672
5673 for ( ; (elem = elems[i]) != null; i++ ) {
5674 if ( acceptData || jQuery.acceptData( elem ) ) {
5675
5676 id = elem[ internalKey ];
5677 data = id && cache[ id ];
5678
5679 if ( data ) {
5680 if ( data.events ) {
5681 for ( type in data.events ) {
5682 if ( special[ type ] ) {
5683 jQuery.event.remove( elem, type );
5684
5685 // This is a shortcut to avoid jQuery.event.remove's overhead
5686 } else {
5687 jQuery.removeEvent( elem, type, data.handle );
5688 }
5689 }
5690 }
5691
5692 // Remove cache only if it was not already removed by jQuery.event.remove
5693 if ( cache[ id ] ) {
5694
5695 delete cache[ id ];
5696
5697 // IE does not allow us to delete expando properties from nodes,
5698 // nor does it have a removeAttribute function on Document nodes;
5699 // we must handle all of these cases
5700 if ( deleteExpando ) {
5701 delete elem[ internalKey ];
5702
5703 } else if ( typeof elem.removeAttribute !== strundefined ) {
5704 elem.removeAttribute( internalKey );
5705
5706 } else {
5707 elem[ internalKey ] = null;
5708 }
5709
5710 deletedIds.push( id );
5711 }
5712 }
5713 }
5714 }
5715 }
5716 });
5717
5718 jQuery.fn.extend({
5719 text: function( value ) {
5720 return access( this, function( value ) {
5721 return value === undefined ?
5722 jQuery.text( this ) :
5723 this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );
5724 }, null, value, arguments.length );
5725 },
5726
5727 append: function() {
5728 return this.domManip( arguments, function( elem ) {
5729 if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
5730 var target = manipulationTarget( this, elem );
5731 target.appendChild( elem );
5732 }
5733 });
5734 },
5735
5736 prepend: function() {
5737 return this.domManip( arguments, function( elem ) {
5738 if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
5739 var target = manipulationTarget( this, elem );
5740 target.insertBefore( elem, target.firstChild );
5741 }
5742 });
5743 },
5744
5745 before: function() {
5746 return this.domManip( arguments, function( elem ) {
5747 if ( this.parentNode ) {
5748 this.parentNode.insertBefore( elem, this );
5749 }
5750 });
5751 },
5752
5753 after: function() {
5754 return this.domManip( arguments, function( elem ) {
5755 if ( this.parentNode ) {
5756 this.parentNode.insertBefore( elem, this.nextSibling );
5757 }
5758 });
5759 },
5760
5761 remove: function( selector, keepData /* Internal Use Only */ ) {
5762 var elem,
5763 elems = selector ? jQuery.filter( selector, this ) : this,
5764 i = 0;
5765
5766 for ( ; (elem = elems[i]) != null; i++ ) {
5767
5768 if ( !keepData && elem.nodeType === 1 ) {
5769 jQuery.cleanData( getAll( elem ) );
5770 }
5771
5772 if ( elem.parentNode ) {
5773 if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {
5774 setGlobalEval( getAll( elem, "script" ) );
5775 }
5776 elem.parentNode.removeChild( elem );
5777 }
5778 }
5779
5780 return this;
5781 },
5782
5783 empty: function() {
5784 var elem,
5785 i = 0;
5786
5787 for ( ; (elem = this[i]) != null; i++ ) {
5788 // Remove element nodes and prevent memory leaks
5789 if ( elem.nodeType === 1 ) {
5790 jQuery.cleanData( getAll( elem, false ) );
5791 }
5792
5793 // Remove any remaining nodes
5794 while ( elem.firstChild ) {
5795 elem.removeChild( elem.firstChild );
5796 }
5797
5798 // If this is a select, ensure that it displays empty (#12336)
5799 // Support: IE<9
5800 if ( elem.options && jQuery.nodeName( elem, "select" ) ) {
5801 elem.options.length = 0;
5802 }
5803 }
5804
5805 return this;
5806 },
5807
5808 clone: function( dataAndEvents, deepDataAndEvents ) {
5809 dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
5810 deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
5811
5812 return this.map(function() {
5813 return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
5814 });
5815 },
5816
5817 html: function( value ) {
5818 return access( this, function( value ) {
5819 var elem = this[ 0 ] || {},
5820 i = 0,
5821 l = this.length;
5822
5823 if ( value === undefined ) {
5824 return elem.nodeType === 1 ?
5825 elem.innerHTML.replace( rinlinejQuery, "" ) :
5826 undefined;
5827 }
5828
5829 // See if we can take a shortcut and just use innerHTML
5830 if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
5831 ( support.htmlSerialize || !rnoshimcache.test( value ) ) &&
5832 ( support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
5833 !wrapMap[ (rtagName.exec( value ) || [ "", "" ])[ 1 ].toLowerCase() ] ) {
5834
5835 value = value.replace( rxhtmlTag, "<$1></$2>" );
5836
5837 try {
5838 for (; i < l; i++ ) {
5839 // Remove element nodes and prevent memory leaks
5840 elem = this[i] || {};
5841 if ( elem.nodeType === 1 ) {
5842 jQuery.cleanData( getAll( elem, false ) );
5843 elem.innerHTML = value;
5844 }
5845 }
5846
5847 elem = 0;
5848
5849 // If using innerHTML throws an exception, use the fallback method
5850 } catch(e) {}
5851 }
5852
5853 if ( elem ) {
5854 this.empty().append( value );
5855 }
5856 }, null, value, arguments.length );
5857 },
5858
5859 replaceWith: function() {
5860 var arg = arguments[ 0 ];
5861
5862 // Make the changes, replacing each context element with the new content
5863 this.domManip( arguments, function( elem ) {
5864 arg = this.parentNode;
5865
5866 jQuery.cleanData( getAll( this ) );
5867
5868 if ( arg ) {
5869 arg.replaceChild( elem, this );
5870 }
5871 });
5872
5873 // Force removal if there was no new content (e.g., from empty arguments)
5874 return arg && (arg.length || arg.nodeType) ? this : this.remove();
5875 },
5876
5877 detach: function( selector ) {
5878 return this.remove( selector, true );
5879 },
5880
5881 domManip: function( args, callback ) {
5882
5883 // Flatten any nested arrays
5884 args = concat.apply( [], args );
5885
5886 var first, node, hasScripts,
5887 scripts, doc, fragment,
5888 i = 0,
5889 l = this.length,
5890 set = this,
5891 iNoClone = l - 1,
5892 value = args[0],
5893 isFunction = jQuery.isFunction( value );
5894
5895 // We can't cloneNode fragments that contain checked, in WebKit
5896 if ( isFunction ||
5897 ( l > 1 && typeof value === "string" &&
5898 !support.checkClone && rchecked.test( value ) ) ) {
5899 return this.each(function( index ) {
5900 var self = set.eq( index );
5901 if ( isFunction ) {
5902 args[0] = value.call( this, index, self.html() );
5903 }
5904 self.domManip( args, callback );
5905 });
5906 }
5907
5908 if ( l ) {
5909 fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this );
5910 first = fragment.firstChild;
5911
5912 if ( fragment.childNodes.length === 1 ) {
5913 fragment = first;
5914 }
5915
5916 if ( first ) {
5917 scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
5918 hasScripts = scripts.length;
5919
5920 // Use the original fragment for the last item instead of the first because it can end up
5921 // being emptied incorrectly in certain situations (#8070).
5922 for ( ; i < l; i++ ) {
5923 node = fragment;
5924
5925 if ( i !== iNoClone ) {
5926 node = jQuery.clone( node, true, true );
5927
5928 // Keep references to cloned scripts for later restoration
5929 if ( hasScripts ) {
5930 jQuery.merge( scripts, getAll( node, "script" ) );
5931 }
5932 }
5933
5934 callback.call( this[i], node, i );
5935 }
5936
5937 if ( hasScripts ) {
5938 doc = scripts[ scripts.length - 1 ].ownerDocument;
5939
5940 // Reenable scripts
5941 jQuery.map( scripts, restoreScript );
5942
5943 // Evaluate executable scripts on first document insertion
5944 for ( i = 0; i < hasScripts; i++ ) {
5945 node = scripts[ i ];
5946 if ( rscriptType.test( node.type || "" ) &&
5947 !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) {
5948
5949 if ( node.src ) {
5950 // Optional AJAX dependency, but won't run scripts if not present
5951 if ( jQuery._evalUrl ) {
5952 jQuery._evalUrl( node.src );
5953 }
5954 } else {
5955 jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) );
5956 }
5957 }
5958 }
5959 }
5960
5961 // Fix #11809: Avoid leaking memory
5962 fragment = first = null;
5963 }
5964 }
5965
5966 return this;
5967 }
5968 });
5969
5970 jQuery.each({
5971 appendTo: "append",
5972 prependTo: "prepend",
5973 insertBefore: "before",
5974 insertAfter: "after",
5975 replaceAll: "replaceWith"
5976 }, function( name, original ) {
5977 jQuery.fn[ name ] = function( selector ) {
5978 var elems,
5979 i = 0,
5980 ret = [],
5981 insert = jQuery( selector ),
5982 last = insert.length - 1;
5983
5984 for ( ; i <= last; i++ ) {
5985 elems = i === last ? this : this.clone(true);
5986 jQuery( insert[i] )[ original ]( elems );
5987
5988 // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()
5989 push.apply( ret, elems.get() );
5990 }
5991
5992 return this.pushStack( ret );
5993 };
5994 });
5995
5996
5997 var iframe,
5998 elemdisplay = {};
5999
6000 /**
6001 * Retrieve the actual display of a element
6002 * @param {String} name nodeName of the element
6003 * @param {Object} doc Document object
6004 */
6005 // Called only from within defaultDisplay
6006 function actualDisplay( name, doc ) {
6007 var style,
6008 elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
6009
6010 // getDefaultComputedStyle might be reliably used only on attached element
6011 display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ?
6012
6013 // Use of this method is a temporary fix (more like optmization) until something better comes along,
6014 // since it was removed from specification and supported only in FF
6015 style.display : jQuery.css( elem[ 0 ], "display" );
6016
6017 // We don't have any data stored on the element,
6018 // so use "detach" method as fast way to get rid of the element
6019 elem.detach();
6020
6021 return display;
6022 }
6023
6024 /**
6025 * Try to determine the default display value of an element
6026 * @param {String} nodeName
6027 */
6028 function defaultDisplay( nodeName ) {
6029 var doc = document,
6030 display = elemdisplay[ nodeName ];
6031
6032 if ( !display ) {
6033 display = actualDisplay( nodeName, doc );
6034
6035 // If the simple way fails, read from inside an iframe
6036 if ( display === "none" || !display ) {
6037
6038 // Use the already-created iframe if possible
6039 iframe = (iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" )).appendTo( doc.documentElement );
6040
6041 // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
6042 doc = ( iframe[ 0 ].contentWindow || iframe[ 0 ].contentDocument ).document;
6043
6044 // Support: IE
6045 doc.write();
6046 doc.close();
6047
6048 display = actualDisplay( nodeName, doc );
6049 iframe.detach();
6050 }
6051
6052 // Store the correct default display
6053 elemdisplay[ nodeName ] = display;
6054 }
6055
6056 return display;
6057 }
6058
6059
6060 (function() {
6061 var shrinkWrapBlocksVal;
6062
6063 support.shrinkWrapBlocks = function() {
6064 if ( shrinkWrapBlocksVal != null ) {
6065 return shrinkWrapBlocksVal;
6066 }
6067
6068 // Will be changed later if needed.
6069 shrinkWrapBlocksVal = false;
6070
6071 // Minified: var b,c,d
6072 var div, body, container;
6073
6074 body = document.getElementsByTagName( "body" )[ 0 ];
6075 if ( !body || !body.style ) {
6076 // Test fired too early or in an unsupported environment, exit.
6077 return;
6078 }
6079
6080 // Setup
6081 div = document.createElement( "div" );
6082 container = document.createElement( "div" );
6083 container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px";
6084 body.appendChild( container ).appendChild( div );
6085
6086 // Support: IE6
6087 // Check if elements with layout shrink-wrap their children
6088 if ( typeof div.style.zoom !== strundefined ) {
6089 // Reset CSS: box-sizing; display; margin; border
6090 div.style.cssText =
6091 // Support: Firefox<29, Android 2.3
6092 // Vendor-prefix box-sizing
6093 "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" +
6094 "box-sizing:content-box;display:block;margin:0;border:0;" +
6095 "padding:1px;width:1px;zoom:1";
6096 div.appendChild( document.createElement( "div" ) ).style.width = "5px";
6097 shrinkWrapBlocksVal = div.offsetWidth !== 3;
6098 }
6099
6100 body.removeChild( container );
6101
6102 return shrinkWrapBlocksVal;
6103 };
6104
6105 })();
6106 var rmargin = (/^margin/);
6107
6108 var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
6109
6110
6111
6112 var getStyles, curCSS,
6113 rposition = /^(top|right|bottom|left)$/;
6114
6115 if ( window.getComputedStyle ) {
6116 getStyles = function( elem ) {
6117 return elem.ownerDocument.defaultView.getComputedStyle( elem, null );
6118 };
6119
6120 curCSS = function( elem, name, computed ) {
6121 var width, minWidth, maxWidth, ret,
6122 style = elem.style;
6123
6124 computed = computed || getStyles( elem );
6125
6126 // getPropertyValue is only needed for .css('filter') in IE9, see #12537
6127 ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined;
6128
6129 if ( computed ) {
6130
6131 if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
6132 ret = jQuery.style( elem, name );
6133 }
6134
6135 // A tribute to the "awesome hack by Dean Edwards"
6136 // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right
6137 // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
6138 // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
6139 if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
6140
6141 // Remember the original values
6142 width = style.width;
6143 minWidth = style.minWidth;
6144 maxWidth = style.maxWidth;
6145
6146 // Put in the new values to get a computed value out
6147 style.minWidth = style.maxWidth = style.width = ret;
6148 ret = computed.width;
6149
6150 // Revert the changed values
6151 style.width = width;
6152 style.minWidth = minWidth;
6153 style.maxWidth = maxWidth;
6154 }
6155 }
6156
6157 // Support: IE
6158 // IE returns zIndex value as an integer.
6159 return ret === undefined ?
6160 ret :
6161 ret + "";
6162 };
6163 } else if ( document.documentElement.currentStyle ) {
6164 getStyles = function( elem ) {
6165 return elem.currentStyle;
6166 };
6167
6168 curCSS = function( elem, name, computed ) {
6169 var left, rs, rsLeft, ret,
6170 style = elem.style;
6171
6172 computed = computed || getStyles( elem );
6173 ret = computed ? computed[ name ] : undefined;
6174
6175 // Avoid setting ret to empty string here
6176 // so we don't default to auto
6177 if ( ret == null && style && style[ name ] ) {
6178 ret = style[ name ];
6179 }
6180
6181 // From the awesome hack by Dean Edwards
6182 // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
6183
6184 // If we're not dealing with a regular pixel number
6185 // but a number that has a weird ending, we need to convert it to pixels
6186 // but not position css attributes, as those are proportional to the parent element instead
6187 // and we can't measure the parent instead because it might trigger a "stacking dolls" problem
6188 if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {
6189
6190 // Remember the original values
6191 left = style.left;
6192 rs = elem.runtimeStyle;
6193 rsLeft = rs && rs.left;
6194
6195 // Put in the new values to get a computed value out
6196 if ( rsLeft ) {
6197 rs.left = elem.currentStyle.left;
6198 }
6199 style.left = name === "fontSize" ? "1em" : ret;
6200 ret = style.pixelLeft + "px";
6201
6202 // Revert the changed values
6203 style.left = left;
6204 if ( rsLeft ) {
6205 rs.left = rsLeft;
6206 }
6207 }
6208
6209 // Support: IE
6210 // IE returns zIndex value as an integer.
6211 return ret === undefined ?
6212 ret :
6213 ret + "" || "auto";
6214 };
6215 }
6216
6217
6218
6219
6220 function addGetHookIf( conditionFn, hookFn ) {
6221 // Define the hook, we'll check on the first run if it's really needed.
6222 return {
6223 get: function() {
6224 var condition = conditionFn();
6225
6226 if ( condition == null ) {
6227 // The test was not ready at this point; screw the hook this time
6228 // but check again when needed next time.
6229 return;
6230 }
6231
6232 if ( condition ) {
6233 // Hook not needed (or it's not possible to use it due to missing dependency),
6234 // remove it.
6235 // Since there are no other hooks for marginRight, remove the whole object.
6236 delete this.get;
6237 return;
6238 }
6239
6240 // Hook needed; redefine it so that the support test is not executed again.
6241
6242 return (this.get = hookFn).apply( this, arguments );
6243 }
6244 };
6245 }
6246
6247
6248 (function() {
6249 // Minified: var b,c,d,e,f,g, h,i
6250 var div, style, a, pixelPositionVal, boxSizingReliableVal,
6251 reliableHiddenOffsetsVal, reliableMarginRightVal;
6252
6253 // Setup
6254 div = document.createElement( "div" );
6255 div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
6256 a = div.getElementsByTagName( "a" )[ 0 ];
6257 style = a && a.style;
6258
6259 // Finish early in limited (non-browser) environments
6260 if ( !style ) {
6261 return;
6262 }
6263
6264 style.cssText = "float:left;opacity:.5";
6265
6266 // Support: IE<9
6267 // Make sure that element opacity exists (as opposed to filter)
6268 support.opacity = style.opacity === "0.5";
6269
6270 // Verify style float existence
6271 // (IE uses styleFloat instead of cssFloat)
6272 support.cssFloat = !!style.cssFloat;
6273
6274 div.style.backgroundClip = "content-box";
6275 div.cloneNode( true ).style.backgroundClip = "";
6276 support.clearCloneStyle = div.style.backgroundClip === "content-box";
6277
6278 // Support: Firefox<29, Android 2.3
6279 // Vendor-prefix box-sizing
6280 support.boxSizing = style.boxSizing === "" || style.MozBoxSizing === "" ||
6281 style.WebkitBoxSizing === "";
6282
6283 jQuery.extend(support, {
6284 reliableHiddenOffsets: function() {
6285 if ( reliableHiddenOffsetsVal == null ) {
6286 computeStyleTests();
6287 }
6288 return reliableHiddenOffsetsVal;
6289 },
6290
6291 boxSizingReliable: function() {
6292 if ( boxSizingReliableVal == null ) {
6293 computeStyleTests();
6294 }
6295 return boxSizingReliableVal;
6296 },
6297
6298 pixelPosition: function() {
6299 if ( pixelPositionVal == null ) {
6300 computeStyleTests();
6301 }
6302 return pixelPositionVal;
6303 },
6304
6305 // Support: Android 2.3
6306 reliableMarginRight: function() {
6307 if ( reliableMarginRightVal == null ) {
6308 computeStyleTests();
6309 }
6310 return reliableMarginRightVal;
6311 }
6312 });
6313
6314 function computeStyleTests() {
6315 // Minified: var b,c,d,j
6316 var div, body, container, contents;
6317
6318 body = document.getElementsByTagName( "body" )[ 0 ];
6319 if ( !body || !body.style ) {
6320 // Test fired too early or in an unsupported environment, exit.
6321 return;
6322 }
6323
6324 // Setup
6325 div = document.createElement( "div" );
6326 container = document.createElement( "div" );
6327 container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px";
6328 body.appendChild( container ).appendChild( div );
6329
6330 div.style.cssText =
6331 // Support: Firefox<29, Android 2.3
6332 // Vendor-prefix box-sizing
6333 "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;" +
6334 "box-sizing:border-box;display:block;margin-top:1%;top:1%;" +
6335 "border:1px;padding:1px;width:4px;position:absolute";
6336
6337 // Support: IE<9
6338 // Assume reasonable values in the absence of getComputedStyle
6339 pixelPositionVal = boxSizingReliableVal = false;
6340 reliableMarginRightVal = true;
6341
6342 // Check for getComputedStyle so that this code is not run in IE<9.
6343 if ( window.getComputedStyle ) {
6344 pixelPositionVal = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
6345 boxSizingReliableVal =
6346 ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";
6347
6348 // Support: Android 2.3
6349 // Div with explicit width and no margin-right incorrectly
6350 // gets computed margin-right based on width of container (#3333)
6351 // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
6352 contents = div.appendChild( document.createElement( "div" ) );
6353
6354 // Reset CSS: box-sizing; display; margin; border; padding
6355 contents.style.cssText = div.style.cssText =
6356 // Support: Firefox<29, Android 2.3
6357 // Vendor-prefix box-sizing
6358 "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" +
6359 "box-sizing:content-box;display:block;margin:0;border:0;padding:0";
6360 contents.style.marginRight = contents.style.width = "0";
6361 div.style.width = "1px";
6362
6363 reliableMarginRightVal =
6364 !parseFloat( ( window.getComputedStyle( contents, null ) || {} ).marginRight );
6365 }
6366
6367 // Support: IE8
6368 // Check if table cells still have offsetWidth/Height when they are set
6369 // to display:none and there are still other visible table cells in a
6370 // table row; if so, offsetWidth/Height are not reliable for use when
6371 // determining if an element has been hidden directly using
6372 // display:none (it is still safe to use offsets if a parent element is
6373 // hidden; don safety goggles and see bug #4512 for more information).
6374 div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
6375 contents = div.getElementsByTagName( "td" );
6376 contents[ 0 ].style.cssText = "margin:0;border:0;padding:0;display:none";
6377 reliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0;
6378 if ( reliableHiddenOffsetsVal ) {
6379 contents[ 0 ].style.display = "";
6380 contents[ 1 ].style.display = "none";
6381 reliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0;
6382 }
6383
6384 body.removeChild( container );
6385 }
6386
6387 })();
6388
6389
6390 // A method for quickly swapping in/out CSS properties to get correct calculations.
6391 jQuery.swap = function( elem, options, callback, args ) {
6392 var ret, name,
6393 old = {};
6394
6395 // Remember the old values, and insert the new ones
6396 for ( name in options ) {
6397 old[ name ] = elem.style[ name ];
6398 elem.style[ name ] = options[ name ];
6399 }
6400
6401 ret = callback.apply( elem, args || [] );
6402
6403 // Revert the old values
6404 for ( name in options ) {
6405 elem.style[ name ] = old[ name ];
6406 }
6407
6408 return ret;
6409 };
6410
6411
6412 var
6413 ralpha = /alpha\([^)]*\)/i,
6414 ropacity = /opacity\s*=\s*([^)]*)/,
6415
6416 // swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
6417 // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
6418 rdisplayswap = /^(none|table(?!-c[ea]).+)/,
6419 rnumsplit = new RegExp( "^(" + pnum + ")(.*)$", "i" ),
6420 rrelNum = new RegExp( "^([+-])=(" + pnum + ")", "i" ),
6421
6422 cssShow = { position: "absolute", visibility: "hidden", display: "block" },
6423 cssNormalTransform = {
6424 letterSpacing: "0",
6425 fontWeight: "400"
6426 },
6427
6428 cssPrefixes = [ "Webkit", "O", "Moz", "ms" ];
6429
6430
6431 // return a css property mapped to a potentially vendor prefixed property
6432 function vendorPropName( style, name ) {
6433
6434 // shortcut for names that are not vendor prefixed
6435 if ( name in style ) {
6436 return name;
6437 }
6438
6439 // check for vendor prefixed names
6440 var capName = name.charAt(0).toUpperCase() + name.slice(1),
6441 origName = name,
6442 i = cssPrefixes.length;
6443
6444 while ( i-- ) {
6445 name = cssPrefixes[ i ] + capName;
6446 if ( name in style ) {
6447 return name;
6448 }
6449 }
6450
6451 return origName;
6452 }
6453
6454 function showHide( elements, show ) {
6455 var display, elem, hidden,
6456 values = [],
6457 index = 0,
6458 length = elements.length;
6459
6460 for ( ; index < length; index++ ) {
6461 elem = elements[ index ];
6462 if ( !elem.style ) {
6463 continue;
6464 }
6465
6466 values[ index ] = jQuery._data( elem, "olddisplay" );
6467 display = elem.style.display;
6468 if ( show ) {
6469 // Reset the inline display of this element to learn if it is
6470 // being hidden by cascaded rules or not
6471 if ( !values[ index ] && display === "none" ) {
6472 elem.style.display = "";
6473 }
6474
6475 // Set elements which have been overridden with display: none
6476 // in a stylesheet to whatever the default browser style is
6477 // for such an element
6478 if ( elem.style.display === "" && isHidden( elem ) ) {
6479 values[ index ] = jQuery._data( elem, "olddisplay", defaultDisplay(elem.nodeName) );
6480 }
6481 } else {
6482 hidden = isHidden( elem );
6483
6484 if ( display && display !== "none" || !hidden ) {
6485 jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) );
6486 }
6487 }
6488 }
6489
6490 // Set the display of most of the elements in a second loop
6491 // to avoid the constant reflow
6492 for ( index = 0; index < length; index++ ) {
6493 elem = elements[ index ];
6494 if ( !elem.style ) {
6495 continue;
6496 }
6497 if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
6498 elem.style.display = show ? values[ index ] || "" : "none";
6499 }
6500 }
6501
6502 return elements;
6503 }
6504
6505 function setPositiveNumber( elem, value, subtract ) {
6506 var matches = rnumsplit.exec( value );
6507 return matches ?
6508 // Guard against undefined "subtract", e.g., when used as in cssHooks
6509 Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
6510 value;
6511 }
6512
6513 function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
6514 var i = extra === ( isBorderBox ? "border" : "content" ) ?
6515 // If we already have the right measurement, avoid augmentation
6516 4 :
6517 // Otherwise initialize for horizontal or vertical properties
6518 name === "width" ? 1 : 0,
6519
6520 val = 0;
6521
6522 for ( ; i < 4; i += 2 ) {
6523 // both box models exclude margin, so add it if we want it
6524 if ( extra === "margin" ) {
6525 val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
6526 }
6527
6528 if ( isBorderBox ) {
6529 // border-box includes padding, so remove it if we want content
6530 if ( extra === "content" ) {
6531 val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
6532 }
6533
6534 // at this point, extra isn't border nor margin, so remove border
6535 if ( extra !== "margin" ) {
6536 val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
6537 }
6538 } else {
6539 // at this point, extra isn't content, so add padding
6540 val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
6541
6542 // at this point, extra isn't content nor padding, so add border
6543 if ( extra !== "padding" ) {
6544 val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
6545 }
6546 }
6547 }
6548
6549 return val;
6550 }
6551
6552 function getWidthOrHeight( elem, name, extra ) {
6553
6554 // Start with offset property, which is equivalent to the border-box value
6555 var valueIsBorderBox = true,
6556 val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
6557 styles = getStyles( elem ),
6558 isBorderBox = support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
6559
6560 // some non-html elements return undefined for offsetWidth, so check for null/undefined
6561 // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
6562 // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
6563 if ( val <= 0 || val == null ) {
6564 // Fall back to computed then uncomputed css if necessary
6565 val = curCSS( elem, name, styles );
6566 if ( val < 0 || val == null ) {
6567 val = elem.style[ name ];
6568 }
6569
6570 // Computed unit is not pixels. Stop here and return.
6571 if ( rnumnonpx.test(val) ) {
6572 return val;
6573 }
6574
6575 // we need the check for style in case a browser which returns unreliable values
6576 // for getComputedStyle silently falls back to the reliable elem.style
6577 valueIsBorderBox = isBorderBox && ( support.boxSizingReliable() || val === elem.style[ name ] );
6578
6579 // Normalize "", auto, and prepare for extra
6580 val = parseFloat( val ) || 0;
6581 }
6582
6583 // use the active box-sizing model to add/subtract irrelevant styles
6584 return ( val +
6585 augmentWidthOrHeight(
6586 elem,
6587 name,
6588 extra || ( isBorderBox ? "border" : "content" ),
6589 valueIsBorderBox,
6590 styles
6591 )
6592 ) + "px";
6593 }
6594
6595 jQuery.extend({
6596 // Add in style property hooks for overriding the default
6597 // behavior of getting and setting a style property
6598 cssHooks: {
6599 opacity: {
6600 get: function( elem, computed ) {
6601 if ( computed ) {
6602 // We should always get a number back from opacity
6603 var ret = curCSS( elem, "opacity" );
6604 return ret === "" ? "1" : ret;
6605 }
6606 }
6607 }
6608 },
6609
6610 // Don't automatically add "px" to these possibly-unitless properties
6611 cssNumber: {
6612 "columnCount": true,
6613 "fillOpacity": true,
6614 "flexGrow": true,
6615 "flexShrink": true,
6616 "fontWeight": true,
6617 "lineHeight": true,
6618 "opacity": true,
6619 "order": true,
6620 "orphans": true,
6621 "widows": true,
6622 "zIndex": true,
6623 "zoom": true
6624 },
6625
6626 // Add in properties whose names you wish to fix before
6627 // setting or getting the value
6628 cssProps: {
6629 // normalize float css property
6630 "float": support.cssFloat ? "cssFloat" : "styleFloat"
6631 },
6632
6633 // Get and set the style property on a DOM Node
6634 style: function( elem, name, value, extra ) {
6635 // Don't set styles on text and comment nodes
6636 if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
6637 return;
6638 }
6639
6640 // Make sure that we're working with the right name
6641 var ret, type, hooks,
6642 origName = jQuery.camelCase( name ),
6643 style = elem.style;
6644
6645 name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
6646
6647 // gets hook for the prefixed version
6648 // followed by the unprefixed version
6649 hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
6650
6651 // Check if we're setting a value
6652 if ( value !== undefined ) {
6653 type = typeof value;
6654
6655 // convert relative number strings (+= or -=) to relative numbers. #7345
6656 if ( type === "string" && (ret = rrelNum.exec( value )) ) {
6657 value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
6658 // Fixes bug #9237
6659 type = "number";
6660 }
6661
6662 // Make sure that null and NaN values aren't set. See: #7116
6663 if ( value == null || value !== value ) {
6664 return;
6665 }
6666
6667 // If a number was passed in, add 'px' to the (except for certain CSS properties)
6668 if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
6669 value += "px";
6670 }
6671
6672 // Fixes #8908, it can be done more correctly by specifing setters in cssHooks,
6673 // but it would mean to define eight (for every problematic property) identical functions
6674 if ( !support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) {
6675 style[ name ] = "inherit";
6676 }
6677
6678 // If a hook was provided, use that value, otherwise just set the specified value
6679 if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
6680
6681 // Support: IE
6682 // Swallow errors from 'invalid' CSS values (#5509)
6683 try {
6684 style[ name ] = value;
6685 } catch(e) {}
6686 }
6687
6688 } else {
6689 // If a hook was provided get the non-computed value from there
6690 if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
6691 return ret;
6692 }
6693
6694 // Otherwise just get the value from the style object
6695 return style[ name ];
6696 }
6697 },
6698
6699 css: function( elem, name, extra, styles ) {
6700 var num, val, hooks,
6701 origName = jQuery.camelCase( name );
6702
6703 // Make sure that we're working with the right name
6704 name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
6705
6706 // gets hook for the prefixed version
6707 // followed by the unprefixed version
6708 hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
6709
6710 // If a hook was provided get the computed value from there
6711 if ( hooks && "get" in hooks ) {
6712 val = hooks.get( elem, true, extra );
6713 }
6714
6715 // Otherwise, if a way to get the computed value exists, use that
6716 if ( val === undefined ) {
6717 val = curCSS( elem, name, styles );
6718 }
6719
6720 //convert "normal" to computed value
6721 if ( val === "normal" && name in cssNormalTransform ) {
6722 val = cssNormalTransform[ name ];
6723 }
6724
6725 // Return, converting to number if forced or a qualifier was provided and val looks numeric
6726 if ( extra === "" || extra ) {
6727 num = parseFloat( val );
6728 return extra === true || jQuery.isNumeric( num ) ? num || 0 : val;
6729 }
6730 return val;
6731 }
6732 });
6733
6734 jQuery.each([ "height", "width" ], function( i, name ) {
6735 jQuery.cssHooks[ name ] = {
6736 get: function( elem, computed, extra ) {
6737 if ( computed ) {
6738 // certain elements can have dimension info if we invisibly show them
6739 // however, it must have a current display style that would benefit from this
6740 return rdisplayswap.test( jQuery.css( elem, "display" ) ) && elem.offsetWidth === 0 ?
6741 jQuery.swap( elem, cssShow, function() {
6742 return getWidthOrHeight( elem, name, extra );
6743 }) :
6744 getWidthOrHeight( elem, name, extra );
6745 }
6746 },
6747
6748 set: function( elem, value, extra ) {
6749 var styles = extra && getStyles( elem );
6750 return setPositiveNumber( elem, value, extra ?
6751 augmentWidthOrHeight(
6752 elem,
6753 name,
6754 extra,
6755 support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
6756 styles
6757 ) : 0
6758 );
6759 }
6760 };
6761 });
6762
6763 if ( !support.opacity ) {
6764 jQuery.cssHooks.opacity = {
6765 get: function( elem, computed ) {
6766 // IE uses filters for opacity
6767 return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
6768 ( 0.01 * parseFloat( RegExp.$1 ) ) + "" :
6769 computed ? "1" : "";
6770 },
6771
6772 set: function( elem, value ) {
6773 var style = elem.style,
6774 currentStyle = elem.currentStyle,
6775 opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
6776 filter = currentStyle && currentStyle.filter || style.filter || "";
6777
6778 // IE has trouble with opacity if it does not have layout
6779 // Force it by setting the zoom level
6780 style.zoom = 1;
6781
6782 // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
6783 // if value === "", then remove inline opacity #12685
6784 if ( ( value >= 1 || value === "" ) &&
6785 jQuery.trim( filter.replace( ralpha, "" ) ) === "" &&
6786 style.removeAttribute ) {
6787
6788 // Setting style.filter to null, "" & " " still leave "filter:" in the cssText
6789 // if "filter:" is present at all, clearType is disabled, we want to avoid this
6790 // style.removeAttribute is IE Only, but so apparently is this code path...
6791 style.removeAttribute( "filter" );
6792
6793 // if there is no filter style applied in a css rule or unset inline opacity, we are done
6794 if ( value === "" || currentStyle && !currentStyle.filter ) {
6795 return;
6796 }
6797 }
6798
6799 // otherwise, set new filter values
6800 style.filter = ralpha.test( filter ) ?
6801 filter.replace( ralpha, opacity ) :
6802 filter + " " + opacity;
6803 }
6804 };
6805 }
6806
6807 jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,
6808 function( elem, computed ) {
6809 if ( computed ) {
6810 // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
6811 // Work around by temporarily setting element display to inline-block
6812 return jQuery.swap( elem, { "display": "inline-block" },
6813 curCSS, [ elem, "marginRight" ] );
6814 }
6815 }
6816 );
6817
6818 // These hooks are used by animate to expand properties
6819 jQuery.each({
6820 margin: "",
6821 padding: "",
6822 border: "Width"
6823 }, function( prefix, suffix ) {
6824 jQuery.cssHooks[ prefix + suffix ] = {
6825 expand: function( value ) {
6826 var i = 0,
6827 expanded = {},
6828
6829 // assumes a single number if not a string
6830 parts = typeof value === "string" ? value.split(" ") : [ value ];
6831
6832 for ( ; i < 4; i++ ) {
6833 expanded[ prefix + cssExpand[ i ] + suffix ] =
6834 parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
6835 }
6836
6837 return expanded;
6838 }
6839 };
6840
6841 if ( !rmargin.test( prefix ) ) {
6842 jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
6843 }
6844 });
6845
6846 jQuery.fn.extend({
6847 css: function( name, value ) {
6848 return access( this, function( elem, name, value ) {
6849 var styles, len,
6850 map = {},
6851 i = 0;
6852
6853 if ( jQuery.isArray( name ) ) {
6854 styles = getStyles( elem );
6855 len = name.length;
6856
6857 for ( ; i < len; i++ ) {
6858 map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
6859 }
6860
6861 return map;
6862 }
6863
6864 return value !== undefined ?
6865 jQuery.style( elem, name, value ) :
6866 jQuery.css( elem, name );
6867 }, name, value, arguments.length > 1 );
6868 },
6869 show: function() {
6870 return showHide( this, true );
6871 },
6872 hide: function() {
6873 return showHide( this );
6874 },
6875 toggle: function( state ) {
6876 if ( typeof state === "boolean" ) {
6877 return state ? this.show() : this.hide();
6878 }
6879
6880 return this.each(function() {
6881 if ( isHidden( this ) ) {
6882 jQuery( this ).show();
6883 } else {
6884 jQuery( this ).hide();
6885 }
6886 });
6887 }
6888 });
6889
6890
6891 function Tween( elem, options, prop, end, easing ) {
6892 return new Tween.prototype.init( elem, options, prop, end, easing );
6893 }
6894 jQuery.Tween = Tween;
6895
6896 Tween.prototype = {
6897 constructor: Tween,
6898 init: function( elem, options, prop, end, easing, unit ) {
6899 this.elem = elem;
6900 this.prop = prop;
6901 this.easing = easing || "swing";
6902 this.options = options;
6903 this.start = this.now = this.cur();
6904 this.end = end;
6905 this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
6906 },
6907 cur: function() {
6908 var hooks = Tween.propHooks[ this.prop ];
6909
6910 return hooks && hooks.get ?
6911 hooks.get( this ) :
6912 Tween.propHooks._default.get( this );
6913 },
6914 run: function( percent ) {
6915 var eased,
6916 hooks = Tween.propHooks[ this.prop ];
6917
6918 if ( this.options.duration ) {
6919 this.pos = eased = jQuery.easing[ this.easing ](
6920 percent, this.options.duration * percent, 0, 1, this.options.duration
6921 );
6922 } else {
6923 this.pos = eased = percent;
6924 }
6925 this.now = ( this.end - this.start ) * eased + this.start;
6926
6927 if ( this.options.step ) {
6928 this.options.step.call( this.elem, this.now, this );
6929 }
6930
6931 if ( hooks && hooks.set ) {
6932 hooks.set( this );
6933 } else {
6934 Tween.propHooks._default.set( this );
6935 }
6936 return this;
6937 }
6938 };
6939
6940 Tween.prototype.init.prototype = Tween.prototype;
6941
6942 Tween.propHooks = {
6943 _default: {
6944 get: function( tween ) {
6945 var result;
6946
6947 if ( tween.elem[ tween.prop ] != null &&
6948 (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {
6949 return tween.elem[ tween.prop ];
6950 }
6951
6952 // passing an empty string as a 3rd parameter to .css will automatically
6953 // attempt a parseFloat and fallback to a string if the parse fails
6954 // so, simple values such as "10px" are parsed to Float.
6955 // complex values such as "rotate(1rad)" are returned as is.
6956 result = jQuery.css( tween.elem, tween.prop, "" );
6957 // Empty strings, null, undefined and "auto" are converted to 0.
6958 return !result || result === "auto" ? 0 : result;
6959 },
6960 set: function( tween ) {
6961 // use step hook for back compat - use cssHook if its there - use .style if its
6962 // available and use plain properties where available
6963 if ( jQuery.fx.step[ tween.prop ] ) {
6964 jQuery.fx.step[ tween.prop ]( tween );
6965 } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
6966 jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
6967 } else {
6968 tween.elem[ tween.prop ] = tween.now;
6969 }
6970 }
6971 }
6972 };
6973
6974 // Support: IE <=9
6975 // Panic based approach to setting things on disconnected nodes
6976
6977 Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
6978 set: function( tween ) {
6979 if ( tween.elem.nodeType && tween.elem.parentNode ) {
6980 tween.elem[ tween.prop ] = tween.now;
6981 }
6982 }
6983 };
6984
6985 jQuery.easing = {
6986 linear: function( p ) {
6987 return p;
6988 },
6989 swing: function( p ) {
6990 return 0.5 - Math.cos( p * Math.PI ) / 2;
6991 }
6992 };
6993
6994 jQuery.fx = Tween.prototype.init;
6995
6996 // Back Compat <1.8 extension point
6997 jQuery.fx.step = {};
6998
6999
7000
7001
7002 var
7003 fxNow, timerId,
7004 rfxtypes = /^(?:toggle|show|hide)$/,
7005 rfxnum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ),
7006 rrun = /queueHooks$/,
7007 animationPrefilters = [ defaultPrefilter ],
7008 tweeners = {
7009 "*": [ function( prop, value ) {
7010 var tween = this.createTween( prop, value ),
7011 target = tween.cur(),
7012 parts = rfxnum.exec( value ),
7013 unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
7014
7015 // Starting value computation is required for potential unit mismatches
7016 start = ( jQuery.cssNumber[ prop ] || unit !== "px" && +target ) &&
7017 rfxnum.exec( jQuery.css( tween.elem, prop ) ),
7018 scale = 1,
7019 maxIterations = 20;
7020
7021 if ( start && start[ 3 ] !== unit ) {
7022 // Trust units reported by jQuery.css
7023 unit = unit || start[ 3 ];
7024
7025 // Make sure we update the tween properties later on
7026 parts = parts || [];
7027
7028 // Iteratively approximate from a nonzero starting point
7029 start = +target || 1;
7030
7031 do {
7032 // If previous iteration zeroed out, double until we get *something*
7033 // Use a string for doubling factor so we don't accidentally see scale as unchanged below
7034 scale = scale || ".5";
7035
7036 // Adjust and apply
7037 start = start / scale;
7038 jQuery.style( tween.elem, prop, start + unit );
7039
7040 // Update scale, tolerating zero or NaN from tween.cur()
7041 // And breaking the loop if scale is unchanged or perfect, or if we've just had enough
7042 } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
7043 }
7044
7045 // Update tween properties
7046 if ( parts ) {
7047 start = tween.start = +start || +target || 0;
7048 tween.unit = unit;
7049 // If a +=/-= token was provided, we're doing a relative animation
7050 tween.end = parts[ 1 ] ?
7051 start + ( parts[ 1 ] + 1 ) * parts[ 2 ] :
7052 +parts[ 2 ];
7053 }
7054
7055 return tween;
7056 } ]
7057 };
7058
7059 // Animations created synchronously will run synchronously
7060 function createFxNow() {
7061 setTimeout(function() {
7062 fxNow = undefined;
7063 });
7064 return ( fxNow = jQuery.now() );
7065 }
7066
7067 // Generate parameters to create a standard animation
7068 function genFx( type, includeWidth ) {
7069 var which,
7070 attrs = { height: type },
7071 i = 0;
7072
7073 // if we include width, step value is 1 to do all cssExpand values,
7074 // if we don't include width, step value is 2 to skip over Left and Right
7075 includeWidth = includeWidth ? 1 : 0;
7076 for ( ; i < 4 ; i += 2 - includeWidth ) {
7077 which = cssExpand[ i ];
7078 attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
7079 }
7080
7081 if ( includeWidth ) {
7082 attrs.opacity = attrs.width = type;
7083 }
7084
7085 return attrs;
7086 }
7087
7088 function createTween( value, prop, animation ) {
7089 var tween,
7090 collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),
7091 index = 0,
7092 length = collection.length;
7093 for ( ; index < length; index++ ) {
7094 if ( (tween = collection[ index ].call( animation, prop, value )) ) {
7095
7096 // we're done with this property
7097 return tween;
7098 }
7099 }
7100 }
7101
7102 function defaultPrefilter( elem, props, opts ) {
7103 /* jshint validthis: true */
7104 var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,
7105 anim = this,
7106 orig = {},
7107 style = elem.style,
7108 hidden = elem.nodeType && isHidden( elem ),
7109 dataShow = jQuery._data( elem, "fxshow" );
7110
7111 // handle queue: false promises
7112 if ( !opts.queue ) {
7113 hooks = jQuery._queueHooks( elem, "fx" );
7114 if ( hooks.unqueued == null ) {
7115 hooks.unqueued = 0;
7116 oldfire = hooks.empty.fire;
7117 hooks.empty.fire = function() {
7118 if ( !hooks.unqueued ) {
7119 oldfire();
7120 }
7121 };
7122 }
7123 hooks.unqueued++;
7124
7125 anim.always(function() {
7126 // doing this makes sure that the complete handler will be called
7127 // before this completes
7128 anim.always(function() {
7129 hooks.unqueued--;
7130 if ( !jQuery.queue( elem, "fx" ).length ) {
7131 hooks.empty.fire();
7132 }
7133 });
7134 });
7135 }
7136
7137 // height/width overflow pass
7138 if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
7139 // Make sure that nothing sneaks out
7140 // Record all 3 overflow attributes because IE does not
7141 // change the overflow attribute when overflowX and
7142 // overflowY are set to the same value
7143 opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
7144
7145 // Set display property to inline-block for height/width
7146 // animations on inline elements that are having width/height animated
7147 display = jQuery.css( elem, "display" );
7148
7149 // Test default display if display is currently "none"
7150 checkDisplay = display === "none" ?
7151 jQuery._data( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display;
7152
7153 if ( checkDisplay === "inline" && jQuery.css( elem, "float" ) === "none" ) {
7154
7155 // inline-level elements accept inline-block;
7156 // block-level elements need to be inline with layout
7157 if ( !support.inlineBlockNeedsLayout || defaultDisplay( elem.nodeName ) === "inline" ) {
7158 style.display = "inline-block";
7159 } else {
7160 style.zoom = 1;
7161 }
7162 }
7163 }
7164
7165 if ( opts.overflow ) {
7166 style.overflow = "hidden";
7167 if ( !support.shrinkWrapBlocks() ) {
7168 anim.always(function() {
7169 style.overflow = opts.overflow[ 0 ];
7170 style.overflowX = opts.overflow[ 1 ];
7171 style.overflowY = opts.overflow[ 2 ];
7172 });
7173 }
7174 }
7175
7176 // show/hide pass
7177 for ( prop in props ) {
7178 value = props[ prop ];
7179 if ( rfxtypes.exec( value ) ) {
7180 delete props[ prop ];
7181 toggle = toggle || value === "toggle";
7182 if ( value === ( hidden ? "hide" : "show" ) ) {
7183
7184 // If there is dataShow left over from a stopped hide or show and we are going to proceed with show, we should pretend to be hidden
7185 if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
7186 hidden = true;
7187 } else {
7188 continue;
7189 }
7190 }
7191 orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
7192
7193 // Any non-fx value stops us from restoring the original display value
7194 } else {
7195 display = undefined;
7196 }
7197 }
7198
7199 if ( !jQuery.isEmptyObject( orig ) ) {
7200 if ( dataShow ) {
7201 if ( "hidden" in dataShow ) {
7202 hidden = dataShow.hidden;
7203 }
7204 } else {
7205 dataShow = jQuery._data( elem, "fxshow", {} );
7206 }
7207
7208 // store state if its toggle - enables .stop().toggle() to "reverse"
7209 if ( toggle ) {
7210 dataShow.hidden = !hidden;
7211 }
7212 if ( hidden ) {
7213 jQuery( elem ).show();
7214 } else {
7215 anim.done(function() {
7216 jQuery( elem ).hide();
7217 });
7218 }
7219 anim.done(function() {
7220 var prop;
7221 jQuery._removeData( elem, "fxshow" );
7222 for ( prop in orig ) {
7223 jQuery.style( elem, prop, orig[ prop ] );
7224 }
7225 });
7226 for ( prop in orig ) {
7227 tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
7228
7229 if ( !( prop in dataShow ) ) {
7230 dataShow[ prop ] = tween.start;
7231 if ( hidden ) {
7232 tween.end = tween.start;
7233 tween.start = prop === "width" || prop === "height" ? 1 : 0;
7234 }
7235 }
7236 }
7237
7238 // If this is a noop like .hide().hide(), restore an overwritten display value
7239 } else if ( (display === "none" ? defaultDisplay( elem.nodeName ) : display) === "inline" ) {
7240 style.display = display;
7241 }
7242 }
7243
7244 function propFilter( props, specialEasing ) {
7245 var index, name, easing, value, hooks;
7246
7247 // camelCase, specialEasing and expand cssHook pass
7248 for ( index in props ) {
7249 name = jQuery.camelCase( index );
7250 easing = specialEasing[ name ];
7251 value = props[ index ];
7252 if ( jQuery.isArray( value ) ) {
7253 easing = value[ 1 ];
7254 value = props[ index ] = value[ 0 ];
7255 }
7256
7257 if ( index !== name ) {
7258 props[ name ] = value;
7259 delete props[ index ];
7260 }
7261
7262 hooks = jQuery.cssHooks[ name ];
7263 if ( hooks && "expand" in hooks ) {
7264 value = hooks.expand( value );
7265 delete props[ name ];
7266
7267 // not quite $.extend, this wont overwrite keys already present.
7268 // also - reusing 'index' from above because we have the correct "name"
7269 for ( index in value ) {
7270 if ( !( index in props ) ) {
7271 props[ index ] = value[ index ];
7272 specialEasing[ index ] = easing;
7273 }
7274 }
7275 } else {
7276 specialEasing[ name ] = easing;
7277 }
7278 }
7279 }
7280
7281 function Animation( elem, properties, options ) {
7282 var result,
7283 stopped,
7284 index = 0,
7285 length = animationPrefilters.length,
7286 deferred = jQuery.Deferred().always( function() {
7287 // don't match elem in the :animated selector
7288 delete tick.elem;
7289 }),
7290 tick = function() {
7291 if ( stopped ) {
7292 return false;
7293 }
7294 var currentTime = fxNow || createFxNow(),
7295 remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
7296 // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)
7297 temp = remaining / animation.duration || 0,
7298 percent = 1 - temp,
7299 index = 0,
7300 length = animation.tweens.length;
7301
7302 for ( ; index < length ; index++ ) {
7303 animation.tweens[ index ].run( percent );
7304 }
7305
7306 deferred.notifyWith( elem, [ animation, percent, remaining ]);
7307
7308 if ( percent < 1 && length ) {
7309 return remaining;
7310 } else {
7311 deferred.resolveWith( elem, [ animation ] );
7312 return false;
7313 }
7314 },
7315 animation = deferred.promise({
7316 elem: elem,
7317 props: jQuery.extend( {}, properties ),
7318 opts: jQuery.extend( true, { specialEasing: {} }, options ),
7319 originalProperties: properties,
7320 originalOptions: options,
7321 startTime: fxNow || createFxNow(),
7322 duration: options.duration,
7323 tweens: [],
7324 createTween: function( prop, end ) {
7325 var tween = jQuery.Tween( elem, animation.opts, prop, end,
7326 animation.opts.specialEasing[ prop ] || animation.opts.easing );
7327 animation.tweens.push( tween );
7328 return tween;
7329 },
7330 stop: function( gotoEnd ) {
7331 var index = 0,
7332 // if we are going to the end, we want to run all the tweens
7333 // otherwise we skip this part
7334 length = gotoEnd ? animation.tweens.length : 0;
7335 if ( stopped ) {
7336 return this;
7337 }
7338 stopped = true;
7339 for ( ; index < length ; index++ ) {
7340 animation.tweens[ index ].run( 1 );
7341 }
7342
7343 // resolve when we played the last frame
7344 // otherwise, reject
7345 if ( gotoEnd ) {
7346 deferred.resolveWith( elem, [ animation, gotoEnd ] );
7347 } else {
7348 deferred.rejectWith( elem, [ animation, gotoEnd ] );
7349 }
7350 return this;
7351 }
7352 }),
7353 props = animation.props;
7354
7355 propFilter( props, animation.opts.specialEasing );
7356
7357 for ( ; index < length ; index++ ) {
7358 result = animationPrefilters[ index ].call( animation, elem, props, animation.opts );
7359 if ( result ) {
7360 return result;
7361 }
7362 }
7363
7364 jQuery.map( props, createTween, animation );
7365
7366 if ( jQuery.isFunction( animation.opts.start ) ) {
7367 animation.opts.start.call( elem, animation );
7368 }
7369
7370 jQuery.fx.timer(
7371 jQuery.extend( tick, {
7372 elem: elem,
7373 anim: animation,
7374 queue: animation.opts.queue
7375 })
7376 );
7377
7378 // attach callbacks from options
7379 return animation.progress( animation.opts.progress )
7380 .done( animation.opts.done, animation.opts.complete )
7381 .fail( animation.opts.fail )
7382 .always( animation.opts.always );
7383 }
7384
7385 jQuery.Animation = jQuery.extend( Animation, {
7386 tweener: function( props, callback ) {
7387 if ( jQuery.isFunction( props ) ) {
7388 callback = props;
7389 props = [ "*" ];
7390 } else {
7391 props = props.split(" ");
7392 }
7393
7394 var prop,
7395 index = 0,
7396 length = props.length;
7397
7398 for ( ; index < length ; index++ ) {
7399 prop = props[ index ];
7400 tweeners[ prop ] = tweeners[ prop ] || [];
7401 tweeners[ prop ].unshift( callback );
7402 }
7403 },
7404
7405 prefilter: function( callback, prepend ) {
7406 if ( prepend ) {
7407 animationPrefilters.unshift( callback );
7408 } else {
7409 animationPrefilters.push( callback );
7410 }
7411 }
7412 });
7413
7414 jQuery.speed = function( speed, easing, fn ) {
7415 var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
7416 complete: fn || !fn && easing ||
7417 jQuery.isFunction( speed ) && speed,
7418 duration: speed,
7419 easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
7420 };
7421
7422 opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
7423 opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
7424
7425 // normalize opt.queue - true/undefined/null -> "fx"
7426 if ( opt.queue == null || opt.queue === true ) {
7427 opt.queue = "fx";
7428 }
7429
7430 // Queueing
7431 opt.old = opt.complete;
7432
7433 opt.complete = function() {
7434 if ( jQuery.isFunction( opt.old ) ) {
7435 opt.old.call( this );
7436 }
7437
7438 if ( opt.queue ) {
7439 jQuery.dequeue( this, opt.queue );
7440 }
7441 };
7442
7443 return opt;
7444 };
7445
7446 jQuery.fn.extend({
7447 fadeTo: function( speed, to, easing, callback ) {
7448
7449 // show any hidden elements after setting opacity to 0
7450 return this.filter( isHidden ).css( "opacity", 0 ).show()
7451
7452 // animate to the value specified
7453 .end().animate({ opacity: to }, speed, easing, callback );
7454 },
7455 animate: function( prop, speed, easing, callback ) {
7456 var empty = jQuery.isEmptyObject( prop ),
7457 optall = jQuery.speed( speed, easing, callback ),
7458 doAnimation = function() {
7459 // Operate on a copy of prop so per-property easing won't be lost
7460 var anim = Animation( this, jQuery.extend( {}, prop ), optall );
7461
7462 // Empty animations, or finishing resolves immediately
7463 if ( empty || jQuery._data( this, "finish" ) ) {
7464 anim.stop( true );
7465 }
7466 };
7467 doAnimation.finish = doAnimation;
7468
7469 return empty || optall.queue === false ?
7470 this.each( doAnimation ) :
7471 this.queue( optall.queue, doAnimation );
7472 },
7473 stop: function( type, clearQueue, gotoEnd ) {
7474 var stopQueue = function( hooks ) {
7475 var stop = hooks.stop;
7476 delete hooks.stop;
7477 stop( gotoEnd );
7478 };
7479
7480 if ( typeof type !== "string" ) {
7481 gotoEnd = clearQueue;
7482 clearQueue = type;
7483 type = undefined;
7484 }
7485 if ( clearQueue && type !== false ) {
7486 this.queue( type || "fx", [] );
7487 }
7488
7489 return this.each(function() {
7490 var dequeue = true,
7491 index = type != null && type + "queueHooks",
7492 timers = jQuery.timers,
7493 data = jQuery._data( this );
7494
7495 if ( index ) {
7496 if ( data[ index ] && data[ index ].stop ) {
7497 stopQueue( data[ index ] );
7498 }
7499 } else {
7500 for ( index in data ) {
7501 if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
7502 stopQueue( data[ index ] );
7503 }
7504 }
7505 }
7506
7507 for ( index = timers.length; index--; ) {
7508 if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
7509 timers[ index ].anim.stop( gotoEnd );
7510 dequeue = false;
7511 timers.splice( index, 1 );
7512 }
7513 }
7514
7515 // start the next in the queue if the last step wasn't forced
7516 // timers currently will call their complete callbacks, which will dequeue
7517 // but only if they were gotoEnd
7518 if ( dequeue || !gotoEnd ) {
7519 jQuery.dequeue( this, type );
7520 }
7521 });
7522 },
7523 finish: function( type ) {
7524 if ( type !== false ) {
7525 type = type || "fx";
7526 }
7527 return this.each(function() {
7528 var index,
7529 data = jQuery._data( this ),
7530 queue = data[ type + "queue" ],
7531 hooks = data[ type + "queueHooks" ],
7532 timers = jQuery.timers,
7533 length = queue ? queue.length : 0;
7534
7535 // enable finishing flag on private data
7536 data.finish = true;
7537
7538 // empty the queue first
7539 jQuery.queue( this, type, [] );
7540
7541 if ( hooks && hooks.stop ) {
7542 hooks.stop.call( this, true );
7543 }
7544
7545 // look for any active animations, and finish them
7546 for ( index = timers.length; index--; ) {
7547 if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
7548 timers[ index ].anim.stop( true );
7549 timers.splice( index, 1 );
7550 }
7551 }
7552
7553 // look for any animations in the old queue and finish them
7554 for ( index = 0; index < length; index++ ) {
7555 if ( queue[ index ] && queue[ index ].finish ) {
7556 queue[ index ].finish.call( this );
7557 }
7558 }
7559
7560 // turn off finishing flag
7561 delete data.finish;
7562 });
7563 }
7564 });
7565
7566 jQuery.each([ "toggle", "show", "hide" ], function( i, name ) {
7567 var cssFn = jQuery.fn[ name ];
7568 jQuery.fn[ name ] = function( speed, easing, callback ) {
7569 return speed == null || typeof speed === "boolean" ?
7570 cssFn.apply( this, arguments ) :
7571 this.animate( genFx( name, true ), speed, easing, callback );
7572 };
7573 });
7574
7575 // Generate shortcuts for custom animations
7576 jQuery.each({
7577 slideDown: genFx("show"),
7578 slideUp: genFx("hide"),
7579 slideToggle: genFx("toggle"),
7580 fadeIn: { opacity: "show" },
7581 fadeOut: { opacity: "hide" },
7582 fadeToggle: { opacity: "toggle" }
7583 }, function( name, props ) {
7584 jQuery.fn[ name ] = function( speed, easing, callback ) {
7585 return this.animate( props, speed, easing, callback );
7586 };
7587 });
7588
7589 jQuery.timers = [];
7590 jQuery.fx.tick = function() {
7591 var timer,
7592 timers = jQuery.timers,
7593 i = 0;
7594
7595 fxNow = jQuery.now();
7596
7597 for ( ; i < timers.length; i++ ) {
7598 timer = timers[ i ];
7599 // Checks the timer has not already been removed
7600 if ( !timer() && timers[ i ] === timer ) {
7601 timers.splice( i--, 1 );
7602 }
7603 }
7604
7605 if ( !timers.length ) {
7606 jQuery.fx.stop();
7607 }
7608 fxNow = undefined;
7609 };
7610
7611 jQuery.fx.timer = function( timer ) {
7612 jQuery.timers.push( timer );
7613 if ( timer() ) {
7614 jQuery.fx.start();
7615 } else {
7616 jQuery.timers.pop();
7617 }
7618 };
7619
7620 jQuery.fx.interval = 13;
7621
7622 jQuery.fx.start = function() {
7623 if ( !timerId ) {
7624 timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );
7625 }
7626 };
7627
7628 jQuery.fx.stop = function() {
7629 clearInterval( timerId );
7630 timerId = null;
7631 };
7632
7633 jQuery.fx.speeds = {
7634 slow: 600,
7635 fast: 200,
7636 // Default speed
7637 _default: 400
7638 };
7639
7640
7641 // Based off of the plugin by Clint Helfers, with permission.
7642 // http://blindsignals.com/index.php/2009/07/jquery-delay/
7643 jQuery.fn.delay = function( time, type ) {
7644 time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
7645 type = type || "fx";
7646
7647 return this.queue( type, function( next, hooks ) {
7648 var timeout = setTimeout( next, time );
7649 hooks.stop = function() {
7650 clearTimeout( timeout );
7651 };
7652 });
7653 };
7654
7655
7656 (function() {
7657 // Minified: var a,b,c,d,e
7658 var input, div, select, a, opt;
7659
7660 // Setup
7661 div = document.createElement( "div" );
7662 div.setAttribute( "className", "t" );
7663 div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
7664 a = div.getElementsByTagName("a")[ 0 ];
7665
7666 // First batch of tests.
7667 select = document.createElement("select");
7668 opt = select.appendChild( document.createElement("option") );
7669 input = div.getElementsByTagName("input")[ 0 ];
7670
7671 a.style.cssText = "top:1px";
7672
7673 // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
7674 support.getSetAttribute = div.className !== "t";
7675
7676 // Get the style information from getAttribute
7677 // (IE uses .cssText instead)
7678 support.style = /top/.test( a.getAttribute("style") );
7679
7680 // Make sure that URLs aren't manipulated
7681 // (IE normalizes it by default)
7682 support.hrefNormalized = a.getAttribute("href") === "/a";
7683
7684 // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
7685 support.checkOn = !!input.value;
7686
7687 // Make sure that a selected-by-default option has a working selected property.
7688 // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
7689 support.optSelected = opt.selected;
7690
7691 // Tests for enctype support on a form (#6743)
7692 support.enctype = !!document.createElement("form").enctype;
7693
7694 // Make sure that the options inside disabled selects aren't marked as disabled
7695 // (WebKit marks them as disabled)
7696 select.disabled = true;
7697 support.optDisabled = !opt.disabled;
7698
7699 // Support: IE8 only
7700 // Check if we can trust getAttribute("value")
7701 input = document.createElement( "input" );
7702 input.setAttribute( "value", "" );
7703 support.input = input.getAttribute( "value" ) === "";
7704
7705 // Check if an input maintains its value after becoming a radio
7706 input.value = "t";
7707 input.setAttribute( "type", "radio" );
7708 support.radioValue = input.value === "t";
7709 })();
7710
7711
7712 var rreturn = /\r/g;
7713
7714 jQuery.fn.extend({
7715 val: function( value ) {
7716 var hooks, ret, isFunction,
7717 elem = this[0];
7718
7719 if ( !arguments.length ) {
7720 if ( elem ) {
7721 hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
7722
7723 if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
7724 return ret;
7725 }
7726
7727 ret = elem.value;
7728
7729 return typeof ret === "string" ?
7730 // handle most common string cases
7731 ret.replace(rreturn, "") :
7732 // handle cases where value is null/undef or number
7733 ret == null ? "" : ret;
7734 }
7735
7736 return;
7737 }
7738
7739 isFunction = jQuery.isFunction( value );
7740
7741 return this.each(function( i ) {
7742 var val;
7743
7744 if ( this.nodeType !== 1 ) {
7745 return;
7746 }
7747
7748 if ( isFunction ) {
7749 val = value.call( this, i, jQuery( this ).val() );
7750 } else {
7751 val = value;
7752 }
7753
7754 // Treat null/undefined as ""; convert numbers to string
7755 if ( val == null ) {
7756 val = "";
7757 } else if ( typeof val === "number" ) {
7758 val += "";
7759 } else if ( jQuery.isArray( val ) ) {
7760 val = jQuery.map( val, function( value ) {
7761 return value == null ? "" : value + "";
7762 });
7763 }
7764
7765 hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
7766
7767 // If set returns undefined, fall back to normal setting
7768 if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
7769 this.value = val;
7770 }
7771 });
7772 }
7773 });
7774
7775 jQuery.extend({
7776 valHooks: {
7777 option: {
7778 get: function( elem ) {
7779 var val = jQuery.find.attr( elem, "value" );
7780 return val != null ?
7781 val :
7782 // Support: IE10-11+
7783 // option.text throws exceptions (#14686, #14858)
7784 jQuery.trim( jQuery.text( elem ) );
7785 }
7786 },
7787 select: {
7788 get: function( elem ) {
7789 var value, option,
7790 options = elem.options,
7791 index = elem.selectedIndex,
7792 one = elem.type === "select-one" || index < 0,
7793 values = one ? null : [],
7794 max = one ? index + 1 : options.length,
7795 i = index < 0 ?
7796 max :
7797 one ? index : 0;
7798
7799 // Loop through all the selected options
7800 for ( ; i < max; i++ ) {
7801 option = options[ i ];
7802
7803 // oldIE doesn't update selected after form reset (#2551)
7804 if ( ( option.selected || i === index ) &&
7805 // Don't return options that are disabled or in a disabled optgroup
7806 ( support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&
7807 ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
7808
7809 // Get the specific value for the option
7810 value = jQuery( option ).val();
7811
7812 // We don't need an array for one selects
7813 if ( one ) {
7814 return value;
7815 }
7816
7817 // Multi-Selects return an array
7818 values.push( value );
7819 }
7820 }
7821
7822 return values;
7823 },
7824
7825 set: function( elem, value ) {
7826 var optionSet, option,
7827 options = elem.options,
7828 values = jQuery.makeArray( value ),
7829 i = options.length;
7830
7831 while ( i-- ) {
7832 option = options[ i ];
7833
7834 if ( jQuery.inArray( jQuery.valHooks.option.get( option ), values ) >= 0 ) {
7835
7836 // Support: IE6
7837 // When new option element is added to select box we need to
7838 // force reflow of newly added node in order to workaround delay
7839 // of initialization properties
7840 try {
7841 option.selected = optionSet = true;
7842
7843 } catch ( _ ) {
7844
7845 // Will be executed only in IE6
7846 option.scrollHeight;
7847 }
7848
7849 } else {
7850 option.selected = false;
7851 }
7852 }
7853
7854 // Force browsers to behave consistently when non-matching value is set
7855 if ( !optionSet ) {
7856 elem.selectedIndex = -1;
7857 }
7858
7859 return options;
7860 }
7861 }
7862 }
7863 });
7864
7865 // Radios and checkboxes getter/setter
7866 jQuery.each([ "radio", "checkbox" ], function() {
7867 jQuery.valHooks[ this ] = {
7868 set: function( elem, value ) {
7869 if ( jQuery.isArray( value ) ) {
7870 return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
7871 }
7872 }
7873 };
7874 if ( !support.checkOn ) {
7875 jQuery.valHooks[ this ].get = function( elem ) {
7876 // Support: Webkit
7877 // "" is returned instead of "on" if a value isn't specified
7878 return elem.getAttribute("value") === null ? "on" : elem.value;
7879 };
7880 }
7881 });
7882
7883
7884
7885
7886 var nodeHook, boolHook,
7887 attrHandle = jQuery.expr.attrHandle,
7888 ruseDefault = /^(?:checked|selected)$/i,
7889 getSetAttribute = support.getSetAttribute,
7890 getSetInput = support.input;
7891
7892 jQuery.fn.extend({
7893 attr: function( name, value ) {
7894 return access( this, jQuery.attr, name, value, arguments.length > 1 );
7895 },
7896
7897 removeAttr: function( name ) {
7898 return this.each(function() {
7899 jQuery.removeAttr( this, name );
7900 });
7901 }
7902 });
7903
7904 jQuery.extend({
7905 attr: function( elem, name, value ) {
7906 var hooks, ret,
7907 nType = elem.nodeType;
7908
7909 // don't get/set attributes on text, comment and attribute nodes
7910 if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
7911 return;
7912 }
7913
7914 // Fallback to prop when attributes are not supported
7915 if ( typeof elem.getAttribute === strundefined ) {
7916 return jQuery.prop( elem, name, value );
7917 }
7918
7919 // All attributes are lowercase
7920 // Grab necessary hook if one is defined
7921 if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
7922 name = name.toLowerCase();
7923 hooks = jQuery.attrHooks[ name ] ||
7924 ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );
7925 }
7926
7927 if ( value !== undefined ) {
7928
7929 if ( value === null ) {
7930 jQuery.removeAttr( elem, name );
7931
7932 } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
7933 return ret;
7934
7935 } else {
7936 elem.setAttribute( name, value + "" );
7937 return value;
7938 }
7939
7940 } else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
7941 return ret;
7942
7943 } else {
7944 ret = jQuery.find.attr( elem, name );
7945
7946 // Non-existent attributes return null, we normalize to undefined
7947 return ret == null ?
7948 undefined :
7949 ret;
7950 }
7951 },
7952
7953 removeAttr: function( elem, value ) {
7954 var name, propName,
7955 i = 0,
7956 attrNames = value && value.match( rnotwhite );
7957
7958 if ( attrNames && elem.nodeType === 1 ) {
7959 while ( (name = attrNames[i++]) ) {
7960 propName = jQuery.propFix[ name ] || name;
7961
7962 // Boolean attributes get special treatment (#10870)
7963 if ( jQuery.expr.match.bool.test( name ) ) {
7964 // Set corresponding property to false
7965 if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
7966 elem[ propName ] = false;
7967 // Support: IE<9
7968 // Also clear defaultChecked/defaultSelected (if appropriate)
7969 } else {
7970 elem[ jQuery.camelCase( "default-" + name ) ] =
7971 elem[ propName ] = false;
7972 }
7973
7974 // See #9699 for explanation of this approach (setting first, then removal)
7975 } else {
7976 jQuery.attr( elem, name, "" );
7977 }
7978
7979 elem.removeAttribute( getSetAttribute ? name : propName );
7980 }
7981 }
7982 },
7983
7984 attrHooks: {
7985 type: {
7986 set: function( elem, value ) {
7987 if ( !support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
7988 // Setting the type on a radio button after the value resets the value in IE6-9
7989 // Reset value to default in case type is set after value during creation
7990 var val = elem.value;
7991 elem.setAttribute( "type", value );
7992 if ( val ) {
7993 elem.value = val;
7994 }
7995 return value;
7996 }
7997 }
7998 }
7999 }
8000 });
8001
8002 // Hook for boolean attributes
8003 boolHook = {
8004 set: function( elem, value, name ) {
8005 if ( value === false ) {
8006 // Remove boolean attributes when set to false
8007 jQuery.removeAttr( elem, name );
8008 } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
8009 // IE<8 needs the *property* name
8010 elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );
8011
8012 // Use defaultChecked and defaultSelected for oldIE
8013 } else {
8014 elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true;
8015 }
8016
8017 return name;
8018 }
8019 };
8020
8021 // Retrieve booleans specially
8022 jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
8023
8024 var getter = attrHandle[ name ] || jQuery.find.attr;
8025
8026 attrHandle[ name ] = getSetInput && getSetAttribute || !ruseDefault.test( name ) ?
8027 function( elem, name, isXML ) {
8028 var ret, handle;
8029 if ( !isXML ) {
8030 // Avoid an infinite loop by temporarily removing this function from the getter
8031 handle = attrHandle[ name ];
8032 attrHandle[ name ] = ret;
8033 ret = getter( elem, name, isXML ) != null ?
8034 name.toLowerCase() :
8035 null;
8036 attrHandle[ name ] = handle;
8037 }
8038 return ret;
8039 } :
8040 function( elem, name, isXML ) {
8041 if ( !isXML ) {
8042 return elem[ jQuery.camelCase( "default-" + name ) ] ?
8043 name.toLowerCase() :
8044 null;
8045 }
8046 };
8047 });
8048
8049 // fix oldIE attroperties
8050 if ( !getSetInput || !getSetAttribute ) {
8051 jQuery.attrHooks.value = {
8052 set: function( elem, value, name ) {
8053 if ( jQuery.nodeName( elem, "input" ) ) {
8054 // Does not return so that setAttribute is also used
8055 elem.defaultValue = value;
8056 } else {
8057 // Use nodeHook if defined (#1954); otherwise setAttribute is fine
8058 return nodeHook && nodeHook.set( elem, value, name );
8059 }
8060 }
8061 };
8062 }
8063
8064 // IE6/7 do not support getting/setting some attributes with get/setAttribute
8065 if ( !getSetAttribute ) {
8066
8067 // Use this for any attribute in IE6/7
8068 // This fixes almost every IE6/7 issue
8069 nodeHook = {
8070 set: function( elem, value, name ) {
8071 // Set the existing or create a new attribute node
8072 var ret = elem.getAttributeNode( name );
8073 if ( !ret ) {
8074 elem.setAttributeNode(
8075 (ret = elem.ownerDocument.createAttribute( name ))
8076 );
8077 }
8078
8079 ret.value = value += "";
8080
8081 // Break association with cloned elements by also using setAttribute (#9646)
8082 if ( name === "value" || value === elem.getAttribute( name ) ) {
8083 return value;
8084 }
8085 }
8086 };
8087
8088 // Some attributes are constructed with empty-string values when not defined
8089 attrHandle.id = attrHandle.name = attrHandle.coords =
8090 function( elem, name, isXML ) {
8091 var ret;
8092 if ( !isXML ) {
8093 return (ret = elem.getAttributeNode( name )) && ret.value !== "" ?
8094 ret.value :
8095 null;
8096 }
8097 };
8098
8099 // Fixing value retrieval on a button requires this module
8100 jQuery.valHooks.button = {
8101 get: function( elem, name ) {
8102 var ret = elem.getAttributeNode( name );
8103 if ( ret && ret.specified ) {
8104 return ret.value;
8105 }
8106 },
8107 set: nodeHook.set
8108 };
8109
8110 // Set contenteditable to false on removals(#10429)
8111 // Setting to empty string throws an error as an invalid value
8112 jQuery.attrHooks.contenteditable = {
8113 set: function( elem, value, name ) {
8114 nodeHook.set( elem, value === "" ? false : value, name );
8115 }
8116 };
8117
8118 // Set width and height to auto instead of 0 on empty string( Bug #8150 )
8119 // This is for removals
8120 jQuery.each([ "width", "height" ], function( i, name ) {
8121 jQuery.attrHooks[ name ] = {
8122 set: function( elem, value ) {
8123 if ( value === "" ) {
8124 elem.setAttribute( name, "auto" );
8125 return value;
8126 }
8127 }
8128 };
8129 });
8130 }
8131
8132 if ( !support.style ) {
8133 jQuery.attrHooks.style = {
8134 get: function( elem ) {
8135 // Return undefined in the case of empty string
8136 // Note: IE uppercases css property names, but if we were to .toLowerCase()
8137 // .cssText, that would destroy case senstitivity in URL's, like in "background"
8138 return elem.style.cssText || undefined;
8139 },
8140 set: function( elem, value ) {
8141 return ( elem.style.cssText = value + "" );
8142 }
8143 };
8144 }
8145
8146
8147
8148
8149 var rfocusable = /^(?:input|select|textarea|button|object)$/i,
8150 rclickable = /^(?:a|area)$/i;
8151
8152 jQuery.fn.extend({
8153 prop: function( name, value ) {
8154 return access( this, jQuery.prop, name, value, arguments.length > 1 );
8155 },
8156
8157 removeProp: function( name ) {
8158 name = jQuery.propFix[ name ] || name;
8159 return this.each(function() {
8160 // try/catch handles cases where IE balks (such as removing a property on window)
8161 try {
8162 this[ name ] = undefined;
8163 delete this[ name ];
8164 } catch( e ) {}
8165 });
8166 }
8167 });
8168
8169 jQuery.extend({
8170 propFix: {
8171 "for": "htmlFor",
8172 "class": "className"
8173 },
8174
8175 prop: function( elem, name, value ) {
8176 var ret, hooks, notxml,
8177 nType = elem.nodeType;
8178
8179 // don't get/set properties on text, comment and attribute nodes
8180 if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
8181 return;
8182 }
8183
8184 notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
8185
8186 if ( notxml ) {
8187 // Fix name and attach hooks
8188 name = jQuery.propFix[ name ] || name;
8189 hooks = jQuery.propHooks[ name ];
8190 }
8191
8192 if ( value !== undefined ) {
8193 return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ?
8194 ret :
8195 ( elem[ name ] = value );
8196
8197 } else {
8198 return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ?
8199 ret :
8200 elem[ name ];
8201 }
8202 },
8203
8204 propHooks: {
8205 tabIndex: {
8206 get: function( elem ) {
8207 // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
8208 // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
8209 // Use proper attribute retrieval(#12072)
8210 var tabindex = jQuery.find.attr( elem, "tabindex" );
8211
8212 return tabindex ?
8213 parseInt( tabindex, 10 ) :
8214 rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
8215 0 :
8216 -1;
8217 }
8218 }
8219 }
8220 });
8221
8222 // Some attributes require a special call on IE
8223 // http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
8224 if ( !support.hrefNormalized ) {
8225 // href/src property should get the full normalized URL (#10299/#12915)
8226 jQuery.each([ "href", "src" ], function( i, name ) {
8227 jQuery.propHooks[ name ] = {
8228 get: function( elem ) {
8229 return elem.getAttribute( name, 4 );
8230 }
8231 };
8232 });
8233 }
8234
8235 // Support: Safari, IE9+
8236 // mis-reports the default selected property of an option
8237 // Accessing the parent's selectedIndex property fixes it
8238 if ( !support.optSelected ) {
8239 jQuery.propHooks.selected = {
8240 get: function( elem ) {
8241 var parent = elem.parentNode;
8242
8243 if ( parent ) {
8244 parent.selectedIndex;
8245
8246 // Make sure that it also works with optgroups, see #5701
8247 if ( parent.parentNode ) {
8248 parent.parentNode.selectedIndex;
8249 }
8250 }
8251 return null;
8252 }
8253 };
8254 }
8255
8256 jQuery.each([
8257 "tabIndex",
8258 "readOnly",
8259 "maxLength",
8260 "cellSpacing",
8261 "cellPadding",
8262 "rowSpan",
8263 "colSpan",
8264 "useMap",
8265 "frameBorder",
8266 "contentEditable"
8267 ], function() {
8268 jQuery.propFix[ this.toLowerCase() ] = this;
8269 });
8270
8271 // IE6/7 call enctype encoding
8272 if ( !support.enctype ) {
8273 jQuery.propFix.enctype = "encoding";
8274 }
8275
8276
8277
8278
8279 var rclass = /[\t\r\n\f]/g;
8280
8281 jQuery.fn.extend({
8282 addClass: function( value ) {
8283 var classes, elem, cur, clazz, j, finalValue,
8284 i = 0,
8285 len = this.length,
8286 proceed = typeof value === "string" && value;
8287
8288 if ( jQuery.isFunction( value ) ) {
8289 return this.each(function( j ) {
8290 jQuery( this ).addClass( value.call( this, j, this.className ) );
8291 });
8292 }
8293
8294 if ( proceed ) {
8295 // The disjunction here is for better compressibility (see removeClass)
8296 classes = ( value || "" ).match( rnotwhite ) || [];
8297
8298 for ( ; i < len; i++ ) {
8299 elem = this[ i ];
8300 cur = elem.nodeType === 1 && ( elem.className ?
8301 ( " " + elem.className + " " ).replace( rclass, " " ) :
8302 " "
8303 );
8304
8305 if ( cur ) {
8306 j = 0;
8307 while ( (clazz = classes[j++]) ) {
8308 if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
8309 cur += clazz + " ";
8310 }
8311 }
8312
8313 // only assign if different to avoid unneeded rendering.
8314 finalValue = jQuery.trim( cur );
8315 if ( elem.className !== finalValue ) {
8316 elem.className = finalValue;
8317 }
8318 }
8319 }
8320 }
8321
8322 return this;
8323 },
8324
8325 removeClass: function( value ) {
8326 var classes, elem, cur, clazz, j, finalValue,
8327 i = 0,
8328 len = this.length,
8329 proceed = arguments.length === 0 || typeof value === "string" && value;
8330
8331 if ( jQuery.isFunction( value ) ) {
8332 return this.each(function( j ) {
8333 jQuery( this ).removeClass( value.call( this, j, this.className ) );
8334 });
8335 }
8336 if ( proceed ) {
8337 classes = ( value || "" ).match( rnotwhite ) || [];
8338
8339 for ( ; i < len; i++ ) {
8340 elem = this[ i ];
8341 // This expression is here for better compressibility (see addClass)
8342 cur = elem.nodeType === 1 && ( elem.className ?
8343 ( " " + elem.className + " " ).replace( rclass, " " ) :
8344 ""
8345 );
8346
8347 if ( cur ) {
8348 j = 0;
8349 while ( (clazz = classes[j++]) ) {
8350 // Remove *all* instances
8351 while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {
8352 cur = cur.replace( " " + clazz + " ", " " );
8353 }
8354 }
8355
8356 // only assign if different to avoid unneeded rendering.
8357 finalValue = value ? jQuery.trim( cur ) : "";
8358 if ( elem.className !== finalValue ) {
8359 elem.className = finalValue;
8360 }
8361 }
8362 }
8363 }
8364
8365 return this;
8366 },
8367
8368 toggleClass: function( value, stateVal ) {
8369 var type = typeof value;
8370
8371 if ( typeof stateVal === "boolean" && type === "string" ) {
8372 return stateVal ? this.addClass( value ) : this.removeClass( value );
8373 }
8374
8375 if ( jQuery.isFunction( value ) ) {
8376 return this.each(function( i ) {
8377 jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
8378 });
8379 }
8380
8381 return this.each(function() {
8382 if ( type === "string" ) {
8383 // toggle individual class names
8384 var className,
8385 i = 0,
8386 self = jQuery( this ),
8387 classNames = value.match( rnotwhite ) || [];
8388
8389 while ( (className = classNames[ i++ ]) ) {
8390 // check each className given, space separated list
8391 if ( self.hasClass( className ) ) {
8392 self.removeClass( className );
8393 } else {
8394 self.addClass( className );
8395 }
8396 }
8397
8398 // Toggle whole class name
8399 } else if ( type === strundefined || type === "boolean" ) {
8400 if ( this.className ) {
8401 // store className if set
8402 jQuery._data( this, "__className__", this.className );
8403 }
8404
8405 // If the element has a class name or if we're passed "false",
8406 // then remove the whole classname (if there was one, the above saved it).
8407 // Otherwise bring back whatever was previously saved (if anything),
8408 // falling back to the empty string if nothing was stored.
8409 this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
8410 }
8411 });
8412 },
8413
8414 hasClass: function( selector ) {
8415 var className = " " + selector + " ",
8416 i = 0,
8417 l = this.length;
8418 for ( ; i < l; i++ ) {
8419 if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
8420 return true;
8421 }
8422 }
8423
8424 return false;
8425 }
8426 });
8427
8428
8429
8430
8431 // Return jQuery for attributes-only inclusion
8432
8433
8434 jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
8435 "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
8436 "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
8437
8438 // Handle event binding
8439 jQuery.fn[ name ] = function( data, fn ) {
8440 return arguments.length > 0 ?
8441 this.on( name, null, data, fn ) :
8442 this.trigger( name );
8443 };
8444 });
8445
8446 jQuery.fn.extend({
8447 hover: function( fnOver, fnOut ) {
8448 return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
8449 },
8450
8451 bind: function( types, data, fn ) {
8452 return this.on( types, null, data, fn );
8453 },
8454 unbind: function( types, fn ) {
8455 return this.off( types, null, fn );
8456 },
8457
8458 delegate: function( selector, types, data, fn ) {
8459 return this.on( types, selector, data, fn );
8460 },
8461 undelegate: function( selector, types, fn ) {
8462 // ( namespace ) or ( selector, types [, fn] )
8463 return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
8464 }
8465 });
8466
8467
8468 var nonce = jQuery.now();
8469
8470 var rquery = (/\?/);
8471
8472
8473
8474 var rvalidtokens = /(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;
8475
8476 jQuery.parseJSON = function( data ) {
8477 // Attempt to parse using the native JSON parser first
8478 if ( window.JSON && window.JSON.parse ) {
8479 // Support: Android 2.3
8480 // Workaround failure to string-cast null input
8481 return window.JSON.parse( data + "" );
8482 }
8483
8484 var requireNonComma,
8485 depth = null,
8486 str = jQuery.trim( data + "" );
8487
8488 // Guard against invalid (and possibly dangerous) input by ensuring that nothing remains
8489 // after removing valid tokens
8490 return str && !jQuery.trim( str.replace( rvalidtokens, function( token, comma, open, close ) {
8491
8492 // Force termination if we see a misplaced comma
8493 if ( requireNonComma && comma ) {
8494 depth = 0;
8495 }
8496
8497 // Perform no more replacements after returning to outermost depth
8498 if ( depth === 0 ) {
8499 return token;
8500 }
8501
8502 // Commas must not follow "[", "{", or ","
8503 requireNonComma = open || comma;
8504
8505 // Determine new depth
8506 // array/object open ("[" or "{"): depth += true - false (increment)
8507 // array/object close ("]" or "}"): depth += false - true (decrement)
8508 // other cases ("," or primitive): depth += true - true (numeric cast)
8509 depth += !close - !open;
8510
8511 // Remove this token
8512 return "";
8513 }) ) ?
8514 ( Function( "return " + str ) )() :
8515 jQuery.error( "Invalid JSON: " + data );
8516 };
8517
8518
8519 // Cross-browser xml parsing
8520 jQuery.parseXML = function( data ) {
8521 var xml, tmp;
8522 if ( !data || typeof data !== "string" ) {
8523 return null;
8524 }
8525 try {
8526 if ( window.DOMParser ) { // Standard
8527 tmp = new DOMParser();
8528 xml = tmp.parseFromString( data, "text/xml" );
8529 } else { // IE
8530 xml = new ActiveXObject( "Microsoft.XMLDOM" );
8531 xml.async = "false";
8532 xml.loadXML( data );
8533 }
8534 } catch( e ) {
8535 xml = undefined;
8536 }
8537 if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
8538 jQuery.error( "Invalid XML: " + data );
8539 }
8540 return xml;
8541 };
8542
8543
8544 var
8545 // Document location
8546 ajaxLocParts,
8547 ajaxLocation,
8548
8549 rhash = /#.*$/,
8550 rts = /([?&])_=[^&]*/,
8551 rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
8552 // #7653, #8125, #8152: local protocol detection
8553 rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
8554 rnoContent = /^(?:GET|HEAD)$/,
8555 rprotocol = /^\/\//,
8556 rurl = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,
8557
8558 /* Prefilters
8559 * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
8560 * 2) These are called:
8561 * - BEFORE asking for a transport
8562 * - AFTER param serialization (s.data is a string if s.processData is true)
8563 * 3) key is the dataType
8564 * 4) the catchall symbol "*" can be used
8565 * 5) execution will start with transport dataType and THEN continue down to "*" if needed
8566 */
8567 prefilters = {},
8568
8569 /* Transports bindings
8570 * 1) key is the dataType
8571 * 2) the catchall symbol "*" can be used
8572 * 3) selection will start with transport dataType and THEN go to "*" if needed
8573 */
8574 transports = {},
8575
8576 // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
8577 allTypes = "*/".concat("*");
8578
8579 // #8138, IE may throw an exception when accessing
8580 // a field from window.location if document.domain has been set
8581 try {
8582 ajaxLocation = location.href;
8583 } catch( e ) {
8584 // Use the href attribute of an A element
8585 // since IE will modify it given document.location
8586 ajaxLocation = document.createElement( "a" );
8587 ajaxLocation.href = "";
8588 ajaxLocation = ajaxLocation.href;
8589 }
8590
8591 // Segment location into parts
8592 ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
8593
8594 // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
8595 function addToPrefiltersOrTransports( structure ) {
8596
8597 // dataTypeExpression is optional and defaults to "*"
8598 return function( dataTypeExpression, func ) {
8599
8600 if ( typeof dataTypeExpression !== "string" ) {
8601 func = dataTypeExpression;
8602 dataTypeExpression = "*";
8603 }
8604
8605 var dataType,
8606 i = 0,
8607 dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || [];
8608
8609 if ( jQuery.isFunction( func ) ) {
8610 // For each dataType in the dataTypeExpression
8611 while ( (dataType = dataTypes[i++]) ) {
8612 // Prepend if requested
8613 if ( dataType.charAt( 0 ) === "+" ) {
8614 dataType = dataType.slice( 1 ) || "*";
8615 (structure[ dataType ] = structure[ dataType ] || []).unshift( func );
8616
8617 // Otherwise append
8618 } else {
8619 (structure[ dataType ] = structure[ dataType ] || []).push( func );
8620 }
8621 }
8622 }
8623 };
8624 }
8625
8626 // Base inspection function for prefilters and transports
8627 function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
8628
8629 var inspected = {},
8630 seekingTransport = ( structure === transports );
8631
8632 function inspect( dataType ) {
8633 var selected;
8634 inspected[ dataType ] = true;
8635 jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
8636 var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
8637 if ( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
8638 options.dataTypes.unshift( dataTypeOrTransport );
8639 inspect( dataTypeOrTransport );
8640 return false;
8641 } else if ( seekingTransport ) {
8642 return !( selected = dataTypeOrTransport );
8643 }
8644 });
8645 return selected;
8646 }
8647
8648 return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
8649 }
8650
8651 // A special extend for ajax options
8652 // that takes "flat" options (not to be deep extended)
8653 // Fixes #9887
8654 function ajaxExtend( target, src ) {
8655 var deep, key,
8656 flatOptions = jQuery.ajaxSettings.flatOptions || {};
8657
8658 for ( key in src ) {
8659 if ( src[ key ] !== undefined ) {
8660 ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];
8661 }
8662 }
8663 if ( deep ) {
8664 jQuery.extend( true, target, deep );
8665 }
8666
8667 return target;
8668 }
8669
8670 /* Handles responses to an ajax request:
8671 * - finds the right dataType (mediates between content-type and expected dataType)
8672 * - returns the corresponding response
8673 */
8674 function ajaxHandleResponses( s, jqXHR, responses ) {
8675 var firstDataType, ct, finalDataType, type,
8676 contents = s.contents,
8677 dataTypes = s.dataTypes;
8678
8679 // Remove auto dataType and get content-type in the process
8680 while ( dataTypes[ 0 ] === "*" ) {
8681 dataTypes.shift();
8682 if ( ct === undefined ) {
8683 ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
8684 }
8685 }
8686
8687 // Check if we're dealing with a known content-type
8688 if ( ct ) {
8689 for ( type in contents ) {
8690 if ( contents[ type ] && contents[ type ].test( ct ) ) {
8691 dataTypes.unshift( type );
8692 break;
8693 }
8694 }
8695 }
8696
8697 // Check to see if we have a response for the expected dataType
8698 if ( dataTypes[ 0 ] in responses ) {
8699 finalDataType = dataTypes[ 0 ];
8700 } else {
8701 // Try convertible dataTypes
8702 for ( type in responses ) {
8703 if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
8704 finalDataType = type;
8705 break;
8706 }
8707 if ( !firstDataType ) {
8708 firstDataType = type;
8709 }
8710 }
8711 // Or just use first one
8712 finalDataType = finalDataType || firstDataType;
8713 }
8714
8715 // If we found a dataType
8716 // We add the dataType to the list if needed
8717 // and return the corresponding response
8718 if ( finalDataType ) {
8719 if ( finalDataType !== dataTypes[ 0 ] ) {
8720 dataTypes.unshift( finalDataType );
8721 }
8722 return responses[ finalDataType ];
8723 }
8724 }
8725
8726 /* Chain conversions given the request and the original response
8727 * Also sets the responseXXX fields on the jqXHR instance
8728 */
8729 function ajaxConvert( s, response, jqXHR, isSuccess ) {
8730 var conv2, current, conv, tmp, prev,
8731 converters = {},
8732 // Work with a copy of dataTypes in case we need to modify it for conversion
8733 dataTypes = s.dataTypes.slice();
8734
8735 // Create converters map with lowercased keys
8736 if ( dataTypes[ 1 ] ) {
8737 for ( conv in s.converters ) {
8738 converters[ conv.toLowerCase() ] = s.converters[ conv ];
8739 }
8740 }
8741
8742 current = dataTypes.shift();
8743
8744 // Convert to each sequential dataType
8745 while ( current ) {
8746
8747 if ( s.responseFields[ current ] ) {
8748 jqXHR[ s.responseFields[ current ] ] = response;
8749 }
8750
8751 // Apply the dataFilter if provided
8752 if ( !prev && isSuccess && s.dataFilter ) {
8753 response = s.dataFilter( response, s.dataType );
8754 }
8755
8756 prev = current;
8757 current = dataTypes.shift();
8758
8759 if ( current ) {
8760
8761 // There's only work to do if current dataType is non-auto
8762 if ( current === "*" ) {
8763
8764 current = prev;
8765
8766 // Convert response if prev dataType is non-auto and differs from current
8767 } else if ( prev !== "*" && prev !== current ) {
8768
8769 // Seek a direct converter
8770 conv = converters[ prev + " " + current ] || converters[ "* " + current ];
8771
8772 // If none found, seek a pair
8773 if ( !conv ) {
8774 for ( conv2 in converters ) {
8775
8776 // If conv2 outputs current
8777 tmp = conv2.split( " " );
8778 if ( tmp[ 1 ] === current ) {
8779
8780 // If prev can be converted to accepted input
8781 conv = converters[ prev + " " + tmp[ 0 ] ] ||
8782 converters[ "* " + tmp[ 0 ] ];
8783 if ( conv ) {
8784 // Condense equivalence converters
8785 if ( conv === true ) {
8786 conv = converters[ conv2 ];
8787
8788 // Otherwise, insert the intermediate dataType
8789 } else if ( converters[ conv2 ] !== true ) {
8790 current = tmp[ 0 ];
8791 dataTypes.unshift( tmp[ 1 ] );
8792 }
8793 break;
8794 }
8795 }
8796 }
8797 }
8798
8799 // Apply converter (if not an equivalence)
8800 if ( conv !== true ) {
8801
8802 // Unless errors are allowed to bubble, catch and return them
8803 if ( conv && s[ "throws" ] ) {
8804 response = conv( response );
8805 } else {
8806 try {
8807 response = conv( response );
8808 } catch ( e ) {
8809 return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };
8810 }
8811 }
8812 }
8813 }
8814 }
8815 }
8816
8817 return { state: "success", data: response };
8818 }
8819
8820 jQuery.extend({
8821
8822 // Counter for holding the number of active queries
8823 active: 0,
8824
8825 // Last-Modified header cache for next request
8826 lastModified: {},
8827 etag: {},
8828
8829 ajaxSettings: {
8830 url: ajaxLocation,
8831 type: "GET",
8832 isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
8833 global: true,
8834 processData: true,
8835 async: true,
8836 contentType: "application/x-www-form-urlencoded; charset=UTF-8",
8837 /*
8838 timeout: 0,
8839 data: null,
8840 dataType: null,
8841 username: null,
8842 password: null,
8843 cache: null,
8844 throws: false,
8845 traditional: false,
8846 headers: {},
8847 */
8848
8849 accepts: {
8850 "*": allTypes,
8851 text: "text/plain",
8852 html: "text/html",
8853 xml: "application/xml, text/xml",
8854 json: "application/json, text/javascript"
8855 },
8856
8857 contents: {
8858 xml: /xml/,
8859 html: /html/,
8860 json: /json/
8861 },
8862
8863 responseFields: {
8864 xml: "responseXML",
8865 text: "responseText",
8866 json: "responseJSON"
8867 },
8868
8869 // Data converters
8870 // Keys separate source (or catchall "*") and destination types with a single space
8871 converters: {
8872
8873 // Convert anything to text
8874 "* text": String,
8875
8876 // Text to html (true = no transformation)
8877 "text html": true,
8878
8879 // Evaluate text as a json expression
8880 "text json": jQuery.parseJSON,
8881
8882 // Parse text as xml
8883 "text xml": jQuery.parseXML
8884 },
8885
8886 // For options that shouldn't be deep extended:
8887 // you can add your own custom options here if
8888 // and when you create one that shouldn't be
8889 // deep extended (see ajaxExtend)
8890 flatOptions: {
8891 url: true,
8892 context: true
8893 }
8894 },
8895
8896 // Creates a full fledged settings object into target
8897 // with both ajaxSettings and settings fields.
8898 // If target is omitted, writes into ajaxSettings.
8899 ajaxSetup: function( target, settings ) {
8900 return settings ?
8901
8902 // Building a settings object
8903 ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
8904
8905 // Extending ajaxSettings
8906 ajaxExtend( jQuery.ajaxSettings, target );
8907 },
8908
8909 ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
8910 ajaxTransport: addToPrefiltersOrTransports( transports ),
8911
8912 // Main method
8913 ajax: function( url, options ) {
8914
8915 // If url is an object, simulate pre-1.5 signature
8916 if ( typeof url === "object" ) {
8917 options = url;
8918 url = undefined;
8919 }
8920
8921 // Force options to be an object
8922 options = options || {};
8923
8924 var // Cross-domain detection vars
8925 parts,
8926 // Loop variable
8927 i,
8928 // URL without anti-cache param
8929 cacheURL,
8930 // Response headers as string
8931 responseHeadersString,
8932 // timeout handle
8933 timeoutTimer,
8934
8935 // To know if global events are to be dispatched
8936 fireGlobals,
8937
8938 transport,
8939 // Response headers
8940 responseHeaders,
8941 // Create the final options object
8942 s = jQuery.ajaxSetup( {}, options ),
8943 // Callbacks context
8944 callbackContext = s.context || s,
8945 // Context for global events is callbackContext if it is a DOM node or jQuery collection
8946 globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?
8947 jQuery( callbackContext ) :
8948 jQuery.event,
8949 // Deferreds
8950 deferred = jQuery.Deferred(),
8951 completeDeferred = jQuery.Callbacks("once memory"),
8952 // Status-dependent callbacks
8953 statusCode = s.statusCode || {},
8954 // Headers (they are sent all at once)
8955 requestHeaders = {},
8956 requestHeadersNames = {},
8957 // The jqXHR state
8958 state = 0,
8959 // Default abort message
8960 strAbort = "canceled",
8961 // Fake xhr
8962 jqXHR = {
8963 readyState: 0,
8964
8965 // Builds headers hashtable if needed
8966 getResponseHeader: function( key ) {
8967 var match;
8968 if ( state === 2 ) {
8969 if ( !responseHeaders ) {
8970 responseHeaders = {};
8971 while ( (match = rheaders.exec( responseHeadersString )) ) {
8972 responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
8973 }
8974 }
8975 match = responseHeaders[ key.toLowerCase() ];
8976 }
8977 return match == null ? null : match;
8978 },
8979
8980 // Raw string
8981 getAllResponseHeaders: function() {
8982 return state === 2 ? responseHeadersString : null;
8983 },
8984
8985 // Caches the header
8986 setRequestHeader: function( name, value ) {
8987 var lname = name.toLowerCase();
8988 if ( !state ) {
8989 name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
8990 requestHeaders[ name ] = value;
8991 }
8992 return this;
8993 },
8994
8995 // Overrides response content-type header
8996 overrideMimeType: function( type ) {
8997 if ( !state ) {
8998 s.mimeType = type;
8999 }
9000 return this;
9001 },
9002
9003 // Status-dependent callbacks
9004 statusCode: function( map ) {
9005 var code;
9006 if ( map ) {
9007 if ( state < 2 ) {
9008 for ( code in map ) {
9009 // Lazy-add the new callback in a way that preserves old ones
9010 statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
9011 }
9012 } else {
9013 // Execute the appropriate callbacks
9014 jqXHR.always( map[ jqXHR.status ] );
9015 }
9016 }
9017 return this;
9018 },
9019
9020 // Cancel the request
9021 abort: function( statusText ) {
9022 var finalText = statusText || strAbort;
9023 if ( transport ) {
9024 transport.abort( finalText );
9025 }
9026 done( 0, finalText );
9027 return this;
9028 }
9029 };
9030
9031 // Attach deferreds
9032 deferred.promise( jqXHR ).complete = completeDeferred.add;
9033 jqXHR.success = jqXHR.done;
9034 jqXHR.error = jqXHR.fail;
9035
9036 // Remove hash character (#7531: and string promotion)
9037 // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
9038 // Handle falsy url in the settings object (#10093: consistency with old signature)
9039 // We also use the url parameter if available
9040 s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
9041
9042 // Alias method option to type as per ticket #12004
9043 s.type = options.method || options.type || s.method || s.type;
9044
9045 // Extract dataTypes list
9046 s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ];
9047
9048 // A cross-domain request is in order when we have a protocol:host:port mismatch
9049 if ( s.crossDomain == null ) {
9050 parts = rurl.exec( s.url.toLowerCase() );
9051 s.crossDomain = !!( parts &&
9052 ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
9053 ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !==
9054 ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) )
9055 );
9056 }
9057
9058 // Convert data if not already a string
9059 if ( s.data && s.processData && typeof s.data !== "string" ) {
9060 s.data = jQuery.param( s.data, s.traditional );
9061 }
9062
9063 // Apply prefilters
9064 inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
9065
9066 // If request was aborted inside a prefilter, stop there
9067 if ( state === 2 ) {
9068 return jqXHR;
9069 }
9070
9071 // We can fire global events as of now if asked to
9072 fireGlobals = s.global;
9073
9074 // Watch for a new set of requests
9075 if ( fireGlobals && jQuery.active++ === 0 ) {
9076 jQuery.event.trigger("ajaxStart");
9077 }
9078
9079 // Uppercase the type
9080 s.type = s.type.toUpperCase();
9081
9082 // Determine if request has content
9083 s.hasContent = !rnoContent.test( s.type );
9084
9085 // Save the URL in case we're toying with the If-Modified-Since
9086 // and/or If-None-Match header later on
9087 cacheURL = s.url;
9088
9089 // More options handling for requests with no content
9090 if ( !s.hasContent ) {
9091
9092 // If data is available, append data to url
9093 if ( s.data ) {
9094 cacheURL = ( s.url += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
9095 // #9682: remove data so that it's not used in an eventual retry
9096 delete s.data;
9097 }
9098
9099 // Add anti-cache in url if needed
9100 if ( s.cache === false ) {
9101 s.url = rts.test( cacheURL ) ?
9102
9103 // If there is already a '_' parameter, set its value
9104 cacheURL.replace( rts, "$1_=" + nonce++ ) :
9105
9106 // Otherwise add one to the end
9107 cacheURL + ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + nonce++;
9108 }
9109 }
9110
9111 // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
9112 if ( s.ifModified ) {
9113 if ( jQuery.lastModified[ cacheURL ] ) {
9114 jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
9115 }
9116 if ( jQuery.etag[ cacheURL ] ) {
9117 jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
9118 }
9119 }
9120
9121 // Set the correct header, if data is being sent
9122 if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
9123 jqXHR.setRequestHeader( "Content-Type", s.contentType );
9124 }
9125
9126 // Set the Accepts header for the server, depending on the dataType
9127 jqXHR.setRequestHeader(
9128 "Accept",
9129 s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
9130 s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
9131 s.accepts[ "*" ]
9132 );
9133
9134 // Check for headers option
9135 for ( i in s.headers ) {
9136 jqXHR.setRequestHeader( i, s.headers[ i ] );
9137 }
9138
9139 // Allow custom headers/mimetypes and early abort
9140 if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
9141 // Abort if not done already and return
9142 return jqXHR.abort();
9143 }
9144
9145 // aborting is no longer a cancellation
9146 strAbort = "abort";
9147
9148 // Install callbacks on deferreds
9149 for ( i in { success: 1, error: 1, complete: 1 } ) {
9150 jqXHR[ i ]( s[ i ] );
9151 }
9152
9153 // Get transport
9154 transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
9155
9156 // If no transport, we auto-abort
9157 if ( !transport ) {
9158 done( -1, "No Transport" );
9159 } else {
9160 jqXHR.readyState = 1;
9161
9162 // Send global event
9163 if ( fireGlobals ) {
9164 globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
9165 }
9166 // Timeout
9167 if ( s.async && s.timeout > 0 ) {
9168 timeoutTimer = setTimeout(function() {
9169 jqXHR.abort("timeout");
9170 }, s.timeout );
9171 }
9172
9173 try {
9174 state = 1;
9175 transport.send( requestHeaders, done );
9176 } catch ( e ) {
9177 // Propagate exception as error if not done
9178 if ( state < 2 ) {
9179 done( -1, e );
9180 // Simply rethrow otherwise
9181 } else {
9182 throw e;
9183 }
9184 }
9185 }
9186
9187 // Callback for when everything is done
9188 function done( status, nativeStatusText, responses, headers ) {
9189 var isSuccess, success, error, response, modified,
9190 statusText = nativeStatusText;
9191
9192 // Called once
9193 if ( state === 2 ) {
9194 return;
9195 }
9196
9197 // State is "done" now
9198 state = 2;
9199
9200 // Clear timeout if it exists
9201 if ( timeoutTimer ) {
9202 clearTimeout( timeoutTimer );
9203 }
9204
9205 // Dereference transport for early garbage collection
9206 // (no matter how long the jqXHR object will be used)
9207 transport = undefined;
9208
9209 // Cache response headers
9210 responseHeadersString = headers || "";
9211
9212 // Set readyState
9213 jqXHR.readyState = status > 0 ? 4 : 0;
9214
9215 // Determine if successful
9216 isSuccess = status >= 200 && status < 300 || status === 304;
9217
9218 // Get response data
9219 if ( responses ) {
9220 response = ajaxHandleResponses( s, jqXHR, responses );
9221 }
9222
9223 // Convert no matter what (that way responseXXX fields are always set)
9224 response = ajaxConvert( s, response, jqXHR, isSuccess );
9225
9226 // If successful, handle type chaining
9227 if ( isSuccess ) {
9228
9229 // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
9230 if ( s.ifModified ) {
9231 modified = jqXHR.getResponseHeader("Last-Modified");
9232 if ( modified ) {
9233 jQuery.lastModified[ cacheURL ] = modified;
9234 }
9235 modified = jqXHR.getResponseHeader("etag");
9236 if ( modified ) {
9237 jQuery.etag[ cacheURL ] = modified;
9238 }
9239 }
9240
9241 // if no content
9242 if ( status === 204 || s.type === "HEAD" ) {
9243 statusText = "nocontent";
9244
9245 // if not modified
9246 } else if ( status === 304 ) {
9247 statusText = "notmodified";
9248
9249 // If we have data, let's convert it
9250 } else {
9251 statusText = response.state;
9252 success = response.data;
9253 error = response.error;
9254 isSuccess = !error;
9255 }
9256 } else {
9257 // We extract error from statusText
9258 // then normalize statusText and status for non-aborts
9259 error = statusText;
9260 if ( status || !statusText ) {
9261 statusText = "error";
9262 if ( status < 0 ) {
9263 status = 0;
9264 }
9265 }
9266 }
9267
9268 // Set data for the fake xhr object
9269 jqXHR.status = status;
9270 jqXHR.statusText = ( nativeStatusText || statusText ) + "";
9271
9272 // Success/Error
9273 if ( isSuccess ) {
9274 deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
9275 } else {
9276 deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
9277 }
9278
9279 // Status-dependent callbacks
9280 jqXHR.statusCode( statusCode );
9281 statusCode = undefined;
9282
9283 if ( fireGlobals ) {
9284 globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
9285 [ jqXHR, s, isSuccess ? success : error ] );
9286 }
9287
9288 // Complete
9289 completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
9290
9291 if ( fireGlobals ) {
9292 globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
9293 // Handle the global AJAX counter
9294 if ( !( --jQuery.active ) ) {
9295 jQuery.event.trigger("ajaxStop");
9296 }
9297 }
9298 }
9299
9300 return jqXHR;
9301 },
9302
9303 getJSON: function( url, data, callback ) {
9304 return jQuery.get( url, data, callback, "json" );
9305 },
9306
9307 getScript: function( url, callback ) {
9308 return jQuery.get( url, undefined, callback, "script" );
9309 }
9310 });
9311
9312 jQuery.each( [ "get", "post" ], function( i, method ) {
9313 jQuery[ method ] = function( url, data, callback, type ) {
9314 // shift arguments if data argument was omitted
9315 if ( jQuery.isFunction( data ) ) {
9316 type = type || callback;
9317 callback = data;
9318 data = undefined;
9319 }
9320
9321 return jQuery.ajax({
9322 url: url,
9323 type: method,
9324 dataType: type,
9325 data: data,
9326 success: callback
9327 });
9328 };
9329 });
9330
9331 // Attach a bunch of functions for handling common AJAX events
9332 jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) {
9333 jQuery.fn[ type ] = function( fn ) {
9334 return this.on( type, fn );
9335 };
9336 });
9337
9338
9339 jQuery._evalUrl = function( url ) {
9340 return jQuery.ajax({
9341 url: url,
9342 type: "GET",
9343 dataType: "script",
9344 async: false,
9345 global: false,
9346 "throws": true
9347 });
9348 };
9349
9350
9351 jQuery.fn.extend({
9352 wrapAll: function( html ) {
9353 if ( jQuery.isFunction( html ) ) {
9354 return this.each(function(i) {
9355 jQuery(this).wrapAll( html.call(this, i) );
9356 });
9357 }
9358
9359 if ( this[0] ) {
9360 // The elements to wrap the target around
9361 var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
9362
9363 if ( this[0].parentNode ) {
9364 wrap.insertBefore( this[0] );
9365 }
9366
9367 wrap.map(function() {
9368 var elem = this;
9369
9370 while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
9371 elem = elem.firstChild;
9372 }
9373
9374 return elem;
9375 }).append( this );
9376 }
9377
9378 return this;
9379 },
9380
9381 wrapInner: function( html ) {
9382 if ( jQuery.isFunction( html ) ) {
9383 return this.each(function(i) {
9384 jQuery(this).wrapInner( html.call(this, i) );
9385 });
9386 }
9387
9388 return this.each(function() {
9389 var self = jQuery( this ),
9390 contents = self.contents();
9391
9392 if ( contents.length ) {
9393 contents.wrapAll( html );
9394
9395 } else {
9396 self.append( html );
9397 }
9398 });
9399 },
9400
9401 wrap: function( html ) {
9402 var isFunction = jQuery.isFunction( html );
9403
9404 return this.each(function(i) {
9405 jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
9406 });
9407 },
9408
9409 unwrap: function() {
9410 return this.parent().each(function() {
9411 if ( !jQuery.nodeName( this, "body" ) ) {
9412 jQuery( this ).replaceWith( this.childNodes );
9413 }
9414 }).end();
9415 }
9416 });
9417
9418
9419 jQuery.expr.filters.hidden = function( elem ) {
9420 // Support: Opera <= 12.12
9421 // Opera reports offsetWidths and offsetHeights less than zero on some elements
9422 return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 ||
9423 (!support.reliableHiddenOffsets() &&
9424 ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");
9425 };
9426
9427 jQuery.expr.filters.visible = function( elem ) {
9428 return !jQuery.expr.filters.hidden( elem );
9429 };
9430
9431
9432
9433
9434 var r20 = /%20/g,
9435 rbracket = /\[\]$/,
9436 rCRLF = /\r?\n/g,
9437 rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
9438 rsubmittable = /^(?:input|select|textarea|keygen)/i;
9439
9440 function buildParams( prefix, obj, traditional, add ) {
9441 var name;
9442
9443 if ( jQuery.isArray( obj ) ) {
9444 // Serialize array item.
9445 jQuery.each( obj, function( i, v ) {
9446 if ( traditional || rbracket.test( prefix ) ) {
9447 // Treat each array item as a scalar.
9448 add( prefix, v );
9449
9450 } else {
9451 // Item is non-scalar (array or object), encode its numeric index.
9452 buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
9453 }
9454 });
9455
9456 } else if ( !traditional && jQuery.type( obj ) === "object" ) {
9457 // Serialize object item.
9458 for ( name in obj ) {
9459 buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
9460 }
9461
9462 } else {
9463 // Serialize scalar item.
9464 add( prefix, obj );
9465 }
9466 }
9467
9468 // Serialize an array of form elements or a set of
9469 // key/values into a query string
9470 jQuery.param = function( a, traditional ) {
9471 var prefix,
9472 s = [],
9473 add = function( key, value ) {
9474 // If value is a function, invoke it and return its value
9475 value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
9476 s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
9477 };
9478
9479 // Set traditional to true for jQuery <= 1.3.2 behavior.
9480 if ( traditional === undefined ) {
9481 traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
9482 }
9483
9484 // If an array was passed in, assume that it is an array of form elements.
9485 if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
9486 // Serialize the form elements
9487 jQuery.each( a, function() {
9488 add( this.name, this.value );
9489 });
9490
9491 } else {
9492 // If traditional, encode the "old" way (the way 1.3.2 or older
9493 // did it), otherwise encode params recursively.
9494 for ( prefix in a ) {
9495 buildParams( prefix, a[ prefix ], traditional, add );
9496 }
9497 }
9498
9499 // Return the resulting serialization
9500 return s.join( "&" ).replace( r20, "+" );
9501 };
9502
9503 jQuery.fn.extend({
9504 serialize: function() {
9505 return jQuery.param( this.serializeArray() );
9506 },
9507 serializeArray: function() {
9508 return this.map(function() {
9509 // Can add propHook for "elements" to filter or add form elements
9510 var elements = jQuery.prop( this, "elements" );
9511 return elements ? jQuery.makeArray( elements ) : this;
9512 })
9513 .filter(function() {
9514 var type = this.type;
9515 // Use .is(":disabled") so that fieldset[disabled] works
9516 return this.name && !jQuery( this ).is( ":disabled" ) &&
9517 rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
9518 ( this.checked || !rcheckableType.test( type ) );
9519 })
9520 .map(function( i, elem ) {
9521 var val = jQuery( this ).val();
9522
9523 return val == null ?
9524 null :
9525 jQuery.isArray( val ) ?
9526 jQuery.map( val, function( val ) {
9527 return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
9528 }) :
9529 { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
9530 }).get();
9531 }
9532 });
9533
9534
9535 // Create the request object
9536 // (This is still attached to ajaxSettings for backward compatibility)
9537 jQuery.ajaxSettings.xhr = window.ActiveXObject !== undefined ?
9538 // Support: IE6+
9539 function() {
9540
9541 // XHR cannot access local files, always use ActiveX for that case
9542 return !this.isLocal &&
9543
9544 // Support: IE7-8
9545 // oldIE XHR does not support non-RFC2616 methods (#13240)
9546 // See http://msdn.microsoft.com/en-us/library/ie/ms536648(v=vs.85).aspx
9547 // and http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9
9548 // Although this check for six methods instead of eight
9549 // since IE also does not support "trace" and "connect"
9550 /^(get|post|head|put|delete|options)$/i.test( this.type ) &&
9551
9552 createStandardXHR() || createActiveXHR();
9553 } :
9554 // For all other browsers, use the standard XMLHttpRequest object
9555 createStandardXHR;
9556
9557 var xhrId = 0,
9558 xhrCallbacks = {},
9559 xhrSupported = jQuery.ajaxSettings.xhr();
9560
9561 // Support: IE<10
9562 // Open requests must be manually aborted on unload (#5280)
9563 if ( window.ActiveXObject ) {
9564 jQuery( window ).on( "unload", function() {
9565 for ( var key in xhrCallbacks ) {
9566 xhrCallbacks[ key ]( undefined, true );
9567 }
9568 });
9569 }
9570
9571 // Determine support properties
9572 support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
9573 xhrSupported = support.ajax = !!xhrSupported;
9574
9575 // Create transport if the browser can provide an xhr
9576 if ( xhrSupported ) {
9577
9578 jQuery.ajaxTransport(function( options ) {
9579 // Cross domain only allowed if supported through XMLHttpRequest
9580 if ( !options.crossDomain || support.cors ) {
9581
9582 var callback;
9583
9584 return {
9585 send: function( headers, complete ) {
9586 var i,
9587 xhr = options.xhr(),
9588 id = ++xhrId;
9589
9590 // Open the socket
9591 xhr.open( options.type, options.url, options.async, options.username, options.password );
9592
9593 // Apply custom fields if provided
9594 if ( options.xhrFields ) {
9595 for ( i in options.xhrFields ) {
9596 xhr[ i ] = options.xhrFields[ i ];
9597 }
9598 }
9599
9600 // Override mime type if needed
9601 if ( options.mimeType && xhr.overrideMimeType ) {
9602 xhr.overrideMimeType( options.mimeType );
9603 }
9604
9605 // X-Requested-With header
9606 // For cross-domain requests, seeing as conditions for a preflight are
9607 // akin to a jigsaw puzzle, we simply never set it to be sure.
9608 // (it can always be set on a per-request basis or even using ajaxSetup)
9609 // For same-domain requests, won't change header if already provided.
9610 if ( !options.crossDomain && !headers["X-Requested-With"] ) {
9611 headers["X-Requested-With"] = "XMLHttpRequest";
9612 }
9613
9614 // Set headers
9615 for ( i in headers ) {
9616 // Support: IE<9
9617 // IE's ActiveXObject throws a 'Type Mismatch' exception when setting
9618 // request header to a null-value.
9619 //
9620 // To keep consistent with other XHR implementations, cast the value
9621 // to string and ignore `undefined`.
9622 if ( headers[ i ] !== undefined ) {
9623 xhr.setRequestHeader( i, headers[ i ] + "" );
9624 }
9625 }
9626
9627 // Do send the request
9628 // This may raise an exception which is actually
9629 // handled in jQuery.ajax (so no try/catch here)
9630 xhr.send( ( options.hasContent && options.data ) || null );
9631
9632 // Listener
9633 callback = function( _, isAbort ) {
9634 var status, statusText, responses;
9635
9636 // Was never called and is aborted or complete
9637 if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
9638 // Clean up
9639 delete xhrCallbacks[ id ];
9640 callback = undefined;
9641 xhr.onreadystatechange = jQuery.noop;
9642
9643 // Abort manually if needed
9644 if ( isAbort ) {
9645 if ( xhr.readyState !== 4 ) {
9646 xhr.abort();
9647 }
9648 } else {
9649 responses = {};
9650 status = xhr.status;
9651
9652 // Support: IE<10
9653 // Accessing binary-data responseText throws an exception
9654 // (#11426)
9655 if ( typeof xhr.responseText === "string" ) {
9656 responses.text = xhr.responseText;
9657 }
9658
9659 // Firefox throws an exception when accessing
9660 // statusText for faulty cross-domain requests
9661 try {
9662 statusText = xhr.statusText;
9663 } catch( e ) {
9664 // We normalize with Webkit giving an empty statusText
9665 statusText = "";
9666 }
9667
9668 // Filter status for non standard behaviors
9669
9670 // If the request is local and we have data: assume a success
9671 // (success with no data won't get notified, that's the best we
9672 // can do given current implementations)
9673 if ( !status && options.isLocal && !options.crossDomain ) {
9674 status = responses.text ? 200 : 404;
9675 // IE - #1450: sometimes returns 1223 when it should be 204
9676 } else if ( status === 1223 ) {
9677 status = 204;
9678 }
9679 }
9680 }
9681
9682 // Call complete if needed
9683 if ( responses ) {
9684 complete( status, statusText, responses, xhr.getAllResponseHeaders() );
9685 }
9686 };
9687
9688 if ( !options.async ) {
9689 // if we're in sync mode we fire the callback
9690 callback();
9691 } else if ( xhr.readyState === 4 ) {
9692 // (IE6 & IE7) if it's in cache and has been
9693 // retrieved directly we need to fire the callback
9694 setTimeout( callback );
9695 } else {
9696 // Add to the list of active xhr callbacks
9697 xhr.onreadystatechange = xhrCallbacks[ id ] = callback;
9698 }
9699 },
9700
9701 abort: function() {
9702 if ( callback ) {
9703 callback( undefined, true );
9704 }
9705 }
9706 };
9707 }
9708 });
9709 }
9710
9711 // Functions to create xhrs
9712 function createStandardXHR() {
9713 try {
9714 return new window.XMLHttpRequest();
9715 } catch( e ) {}
9716 }
9717
9718 function createActiveXHR() {
9719 try {
9720 return new window.ActiveXObject( "Microsoft.XMLHTTP" );
9721 } catch( e ) {}
9722 }
9723
9724
9725
9726
9727 // Install script dataType
9728 jQuery.ajaxSetup({
9729 accepts: {
9730 script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
9731 },
9732 contents: {
9733 script: /(?:java|ecma)script/
9734 },
9735 converters: {
9736 "text script": function( text ) {
9737 jQuery.globalEval( text );
9738 return text;
9739 }
9740 }
9741 });
9742
9743 // Handle cache's special case and global
9744 jQuery.ajaxPrefilter( "script", function( s ) {
9745 if ( s.cache === undefined ) {
9746 s.cache = false;
9747 }
9748 if ( s.crossDomain ) {
9749 s.type = "GET";
9750 s.global = false;
9751 }
9752 });
9753
9754 // Bind script tag hack transport
9755 jQuery.ajaxTransport( "script", function(s) {
9756
9757 // This transport only deals with cross domain requests
9758 if ( s.crossDomain ) {
9759
9760 var script,
9761 head = document.head || jQuery("head")[0] || document.documentElement;
9762
9763 return {
9764
9765 send: function( _, callback ) {
9766
9767 script = document.createElement("script");
9768
9769 script.async = true;
9770
9771 if ( s.scriptCharset ) {
9772 script.charset = s.scriptCharset;
9773 }
9774
9775 script.src = s.url;
9776
9777 // Attach handlers for all browsers
9778 script.onload = script.onreadystatechange = function( _, isAbort ) {
9779
9780 if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
9781
9782 // Handle memory leak in IE
9783 script.onload = script.onreadystatechange = null;
9784
9785 // Remove the script
9786 if ( script.parentNode ) {
9787 script.parentNode.removeChild( script );
9788 }
9789
9790 // Dereference the script
9791 script = null;
9792
9793 // Callback if not abort
9794 if ( !isAbort ) {
9795 callback( 200, "success" );
9796 }
9797 }
9798 };
9799
9800 // Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending
9801 // Use native DOM manipulation to avoid our domManip AJAX trickery
9802 head.insertBefore( script, head.firstChild );
9803 },
9804
9805 abort: function() {
9806 if ( script ) {
9807 script.onload( undefined, true );
9808 }
9809 }
9810 };
9811 }
9812 });
9813
9814
9815
9816
9817 var oldCallbacks = [],
9818 rjsonp = /(=)\?(?=&|$)|\?\?/;
9819
9820 // Default jsonp settings
9821 jQuery.ajaxSetup({
9822 jsonp: "callback",
9823 jsonpCallback: function() {
9824 var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );
9825 this[ callback ] = true;
9826 return callback;
9827 }
9828 });
9829
9830 // Detect, normalize options and install callbacks for jsonp requests
9831 jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
9832
9833 var callbackName, overwritten, responseContainer,
9834 jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
9835 "url" :
9836 typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data"
9837 );
9838
9839 // Handle iff the expected data type is "jsonp" or we have a parameter to set
9840 if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
9841
9842 // Get callback name, remembering preexisting value associated with it
9843 callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
9844 s.jsonpCallback() :
9845 s.jsonpCallback;
9846
9847 // Insert callback into url or form data
9848 if ( jsonProp ) {
9849 s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
9850 } else if ( s.jsonp !== false ) {
9851 s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
9852 }
9853
9854 // Use data converter to retrieve json after script execution
9855 s.converters["script json"] = function() {
9856 if ( !responseContainer ) {
9857 jQuery.error( callbackName + " was not called" );
9858 }
9859 return responseContainer[ 0 ];
9860 };
9861
9862 // force json dataType
9863 s.dataTypes[ 0 ] = "json";
9864
9865 // Install callback
9866 overwritten = window[ callbackName ];
9867 window[ callbackName ] = function() {
9868 responseContainer = arguments;
9869 };
9870
9871 // Clean-up function (fires after converters)
9872 jqXHR.always(function() {
9873 // Restore preexisting value
9874 window[ callbackName ] = overwritten;
9875
9876 // Save back as free
9877 if ( s[ callbackName ] ) {
9878 // make sure that re-using the options doesn't screw things around
9879 s.jsonpCallback = originalSettings.jsonpCallback;
9880
9881 // save the callback name for future use
9882 oldCallbacks.push( callbackName );
9883 }
9884
9885 // Call if it was a function and we have a response
9886 if ( responseContainer && jQuery.isFunction( overwritten ) ) {
9887 overwritten( responseContainer[ 0 ] );
9888 }
9889
9890 responseContainer = overwritten = undefined;
9891 });
9892
9893 // Delegate to script
9894 return "script";
9895 }
9896 });
9897
9898
9899
9900
9901 // data: string of html
9902 // context (optional): If specified, the fragment will be created in this context, defaults to document
9903 // keepScripts (optional): If true, will include scripts passed in the html string
9904 jQuery.parseHTML = function( data, context, keepScripts ) {
9905 if ( !data || typeof data !== "string" ) {
9906 return null;
9907 }
9908 if ( typeof context === "boolean" ) {
9909 keepScripts = context;
9910 context = false;
9911 }
9912 context = context || document;
9913
9914 var parsed = rsingleTag.exec( data ),
9915 scripts = !keepScripts && [];
9916
9917 // Single tag
9918 if ( parsed ) {
9919 return [ context.createElement( parsed[1] ) ];
9920 }
9921
9922 parsed = jQuery.buildFragment( [ data ], context, scripts );
9923
9924 if ( scripts && scripts.length ) {
9925 jQuery( scripts ).remove();
9926 }
9927
9928 return jQuery.merge( [], parsed.childNodes );
9929 };
9930
9931
9932 // Keep a copy of the old load method
9933 var _load = jQuery.fn.load;
9934
9935 /**
9936 * Load a url into a page
9937 */
9938 jQuery.fn.load = function( url, params, callback ) {
9939 if ( typeof url !== "string" && _load ) {
9940 return _load.apply( this, arguments );
9941 }
9942
9943 var selector, response, type,
9944 self = this,
9945 off = url.indexOf(" ");
9946
9947 if ( off >= 0 ) {
9948 selector = jQuery.trim( url.slice( off, url.length ) );
9949 url = url.slice( 0, off );
9950 }
9951
9952 // If it's a function
9953 if ( jQuery.isFunction( params ) ) {
9954
9955 // We assume that it's the callback
9956 callback = params;
9957 params = undefined;
9958
9959 // Otherwise, build a param string
9960 } else if ( params && typeof params === "object" ) {
9961 type = "POST";
9962 }
9963
9964 // If we have elements to modify, make the request
9965 if ( self.length > 0 ) {
9966 jQuery.ajax({
9967 url: url,
9968
9969 // if "type" variable is undefined, then "GET" method will be used
9970 type: type,
9971 dataType: "html",
9972 data: params
9973 }).done(function( responseText ) {
9974
9975 // Save response for use in complete callback
9976 response = arguments;
9977
9978 self.html( selector ?
9979
9980 // If a selector was specified, locate the right elements in a dummy div
9981 // Exclude scripts to avoid IE 'Permission Denied' errors
9982 jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) :
9983
9984 // Otherwise use the full result
9985 responseText );
9986
9987 }).complete( callback && function( jqXHR, status ) {
9988 self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
9989 });
9990 }
9991
9992 return this;
9993 };
9994
9995
9996
9997
9998 jQuery.expr.filters.animated = function( elem ) {
9999 return jQuery.grep(jQuery.timers, function( fn ) {
10000 return elem === fn.elem;
10001 }).length;
10002 };
10003
10004
10005
10006
10007
10008 var docElem = window.document.documentElement;
10009
10010 /**
10011 * Gets a window from an element
10012 */
10013 function getWindow( elem ) {
10014 return jQuery.isWindow( elem ) ?
10015 elem :
10016 elem.nodeType === 9 ?
10017 elem.defaultView || elem.parentWindow :
10018 false;
10019 }
10020
10021 jQuery.offset = {
10022 setOffset: function( elem, options, i ) {
10023 var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
10024 position = jQuery.css( elem, "position" ),
10025 curElem = jQuery( elem ),
10026 props = {};
10027
10028 // set position first, in-case top/left are set even on static elem
10029 if ( position === "static" ) {
10030 elem.style.position = "relative";
10031 }
10032
10033 curOffset = curElem.offset();
10034 curCSSTop = jQuery.css( elem, "top" );
10035 curCSSLeft = jQuery.css( elem, "left" );
10036 calculatePosition = ( position === "absolute" || position === "fixed" ) &&
10037 jQuery.inArray("auto", [ curCSSTop, curCSSLeft ] ) > -1;
10038
10039 // need to be able to calculate position if either top or left is auto and position is either absolute or fixed
10040 if ( calculatePosition ) {
10041 curPosition = curElem.position();
10042 curTop = curPosition.top;
10043 curLeft = curPosition.left;
10044 } else {
10045 curTop = parseFloat( curCSSTop ) || 0;
10046 curLeft = parseFloat( curCSSLeft ) || 0;
10047 }
10048
10049 if ( jQuery.isFunction( options ) ) {
10050 options = options.call( elem, i, curOffset );
10051 }
10052
10053 if ( options.top != null ) {
10054 props.top = ( options.top - curOffset.top ) + curTop;
10055 }
10056 if ( options.left != null ) {
10057 props.left = ( options.left - curOffset.left ) + curLeft;
10058 }
10059
10060 if ( "using" in options ) {
10061 options.using.call( elem, props );
10062 } else {
10063 curElem.css( props );
10064 }
10065 }
10066 };
10067
10068 jQuery.fn.extend({
10069 offset: function( options ) {
10070 if ( arguments.length ) {
10071 return options === undefined ?
10072 this :
10073 this.each(function( i ) {
10074 jQuery.offset.setOffset( this, options, i );
10075 });
10076 }
10077
10078 var docElem, win,
10079 box = { top: 0, left: 0 },
10080 elem = this[ 0 ],
10081 doc = elem && elem.ownerDocument;
10082
10083 if ( !doc ) {
10084 return;
10085 }
10086
10087 docElem = doc.documentElement;
10088
10089 // Make sure it's not a disconnected DOM node
10090 if ( !jQuery.contains( docElem, elem ) ) {
10091 return box;
10092 }
10093
10094 // If we don't have gBCR, just use 0,0 rather than error
10095 // BlackBerry 5, iOS 3 (original iPhone)
10096 if ( typeof elem.getBoundingClientRect !== strundefined ) {
10097 box = elem.getBoundingClientRect();
10098 }
10099 win = getWindow( doc );
10100 return {
10101 top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ),
10102 left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )
10103 };
10104 },
10105
10106 position: function() {
10107 if ( !this[ 0 ] ) {
10108 return;
10109 }
10110
10111 var offsetParent, offset,
10112 parentOffset = { top: 0, left: 0 },
10113 elem = this[ 0 ];
10114
10115 // fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is its only offset parent
10116 if ( jQuery.css( elem, "position" ) === "fixed" ) {
10117 // we assume that getBoundingClientRect is available when computed position is fixed
10118 offset = elem.getBoundingClientRect();
10119 } else {
10120 // Get *real* offsetParent
10121 offsetParent = this.offsetParent();
10122
10123 // Get correct offsets
10124 offset = this.offset();
10125 if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
10126 parentOffset = offsetParent.offset();
10127 }
10128
10129 // Add offsetParent borders
10130 parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
10131 parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
10132 }
10133
10134 // Subtract parent offsets and element margins
10135 // note: when an element has margin: auto the offsetLeft and marginLeft
10136 // are the same in Safari causing offset.left to incorrectly be 0
10137 return {
10138 top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
10139 left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true)
10140 };
10141 },
10142
10143 offsetParent: function() {
10144 return this.map(function() {
10145 var offsetParent = this.offsetParent || docElem;
10146
10147 while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position" ) === "static" ) ) {
10148 offsetParent = offsetParent.offsetParent;
10149 }
10150 return offsetParent || docElem;
10151 });
10152 }
10153 });
10154
10155 // Create scrollLeft and scrollTop methods
10156 jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
10157 var top = /Y/.test( prop );
10158
10159 jQuery.fn[ method ] = function( val ) {
10160 return access( this, function( elem, method, val ) {
10161 var win = getWindow( elem );
10162
10163 if ( val === undefined ) {
10164 return win ? (prop in win) ? win[ prop ] :
10165 win.document.documentElement[ method ] :
10166 elem[ method ];
10167 }
10168
10169 if ( win ) {
10170 win.scrollTo(
10171 !top ? val : jQuery( win ).scrollLeft(),
10172 top ? val : jQuery( win ).scrollTop()
10173 );
10174
10175 } else {
10176 elem[ method ] = val;
10177 }
10178 }, method, val, arguments.length, null );
10179 };
10180 });
10181
10182 // Add the top/left cssHooks using jQuery.fn.position
10183 // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
10184 // getComputedStyle returns percent when specified for top/left/bottom/right
10185 // rather than make the css module depend on the offset module, we just check for it here
10186 jQuery.each( [ "top", "left" ], function( i, prop ) {
10187 jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
10188 function( elem, computed ) {
10189 if ( computed ) {
10190 computed = curCSS( elem, prop );
10191 // if curCSS returns percentage, fallback to offset
10192 return rnumnonpx.test( computed ) ?
10193 jQuery( elem ).position()[ prop ] + "px" :
10194 computed;
10195 }
10196 }
10197 );
10198 });
10199
10200
10201 // Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
10202 jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
10203 jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
10204 // margin is only for outerHeight, outerWidth
10205 jQuery.fn[ funcName ] = function( margin, value ) {
10206 var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
10207 extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
10208
10209 return access( this, function( elem, type, value ) {
10210 var doc;
10211
10212 if ( jQuery.isWindow( elem ) ) {
10213 // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
10214 // isn't a whole lot we can do. See pull request at this URL for discussion:
10215 // https://github.com/jquery/jquery/pull/764
10216 return elem.document.documentElement[ "client" + name ];
10217 }
10218
10219 // Get document width or height
10220 if ( elem.nodeType === 9 ) {
10221 doc = elem.documentElement;
10222
10223 // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest
10224 // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.
10225 return Math.max(
10226 elem.body[ "scroll" + name ], doc[ "scroll" + name ],
10227 elem.body[ "offset" + name ], doc[ "offset" + name ],
10228 doc[ "client" + name ]
10229 );
10230 }
10231
10232 return value === undefined ?
10233 // Get width or height on the element, requesting but not forcing parseFloat
10234 jQuery.css( elem, type, extra ) :
10235
10236 // Set width or height on the element
10237 jQuery.style( elem, type, value, extra );
10238 }, type, chainable ? margin : undefined, chainable, null );
10239 };
10240 });
10241 });
10242
10243
10244 // The number of elements contained in the matched element set
10245 jQuery.fn.size = function() {
10246 return this.length;
10247 };
10248
10249 jQuery.fn.andSelf = jQuery.fn.addBack;
10250
10251
10252
10253
10254 // Register as a named AMD module, since jQuery can be concatenated with other
10255 // files that may use define, but not via a proper concatenation script that
10256 // understands anonymous AMD modules. A named AMD is safest and most robust
10257 // way to register. Lowercase jquery is used because AMD module names are
10258 // derived from file names, and jQuery is normally delivered in a lowercase
10259 // file name. Do this after creating the global so that if an AMD module wants
10260 // to call noConflict to hide this version of jQuery, it will work.
10261
10262 // Note that for maximum portability, libraries that are not jQuery should
10263 // declare themselves as anonymous modules, and avoid setting a global if an
10264 // AMD loader is present. jQuery is a special case. For more information, see
10265 // https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
10266
10267 if ( typeof define === "function" && define.amd ) {
10268 define( "jquery", [], function() {
10269 return jQuery;
10270 });
10271 }
10272
10273
10274
10275
10276 var
10277 // Map over jQuery in case of overwrite
10278 _jQuery = window.jQuery,
10279
10280 // Map over the $ in case of overwrite
10281 _$ = window.$;
10282
10283 jQuery.noConflict = function( deep ) {
10284 if ( window.$ === jQuery ) {
10285 window.$ = _$;
10286 }
10287
10288 if ( deep && window.jQuery === jQuery ) {
10289 window.jQuery = _jQuery;
10290 }
10291
10292 return jQuery;
10293 };
10294
10295 // Expose jQuery and $ identifiers, even in
10296 // AMD (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
10297 // and CommonJS for browser emulators (#13566)
10298 if ( typeof noGlobal === strundefined ) {
10299 window.jQuery = window.$ = jQuery;
10300 }
10301
10302
10303
10304
10305 return jQuery;
10306
10307 }));
+0
-4
doc/build/html/_static/jquery.js less more
0 /*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
1 !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=''><option selected=''></option></select>",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;
2 if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=m._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==cb()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===cb()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return m.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ab:bb):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:bb,isPropagationStopped:bb,isImmediatePropagationStopped:bb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ab,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ab,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ab,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,"form")?!1:void m.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=m.nodeName(b,"input")||m.nodeName(b,"button")?b.form:void 0;c&&!m._data(c,"submitBubbles")&&(m.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),m._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,"form")?!1:void m.event.remove(this,"._submit")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(m.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate("change",this,a,!0)})),!1):void m.event.add(this,"beforeactivate._change",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,"changeBubbles")&&(m.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate("change",this.parentNode,a,!0)}),m._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,"._change"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=bb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=bb),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function db(a){var b=eb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var eb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fb=/ jQuery\d+="(?:null|\d+)"/g,gb=new RegExp("<(?:"+eb+")[\\s/>]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/<tbody/i,lb=/<|&#?\w+;/,mb=/<(?:script|style|link)/i,nb=/checked\s*(?:[^=]|=\s*.checked.)/i,ob=/^$|\/(?:java|ecma)script/i,pb=/^true\/(.*)/,qb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,rb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:k.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?"<table>"!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Cb[0].contentWindow||Cb[0].contentDocument).document,b.write(),b.close(),c=Eb(a,b),Cb.detach()),Db[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Gb=/^margin/,Hb=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ib,Jb,Kb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ib=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Hb.test(g)&&Gb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ib=function(a){return a.currentStyle},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Hb.test(g)&&!Kb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Lb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Mb=/alpha\([^)]*\)/i,Nb=/opacity\s*=\s*([^)]*)/,Ob=/^(none|table(?!-c[ea]).+)/,Pb=new RegExp("^("+S+")(.*)$","i"),Qb=new RegExp("^([+-])=("+S+")","i"),Rb={position:"absolute",visibility:"hidden",display:"block"},Sb={letterSpacing:"0",fontWeight:"400"},Tb=["Webkit","O","Moz","ms"];function Ub(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Tb.length;while(e--)if(b=Tb[e]+c,b in a)return b;return d}function Vb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fb(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Wb(a,b,c){var d=Pb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Yb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ib(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Jb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Hb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xb(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Jb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ub(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ub(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Jb(a,b,d)),"normal"===f&&b in Sb&&(f=Sb[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Ob.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Rb,function(){return Yb(a,b,d)}):Yb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ib(a);return Wb(a,c,d?Xb(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Nb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Mb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Mb.test(f)?f.replace(Mb,e):f+" "+e)}}),m.cssHooks.marginRight=Lb(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Jb,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Gb.test(a)||(m.cssHooks[a+b].set=Wb)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ib(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Vb(this,!0)},hide:function(){return Vb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Zb(a,b,c,d,e){return new Zb.prototype.init(a,b,c,d,e)}m.Tween=Zb,Zb.prototype={constructor:Zb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px")
3 },cur:function(){var a=Zb.propHooks[this.prop];return a&&a.get?a.get(this):Zb.propHooks._default.get(this)},run:function(a){var b,c=Zb.propHooks[this.prop];return this.pos=b=this.options.duration?m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Zb.propHooks._default.set(this),this}},Zb.prototype.init.prototype=Zb.prototype,Zb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Zb.propHooks.scrollTop=Zb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Zb.prototype.init,m.fx.step={};var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cc=/queueHooks$/,dc=[ic],ec={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bc.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bc.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fc(){return setTimeout(function(){$b=void 0}),$b=m.now()}function gc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hc(a,b,c){for(var d,e=(ec[b]||[]).concat(ec["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ic(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fb(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fb(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ac.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fb(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hc(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jc(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kc(a,b,c){var d,e,f=0,g=dc.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$b||fc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$b||fc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jc(k,j.opts.specialEasing);g>f;f++)if(d=dc[f].call(j,a,k,j.opts))return d;return m.map(k,hc,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kc,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],ec[c]=ec[c]||[],ec[c].unshift(b)},prefilter:function(a,b){b?dc.unshift(a):dc.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kc(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gc(b,!0),a,d,e)}}),m.each({slideDown:gc("show"),slideUp:gc("hide"),slideToggle:gc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($b=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$b=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_b||(_b=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_b),_b=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement("div"),b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lc=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lc,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mc,nc,oc=m.expr.attrHandle,pc=/^(?:checked|selected)$/i,qc=k.getSetAttribute,rc=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nc:mc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rc&&qc||!pc.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qc?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nc={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rc&&qc||!pc.test(c)?a.setAttribute(!qc&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=oc[b]||m.find.attr;oc[b]=rc&&qc||!pc.test(b)?function(a,b,d){var e,f;return d||(f=oc[b],oc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,oc[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rc&&qc||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mc&&mc.set(a,b,c)}}),qc||(mc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},oc.id=oc.name=oc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mc.set},m.attrHooks.contenteditable={set:function(a,b,c){mc.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sc=/^(?:input|select|textarea|button|object)$/i,tc=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sc.test(a.nodeName)||tc.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var uc=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(uc," ").indexOf(b)>=0)return!0;return!1}}),m.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vc=m.now(),wc=/\?/,xc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yc,zc,Ac=/#.*$/,Bc=/([?&])_=[^&]*/,Cc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Dc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ec=/^(?:GET|HEAD)$/,Fc=/^\/\//,Gc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hc={},Ic={},Jc="*/".concat("*");try{zc=location.href}catch(Kc){zc=y.createElement("a"),zc.href="",zc=zc.href}yc=Gc.exec(zc.toLowerCase())||[];function Lc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mc(a,b,c,d){var e={},f=a===Ic;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nc(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Oc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zc,type:"GET",isLocal:Dc.test(yc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nc(Nc(a,m.ajaxSettings),b):Nc(m.ajaxSettings,a)},ajaxPrefilter:Lc(Hc),ajaxTransport:Lc(Ic),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zc)+"").replace(Ac,"").replace(Fc,yc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yc[1]&&c[2]===yc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yc[3]||("http:"===yc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mc(Hc,k,b,v),2===t)return v;h=k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Ec.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bc.test(e)?e.replace(Bc,"$1_="+vc++):e+(wc.test(e)?"&":"?")+"_="+vc++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mc(Ic,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Oc(k,v,c)),u=Pc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qc=/%20/g,Rc=/\[\]$/,Sc=/\r?\n/g,Tc=/^(?:submit|button|image|reset|file)$/i,Uc=/^(?:input|select|textarea|keygen)/i;function Vc(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rc.test(a)?d(a,e):Vc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vc(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vc(c,a[c],b,e);return d.join("&").replace(Qc,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Uc.test(this.nodeName)&&!Tc.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sc,"\r\n")}}):{name:b.name,value:c.replace(Sc,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zc()||$c()}:Zc;var Wc=0,Xc={},Yc=m.ajaxSettings.xhr();a.ActiveXObject&&m(a).on("unload",function(){for(var a in Xc)Xc[a](void 0,!0)}),k.cors=!!Yc&&"withCredentials"in Yc,Yc=k.ajax=!!Yc,Yc&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xc[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zc(){try{return new a.XMLHttpRequest}catch(b){}}function $c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _c=[],ad=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_c.pop()||m.expando+"_"+vc++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ad.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ad.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ad,"$1"+e):b.jsonp!==!1&&(b.url+=(wc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_c.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bd=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bd)return bd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("<div>").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cd=a.document.documentElement;function dd(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dd(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cd;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cd})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dd(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=Lb(k.pixelPosition,function(a,c){return c?(c=Jb(a,b),Hb.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ed=a.jQuery,fd=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fd),b&&a.jQuery===m&&(a.jQuery=ed),m},typeof b===K&&(a.jQuery=a.$=m),m});
doc/build/html/_static/minus.png less more
Binary diff not shown
doc/build/html/_static/plus.png less more
Binary diff not shown
+0
-65
doc/build/html/_static/pygments.css less more
0 .highlight .hll { background-color: #ffffcc }
1 .highlight { background: #eeffcc; }
2 .highlight .c { color: #408090; font-style: italic } /* Comment */
3 .highlight .err { border: 1px solid #FF0000 } /* Error */
4 .highlight .k { color: #007020; font-weight: bold } /* Keyword */
5 .highlight .o { color: #666666 } /* Operator */
6 .highlight .ch { color: #408090; font-style: italic } /* Comment.Hashbang */
7 .highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */
8 .highlight .cp { color: #007020 } /* Comment.Preproc */
9 .highlight .cpf { color: #408090; font-style: italic } /* Comment.PreprocFile */
10 .highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */
11 .highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */
12 .highlight .gd { color: #A00000 } /* Generic.Deleted */
13 .highlight .ge { font-style: italic } /* Generic.Emph */
14 .highlight .gr { color: #FF0000 } /* Generic.Error */
15 .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
16 .highlight .gi { color: #00A000 } /* Generic.Inserted */
17 .highlight .go { color: #333333 } /* Generic.Output */
18 .highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
19 .highlight .gs { font-weight: bold } /* Generic.Strong */
20 .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
21 .highlight .gt { color: #0044DD } /* Generic.Traceback */
22 .highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */
23 .highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
24 .highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */
25 .highlight .kp { color: #007020 } /* Keyword.Pseudo */
26 .highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */
27 .highlight .kt { color: #902000 } /* Keyword.Type */
28 .highlight .m { color: #208050 } /* Literal.Number */
29 .highlight .s { color: #4070a0 } /* Literal.String */
30 .highlight .na { color: #4070a0 } /* Name.Attribute */
31 .highlight .nb { color: #007020 } /* Name.Builtin */
32 .highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */
33 .highlight .no { color: #60add5 } /* Name.Constant */
34 .highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
35 .highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */
36 .highlight .ne { color: #007020 } /* Name.Exception */
37 .highlight .nf { color: #06287e } /* Name.Function */
38 .highlight .nl { color: #002070; font-weight: bold } /* Name.Label */
39 .highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
40 .highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */
41 .highlight .nv { color: #bb60d5 } /* Name.Variable */
42 .highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */
43 .highlight .w { color: #bbbbbb } /* Text.Whitespace */
44 .highlight .mb { color: #208050 } /* Literal.Number.Bin */
45 .highlight .mf { color: #208050 } /* Literal.Number.Float */
46 .highlight .mh { color: #208050 } /* Literal.Number.Hex */
47 .highlight .mi { color: #208050 } /* Literal.Number.Integer */
48 .highlight .mo { color: #208050 } /* Literal.Number.Oct */
49 .highlight .sb { color: #4070a0 } /* Literal.String.Backtick */
50 .highlight .sc { color: #4070a0 } /* Literal.String.Char */
51 .highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */
52 .highlight .s2 { color: #4070a0 } /* Literal.String.Double */
53 .highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */
54 .highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */
55 .highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */
56 .highlight .sx { color: #c65d09 } /* Literal.String.Other */
57 .highlight .sr { color: #235388 } /* Literal.String.Regex */
58 .highlight .s1 { color: #4070a0 } /* Literal.String.Single */
59 .highlight .ss { color: #517918 } /* Literal.String.Symbol */
60 .highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
61 .highlight .vc { color: #bb60d5 } /* Name.Variable.Class */
62 .highlight .vg { color: #bb60d5 } /* Name.Variable.Global */
63 .highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */
64 .highlight .il { color: #208050 } /* Literal.Number.Integer.Long */
+0
-651
doc/build/html/_static/searchtools.js less more
0 /*
1 * searchtools.js_t
2 * ~~~~~~~~~~~~~~~~
3 *
4 * Sphinx JavaScript utilities for the full-text search.
5 *
6 * :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
7 * :license: BSD, see LICENSE for details.
8 *
9 */
10
11
12 /* Non-minified version JS is _stemmer.js if file is provided */
13 /**
14 * Porter Stemmer
15 */
16 var Stemmer = function() {
17
18 var step2list = {
19 ational: 'ate',
20 tional: 'tion',
21 enci: 'ence',
22 anci: 'ance',
23 izer: 'ize',
24 bli: 'ble',
25 alli: 'al',
26 entli: 'ent',
27 eli: 'e',
28 ousli: 'ous',
29 ization: 'ize',
30 ation: 'ate',
31 ator: 'ate',
32 alism: 'al',
33 iveness: 'ive',
34 fulness: 'ful',
35 ousness: 'ous',
36 aliti: 'al',
37 iviti: 'ive',
38 biliti: 'ble',
39 logi: 'log'
40 };
41
42 var step3list = {
43 icate: 'ic',
44 ative: '',
45 alize: 'al',
46 iciti: 'ic',
47 ical: 'ic',
48 ful: '',
49 ness: ''
50 };
51
52 var c = "[^aeiou]"; // consonant
53 var v = "[aeiouy]"; // vowel
54 var C = c + "[^aeiouy]*"; // consonant sequence
55 var V = v + "[aeiou]*"; // vowel sequence
56
57 var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0
58 var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1
59 var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1
60 var s_v = "^(" + C + ")?" + v; // vowel in stem
61
62 this.stemWord = function (w) {
63 var stem;
64 var suffix;
65 var firstch;
66 var origword = w;
67
68 if (w.length < 3)
69 return w;
70
71 var re;
72 var re2;
73 var re3;
74 var re4;
75
76 firstch = w.substr(0,1);
77 if (firstch == "y")
78 w = firstch.toUpperCase() + w.substr(1);
79
80 // Step 1a
81 re = /^(.+?)(ss|i)es$/;
82 re2 = /^(.+?)([^s])s$/;
83
84 if (re.test(w))
85 w = w.replace(re,"$1$2");
86 else if (re2.test(w))
87 w = w.replace(re2,"$1$2");
88
89 // Step 1b
90 re = /^(.+?)eed$/;
91 re2 = /^(.+?)(ed|ing)$/;
92 if (re.test(w)) {
93 var fp = re.exec(w);
94 re = new RegExp(mgr0);
95 if (re.test(fp[1])) {
96 re = /.$/;
97 w = w.replace(re,"");
98 }
99 }
100 else if (re2.test(w)) {
101 var fp = re2.exec(w);
102 stem = fp[1];
103 re2 = new RegExp(s_v);
104 if (re2.test(stem)) {
105 w = stem;
106 re2 = /(at|bl|iz)$/;
107 re3 = new RegExp("([^aeiouylsz])\\1$");
108 re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
109 if (re2.test(w))
110 w = w + "e";
111 else if (re3.test(w)) {
112 re = /.$/;
113 w = w.replace(re,"");
114 }
115 else if (re4.test(w))
116 w = w + "e";
117 }
118 }
119
120 // Step 1c
121 re = /^(.+?)y$/;
122 if (re.test(w)) {
123 var fp = re.exec(w);
124 stem = fp[1];
125 re = new RegExp(s_v);
126 if (re.test(stem))
127 w = stem + "i";
128 }
129
130 // Step 2
131 re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
132 if (re.test(w)) {
133 var fp = re.exec(w);
134 stem = fp[1];
135 suffix = fp[2];
136 re = new RegExp(mgr0);
137 if (re.test(stem))
138 w = stem + step2list[suffix];
139 }
140
141 // Step 3
142 re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
143 if (re.test(w)) {
144 var fp = re.exec(w);
145 stem = fp[1];
146 suffix = fp[2];
147 re = new RegExp(mgr0);
148 if (re.test(stem))
149 w = stem + step3list[suffix];
150 }
151
152 // Step 4
153 re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
154 re2 = /^(.+?)(s|t)(ion)$/;
155 if (re.test(w)) {
156 var fp = re.exec(w);
157 stem = fp[1];
158 re = new RegExp(mgr1);
159 if (re.test(stem))
160 w = stem;
161 }
162 else if (re2.test(w)) {
163 var fp = re2.exec(w);
164 stem = fp[1] + fp[2];
165 re2 = new RegExp(mgr1);
166 if (re2.test(stem))
167 w = stem;
168 }
169
170 // Step 5
171 re = /^(.+?)e$/;
172 if (re.test(w)) {
173 var fp = re.exec(w);
174 stem = fp[1];
175 re = new RegExp(mgr1);
176 re2 = new RegExp(meq1);
177 re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
178 if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
179 w = stem;
180 }
181 re = /ll$/;
182 re2 = new RegExp(mgr1);
183 if (re.test(w) && re2.test(w)) {
184 re = /.$/;
185 w = w.replace(re,"");
186 }
187
188 // and turn initial Y back to y
189 if (firstch == "y")
190 w = firstch.toLowerCase() + w.substr(1);
191 return w;
192 }
193 }
194
195
196
197 /**
198 * Simple result scoring code.
199 */
200 var Scorer = {
201 // Implement the following function to further tweak the score for each result
202 // The function takes a result array [filename, title, anchor, descr, score]
203 // and returns the new score.
204 /*
205 score: function(result) {
206 return result[4];
207 },
208 */
209
210 // query matches the full name of an object
211 objNameMatch: 11,
212 // or matches in the last dotted part of the object name
213 objPartialMatch: 6,
214 // Additive scores depending on the priority of the object
215 objPrio: {0: 15, // used to be importantResults
216 1: 5, // used to be objectResults
217 2: -5}, // used to be unimportantResults
218 // Used when the priority is not in the mapping.
219 objPrioDefault: 0,
220
221 // query found in title
222 title: 15,
223 // query found in terms
224 term: 5
225 };
226
227
228 /**
229 * Search Module
230 */
231 var Search = {
232
233 _index : null,
234 _queued_query : null,
235 _pulse_status : -1,
236
237 init : function() {
238 var params = $.getQueryParameters();
239 if (params.q) {
240 var query = params.q[0];
241 $('input[name="q"]')[0].value = query;
242 this.performSearch(query);
243 }
244 },
245
246 loadIndex : function(url) {
247 $.ajax({type: "GET", url: url, data: null,
248 dataType: "script", cache: true,
249 complete: function(jqxhr, textstatus) {
250 if (textstatus != "success") {
251 document.getElementById("searchindexloader").src = url;
252 }
253 }});
254 },
255
256 setIndex : function(index) {
257 var q;
258 this._index = index;
259 if ((q = this._queued_query) !== null) {
260 this._queued_query = null;
261 Search.query(q);
262 }
263 },
264
265 hasIndex : function() {
266 return this._index !== null;
267 },
268
269 deferQuery : function(query) {
270 this._queued_query = query;
271 },
272
273 stopPulse : function() {
274 this._pulse_status = 0;
275 },
276
277 startPulse : function() {
278 if (this._pulse_status >= 0)
279 return;
280 function pulse() {
281 var i;
282 Search._pulse_status = (Search._pulse_status + 1) % 4;
283 var dotString = '';
284 for (i = 0; i < Search._pulse_status; i++)
285 dotString += '.';
286 Search.dots.text(dotString);
287 if (Search._pulse_status > -1)
288 window.setTimeout(pulse, 500);
289 }
290 pulse();
291 },
292
293 /**
294 * perform a search for something (or wait until index is loaded)
295 */
296 performSearch : function(query) {
297 // create the required interface elements
298 this.out = $('#search-results');
299 this.title = $('<h2>' + _('Searching') + '</h2>').appendTo(this.out);
300 this.dots = $('<span></span>').appendTo(this.title);
301 this.status = $('<p style="display: none"></p>').appendTo(this.out);
302 this.output = $('<ul class="search"/>').appendTo(this.out);
303
304 $('#search-progress').text(_('Preparing search...'));
305 this.startPulse();
306
307 // index already loaded, the browser was quick!
308 if (this.hasIndex())
309 this.query(query);
310 else
311 this.deferQuery(query);
312 },
313
314 /**
315 * execute search (requires search index to be loaded)
316 */
317 query : function(query) {
318 var i;
319 var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
320
321 // stem the searchterms and add them to the correct list
322 var stemmer = new Stemmer();
323 var searchterms = [];
324 var excluded = [];
325 var hlterms = [];
326 var tmp = query.split(/\s+/);
327 var objectterms = [];
328 for (i = 0; i < tmp.length; i++) {
329 if (tmp[i] !== "") {
330 objectterms.push(tmp[i].toLowerCase());
331 }
332
333 if ($u.indexOf(stopwords, tmp[i].toLowerCase()) != -1 || tmp[i].match(/^\d+$/) ||
334 tmp[i] === "") {
335 // skip this "word"
336 continue;
337 }
338 // stem the word
339 var word = stemmer.stemWord(tmp[i].toLowerCase());
340 var toAppend;
341 // select the correct list
342 if (word[0] == '-') {
343 toAppend = excluded;
344 word = word.substr(1);
345 }
346 else {
347 toAppend = searchterms;
348 hlterms.push(tmp[i].toLowerCase());
349 }
350 // only add if not already in the list
351 if (!$u.contains(toAppend, word))
352 toAppend.push(word);
353 }
354 var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" "));
355
356 // console.debug('SEARCH: searching for:');
357 // console.info('required: ', searchterms);
358 // console.info('excluded: ', excluded);
359
360 // prepare search
361 var terms = this._index.terms;
362 var titleterms = this._index.titleterms;
363
364 // array of [filename, title, anchor, descr, score]
365 var results = [];
366 $('#search-progress').empty();
367
368 // lookup as object
369 for (i = 0; i < objectterms.length; i++) {
370 var others = [].concat(objectterms.slice(0, i),
371 objectterms.slice(i+1, objectterms.length));
372 results = results.concat(this.performObjectSearch(objectterms[i], others));
373 }
374
375 // lookup as search terms in fulltext
376 results = results.concat(this.performTermsSearch(searchterms, excluded, terms, titleterms));
377
378 // let the scorer override scores with a custom scoring function
379 if (Scorer.score) {
380 for (i = 0; i < results.length; i++)
381 results[i][4] = Scorer.score(results[i]);
382 }
383
384 // now sort the results by score (in opposite order of appearance, since the
385 // display function below uses pop() to retrieve items) and then
386 // alphabetically
387 results.sort(function(a, b) {
388 var left = a[4];
389 var right = b[4];
390 if (left > right) {
391 return 1;
392 } else if (left < right) {
393 return -1;
394 } else {
395 // same score: sort alphabetically
396 left = a[1].toLowerCase();
397 right = b[1].toLowerCase();
398 return (left > right) ? -1 : ((left < right) ? 1 : 0);
399 }
400 });
401
402 // for debugging
403 //Search.lastresults = results.slice(); // a copy
404 //console.info('search results:', Search.lastresults);
405
406 // print the results
407 var resultCount = results.length;
408 function displayNextItem() {
409 // results left, load the summary and display it
410 if (results.length) {
411 var item = results.pop();
412 var listItem = $('<li style="display:none"></li>');
413 if (DOCUMENTATION_OPTIONS.FILE_SUFFIX === '') {
414 // dirhtml builder
415 var dirname = item[0] + '/';
416 if (dirname.match(/\/index\/$/)) {
417 dirname = dirname.substring(0, dirname.length-6);
418 } else if (dirname == 'index/') {
419 dirname = '';
420 }
421 listItem.append($('<a/>').attr('href',
422 DOCUMENTATION_OPTIONS.URL_ROOT + dirname +
423 highlightstring + item[2]).html(item[1]));
424 } else {
425 // normal html builders
426 listItem.append($('<a/>').attr('href',
427 item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
428 highlightstring + item[2]).html(item[1]));
429 }
430 if (item[3]) {
431 listItem.append($('<span> (' + item[3] + ')</span>'));
432 Search.output.append(listItem);
433 listItem.slideDown(5, function() {
434 displayNextItem();
435 });
436 } else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
437 $.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' + item[0] + '.txt',
438 dataType: "text",
439 complete: function(jqxhr, textstatus) {
440 var data = jqxhr.responseText;
441 if (data !== '' && data !== undefined) {
442 listItem.append(Search.makeSearchSummary(data, searchterms, hlterms));
443 }
444 Search.output.append(listItem);
445 listItem.slideDown(5, function() {
446 displayNextItem();
447 });
448 }});
449 } else {
450 // no source available, just display title
451 Search.output.append(listItem);
452 listItem.slideDown(5, function() {
453 displayNextItem();
454 });
455 }
456 }
457 // search finished, update title and status message
458 else {
459 Search.stopPulse();
460 Search.title.text(_('Search Results'));
461 if (!resultCount)
462 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.'));
463 else
464 Search.status.text(_('Search finished, found %s page(s) matching the search query.').replace('%s', resultCount));
465 Search.status.fadeIn(500);
466 }
467 }
468 displayNextItem();
469 },
470
471 /**
472 * search for object names
473 */
474 performObjectSearch : function(object, otherterms) {
475 var filenames = this._index.filenames;
476 var objects = this._index.objects;
477 var objnames = this._index.objnames;
478 var titles = this._index.titles;
479
480 var i;
481 var results = [];
482
483 for (var prefix in objects) {
484 for (var name in objects[prefix]) {
485 var fullname = (prefix ? prefix + '.' : '') + name;
486 if (fullname.toLowerCase().indexOf(object) > -1) {
487 var score = 0;
488 var parts = fullname.split('.');
489 // check for different match types: exact matches of full name or
490 // "last name" (i.e. last dotted part)
491 if (fullname == object || parts[parts.length - 1] == object) {
492 score += Scorer.objNameMatch;
493 // matches in last name
494 } else if (parts[parts.length - 1].indexOf(object) > -1) {
495 score += Scorer.objPartialMatch;
496 }
497 var match = objects[prefix][name];
498 var objname = objnames[match[1]][2];
499 var title = titles[match[0]];
500 // If more than one term searched for, we require other words to be
501 // found in the name/title/description
502 if (otherterms.length > 0) {
503 var haystack = (prefix + ' ' + name + ' ' +
504 objname + ' ' + title).toLowerCase();
505 var allfound = true;
506 for (i = 0; i < otherterms.length; i++) {
507 if (haystack.indexOf(otherterms[i]) == -1) {
508 allfound = false;
509 break;
510 }
511 }
512 if (!allfound) {
513 continue;
514 }
515 }
516 var descr = objname + _(', in ') + title;
517
518 var anchor = match[3];
519 if (anchor === '')
520 anchor = fullname;
521 else if (anchor == '-')
522 anchor = objnames[match[1]][1] + '-' + fullname;
523 // add custom score for some objects according to scorer
524 if (Scorer.objPrio.hasOwnProperty(match[2])) {
525 score += Scorer.objPrio[match[2]];
526 } else {
527 score += Scorer.objPrioDefault;
528 }
529 results.push([filenames[match[0]], fullname, '#'+anchor, descr, score]);
530 }
531 }
532 }
533
534 return results;
535 },
536
537 /**
538 * search for full-text terms in the index
539 */
540 performTermsSearch : function(searchterms, excluded, terms, titleterms) {
541 var filenames = this._index.filenames;
542 var titles = this._index.titles;
543
544 var i, j, file;
545 var fileMap = {};
546 var scoreMap = {};
547 var results = [];
548
549 // perform the search on the required terms
550 for (i = 0; i < searchterms.length; i++) {
551 var word = searchterms[i];
552 var files = [];
553 var _o = [
554 {files: terms[word], score: Scorer.term},
555 {files: titleterms[word], score: Scorer.title}
556 ];
557
558 // no match but word was a required one
559 if ($u.every(_o, function(o){return o.files === undefined;})) {
560 break;
561 }
562 // found search word in contents
563 $u.each(_o, function(o) {
564 var _files = o.files;
565 if (_files === undefined)
566 return
567
568 if (_files.length === undefined)
569 _files = [_files];
570 files = files.concat(_files);
571
572 // set score for the word in each file to Scorer.term
573 for (j = 0; j < _files.length; j++) {
574 file = _files[j];
575 if (!(file in scoreMap))
576 scoreMap[file] = {}
577 scoreMap[file][word] = o.score;
578 }
579 });
580
581 // create the mapping
582 for (j = 0; j < files.length; j++) {
583 file = files[j];
584 if (file in fileMap)
585 fileMap[file].push(word);
586 else
587 fileMap[file] = [word];
588 }
589 }
590
591 // now check if the files don't contain excluded terms
592 for (file in fileMap) {
593 var valid = true;
594
595 // check if all requirements are matched
596 if (fileMap[file].length != searchterms.length)
597 continue;
598
599 // ensure that none of the excluded terms is in the search result
600 for (i = 0; i < excluded.length; i++) {
601 if (terms[excluded[i]] == file ||
602 titleterms[excluded[i]] == file ||
603 $u.contains(terms[excluded[i]] || [], file) ||
604 $u.contains(titleterms[excluded[i]] || [], file)) {
605 valid = false;
606 break;
607 }
608 }
609
610 // if we have still a valid result we can add it to the result list
611 if (valid) {
612 // select one (max) score for the file.
613 // for better ranking, we should calculate ranking by using words statistics like basic tf-idf...
614 var score = $u.max($u.map(fileMap[file], function(w){return scoreMap[file][w]}));
615 results.push([filenames[file], titles[file], '', null, score]);
616 }
617 }
618 return results;
619 },
620
621 /**
622 * helper function to return a node containing the
623 * search summary for a given text. keywords is a list
624 * of stemmed words, hlwords is the list of normal, unstemmed
625 * words. the first one is used to find the occurrence, the
626 * latter for highlighting it.
627 */
628 makeSearchSummary : function(text, keywords, hlwords) {
629 var textLower = text.toLowerCase();
630 var start = 0;
631 $.each(keywords, function() {
632 var i = textLower.indexOf(this.toLowerCase());
633 if (i > -1)
634 start = i;
635 });
636 start = Math.max(start - 120, 0);
637 var excerpt = ((start > 0) ? '...' : '') +
638 $.trim(text.substr(start, 240)) +
639 ((start + 240 - text.length) ? '...' : '');
640 var rv = $('<div class="context"></div>').text(excerpt);
641 $.each(hlwords, function() {
642 rv = rv.highlightText(this, 'highlighted');
643 });
644 return rv;
645 }
646 };
647
648 $(document).ready(function() {
649 Search.init();
650 });
+0
-999
doc/build/html/_static/underscore-1.3.1.js less more
0 // Underscore.js 1.3.1
1 // (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
2 // Underscore is freely distributable under the MIT license.
3 // Portions of Underscore are inspired or borrowed from Prototype,
4 // Oliver Steele's Functional, and John Resig's Micro-Templating.
5 // For all details and documentation:
6 // http://documentcloud.github.com/underscore
7
8 (function() {
9
10 // Baseline setup
11 // --------------
12
13 // Establish the root object, `window` in the browser, or `global` on the server.
14 var root = this;
15
16 // Save the previous value of the `_` variable.
17 var previousUnderscore = root._;
18
19 // Establish the object that gets returned to break out of a loop iteration.
20 var breaker = {};
21
22 // Save bytes in the minified (but not gzipped) version:
23 var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;
24
25 // Create quick reference variables for speed access to core prototypes.
26 var slice = ArrayProto.slice,
27 unshift = ArrayProto.unshift,
28 toString = ObjProto.toString,
29 hasOwnProperty = ObjProto.hasOwnProperty;
30
31 // All **ECMAScript 5** native function implementations that we hope to use
32 // are declared here.
33 var
34 nativeForEach = ArrayProto.forEach,
35 nativeMap = ArrayProto.map,
36 nativeReduce = ArrayProto.reduce,
37 nativeReduceRight = ArrayProto.reduceRight,
38 nativeFilter = ArrayProto.filter,
39 nativeEvery = ArrayProto.every,
40 nativeSome = ArrayProto.some,
41 nativeIndexOf = ArrayProto.indexOf,
42 nativeLastIndexOf = ArrayProto.lastIndexOf,
43 nativeIsArray = Array.isArray,
44 nativeKeys = Object.keys,
45 nativeBind = FuncProto.bind;
46
47 // Create a safe reference to the Underscore object for use below.
48 var _ = function(obj) { return new wrapper(obj); };
49
50 // Export the Underscore object for **Node.js**, with
51 // backwards-compatibility for the old `require()` API. If we're in
52 // the browser, add `_` as a global object via a string identifier,
53 // for Closure Compiler "advanced" mode.
54 if (typeof exports !== 'undefined') {
55 if (typeof module !== 'undefined' && module.exports) {
56 exports = module.exports = _;
57 }
58 exports._ = _;
59 } else {
60 root['_'] = _;
61 }
62
63 // Current version.
64 _.VERSION = '1.3.1';
65
66 // Collection Functions
67 // --------------------
68
69 // The cornerstone, an `each` implementation, aka `forEach`.
70 // Handles objects with the built-in `forEach`, arrays, and raw objects.
71 // Delegates to **ECMAScript 5**'s native `forEach` if available.
72 var each = _.each = _.forEach = function(obj, iterator, context) {
73 if (obj == null) return;
74 if (nativeForEach && obj.forEach === nativeForEach) {
75 obj.forEach(iterator, context);
76 } else if (obj.length === +obj.length) {
77 for (var i = 0, l = obj.length; i < l; i++) {
78 if (i in obj && iterator.call(context, obj[i], i, obj) === breaker) return;
79 }
80 } else {
81 for (var key in obj) {
82 if (_.has(obj, key)) {
83 if (iterator.call(context, obj[key], key, obj) === breaker) return;
84 }
85 }
86 }
87 };
88
89 // Return the results of applying the iterator to each element.
90 // Delegates to **ECMAScript 5**'s native `map` if available.
91 _.map = _.collect = function(obj, iterator, context) {
92 var results = [];
93 if (obj == null) return results;
94 if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);
95 each(obj, function(value, index, list) {
96 results[results.length] = iterator.call(context, value, index, list);
97 });
98 if (obj.length === +obj.length) results.length = obj.length;
99 return results;
100 };
101
102 // **Reduce** builds up a single result from a list of values, aka `inject`,
103 // or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available.
104 _.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) {
105 var initial = arguments.length > 2;
106 if (obj == null) obj = [];
107 if (nativeReduce && obj.reduce === nativeReduce) {
108 if (context) iterator = _.bind(iterator, context);
109 return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator);
110 }
111 each(obj, function(value, index, list) {
112 if (!initial) {
113 memo = value;
114 initial = true;
115 } else {
116 memo = iterator.call(context, memo, value, index, list);
117 }
118 });
119 if (!initial) throw new TypeError('Reduce of empty array with no initial value');
120 return memo;
121 };
122
123 // The right-associative version of reduce, also known as `foldr`.
124 // Delegates to **ECMAScript 5**'s native `reduceRight` if available.
125 _.reduceRight = _.foldr = function(obj, iterator, memo, context) {
126 var initial = arguments.length > 2;
127 if (obj == null) obj = [];
128 if (nativeReduceRight && obj.reduceRight === nativeReduceRight) {
129 if (context) iterator = _.bind(iterator, context);
130 return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator);
131 }
132 var reversed = _.toArray(obj).reverse();
133 if (context && !initial) iterator = _.bind(iterator, context);
134 return initial ? _.reduce(reversed, iterator, memo, context) : _.reduce(reversed, iterator);
135 };
136
137 // Return the first value which passes a truth test. Aliased as `detect`.
138 _.find = _.detect = function(obj, iterator, context) {
139 var result;
140 any(obj, function(value, index, list) {
141 if (iterator.call(context, value, index, list)) {
142 result = value;
143 return true;
144 }
145 });
146 return result;
147 };
148
149 // Return all the elements that pass a truth test.
150 // Delegates to **ECMAScript 5**'s native `filter` if available.
151 // Aliased as `select`.
152 _.filter = _.select = function(obj, iterator, context) {
153 var results = [];
154 if (obj == null) return results;
155 if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context);
156 each(obj, function(value, index, list) {
157 if (iterator.call(context, value, index, list)) results[results.length] = value;
158 });
159 return results;
160 };
161
162 // Return all the elements for which a truth test fails.
163 _.reject = function(obj, iterator, context) {
164 var results = [];
165 if (obj == null) return results;
166 each(obj, function(value, index, list) {
167 if (!iterator.call(context, value, index, list)) results[results.length] = value;
168 });
169 return results;
170 };
171
172 // Determine whether all of the elements match a truth test.
173 // Delegates to **ECMAScript 5**'s native `every` if available.
174 // Aliased as `all`.
175 _.every = _.all = function(obj, iterator, context) {
176 var result = true;
177 if (obj == null) return result;
178 if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context);
179 each(obj, function(value, index, list) {
180 if (!(result = result && iterator.call(context, value, index, list))) return breaker;
181 });
182 return result;
183 };
184
185 // Determine if at least one element in the object matches a truth test.
186 // Delegates to **ECMAScript 5**'s native `some` if available.
187 // Aliased as `any`.
188 var any = _.some = _.any = function(obj, iterator, context) {
189 iterator || (iterator = _.identity);
190 var result = false;
191 if (obj == null) return result;
192 if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context);
193 each(obj, function(value, index, list) {
194 if (result || (result = iterator.call(context, value, index, list))) return breaker;
195 });
196 return !!result;
197 };
198
199 // Determine if a given value is included in the array or object using `===`.
200 // Aliased as `contains`.
201 _.include = _.contains = function(obj, target) {
202 var found = false;
203 if (obj == null) return found;
204 if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
205 found = any(obj, function(value) {
206 return value === target;
207 });
208 return found;
209 };
210
211 // Invoke a method (with arguments) on every item in a collection.
212 _.invoke = function(obj, method) {
213 var args = slice.call(arguments, 2);
214 return _.map(obj, function(value) {
215 return (_.isFunction(method) ? method || value : value[method]).apply(value, args);
216 });
217 };
218
219 // Convenience version of a common use case of `map`: fetching a property.
220 _.pluck = function(obj, key) {
221 return _.map(obj, function(value){ return value[key]; });
222 };
223
224 // Return the maximum element or (element-based computation).
225 _.max = function(obj, iterator, context) {
226 if (!iterator && _.isArray(obj)) return Math.max.apply(Math, obj);
227 if (!iterator && _.isEmpty(obj)) return -Infinity;
228 var result = {computed : -Infinity};
229 each(obj, function(value, index, list) {
230 var computed = iterator ? iterator.call(context, value, index, list) : value;
231 computed >= result.computed && (result = {value : value, computed : computed});
232 });
233 return result.value;
234 };
235
236 // Return the minimum element (or element-based computation).
237 _.min = function(obj, iterator, context) {
238 if (!iterator && _.isArray(obj)) return Math.min.apply(Math, obj);
239 if (!iterator && _.isEmpty(obj)) return Infinity;
240 var result = {computed : Infinity};
241 each(obj, function(value, index, list) {
242 var computed = iterator ? iterator.call(context, value, index, list) : value;
243 computed < result.computed && (result = {value : value, computed : computed});
244 });
245 return result.value;
246 };
247
248 // Shuffle an array.
249 _.shuffle = function(obj) {
250 var shuffled = [], rand;
251 each(obj, function(value, index, list) {
252 if (index == 0) {
253 shuffled[0] = value;
254 } else {
255 rand = Math.floor(Math.random() * (index + 1));
256 shuffled[index] = shuffled[rand];
257 shuffled[rand] = value;
258 }
259 });
260 return shuffled;
261 };
262
263 // Sort the object's values by a criterion produced by an iterator.
264 _.sortBy = function(obj, iterator, context) {
265 return _.pluck(_.map(obj, function(value, index, list) {
266 return {
267 value : value,
268 criteria : iterator.call(context, value, index, list)
269 };
270 }).sort(function(left, right) {
271 var a = left.criteria, b = right.criteria;
272 return a < b ? -1 : a > b ? 1 : 0;
273 }), 'value');
274 };
275
276 // Groups the object's values by a criterion. Pass either a string attribute
277 // to group by, or a function that returns the criterion.
278 _.groupBy = function(obj, val) {
279 var result = {};
280 var iterator = _.isFunction(val) ? val : function(obj) { return obj[val]; };
281 each(obj, function(value, index) {
282 var key = iterator(value, index);
283 (result[key] || (result[key] = [])).push(value);
284 });
285 return result;
286 };
287
288 // Use a comparator function to figure out at what index an object should
289 // be inserted so as to maintain order. Uses binary search.
290 _.sortedIndex = function(array, obj, iterator) {
291 iterator || (iterator = _.identity);
292 var low = 0, high = array.length;
293 while (low < high) {
294 var mid = (low + high) >> 1;
295 iterator(array[mid]) < iterator(obj) ? low = mid + 1 : high = mid;
296 }
297 return low;
298 };
299
300 // Safely convert anything iterable into a real, live array.
301 _.toArray = function(iterable) {
302 if (!iterable) return [];
303 if (iterable.toArray) return iterable.toArray();
304 if (_.isArray(iterable)) return slice.call(iterable);
305 if (_.isArguments(iterable)) return slice.call(iterable);
306 return _.values(iterable);
307 };
308
309 // Return the number of elements in an object.
310 _.size = function(obj) {
311 return _.toArray(obj).length;
312 };
313
314 // Array Functions
315 // ---------------
316
317 // Get the first element of an array. Passing **n** will return the first N
318 // values in the array. Aliased as `head`. The **guard** check allows it to work
319 // with `_.map`.
320 _.first = _.head = function(array, n, guard) {
321 return (n != null) && !guard ? slice.call(array, 0, n) : array[0];
322 };
323
324 // Returns everything but the last entry of the array. Especcialy useful on
325 // the arguments object. Passing **n** will return all the values in
326 // the array, excluding the last N. The **guard** check allows it to work with
327 // `_.map`.
328 _.initial = function(array, n, guard) {
329 return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n));
330 };
331
332 // Get the last element of an array. Passing **n** will return the last N
333 // values in the array. The **guard** check allows it to work with `_.map`.
334 _.last = function(array, n, guard) {
335 if ((n != null) && !guard) {
336 return slice.call(array, Math.max(array.length - n, 0));
337 } else {
338 return array[array.length - 1];
339 }
340 };
341
342 // Returns everything but the first entry of the array. Aliased as `tail`.
343 // Especially useful on the arguments object. Passing an **index** will return
344 // the rest of the values in the array from that index onward. The **guard**
345 // check allows it to work with `_.map`.
346 _.rest = _.tail = function(array, index, guard) {
347 return slice.call(array, (index == null) || guard ? 1 : index);
348 };
349
350 // Trim out all falsy values from an array.
351 _.compact = function(array) {
352 return _.filter(array, function(value){ return !!value; });
353 };
354
355 // Return a completely flattened version of an array.
356 _.flatten = function(array, shallow) {
357 return _.reduce(array, function(memo, value) {
358 if (_.isArray(value)) return memo.concat(shallow ? value : _.flatten(value));
359 memo[memo.length] = value;
360 return memo;
361 }, []);
362 };
363
364 // Return a version of the array that does not contain the specified value(s).
365 _.without = function(array) {
366 return _.difference(array, slice.call(arguments, 1));
367 };
368
369 // Produce a duplicate-free version of the array. If the array has already
370 // been sorted, you have the option of using a faster algorithm.
371 // Aliased as `unique`.
372 _.uniq = _.unique = function(array, isSorted, iterator) {
373 var initial = iterator ? _.map(array, iterator) : array;
374 var result = [];
375 _.reduce(initial, function(memo, el, i) {
376 if (0 == i || (isSorted === true ? _.last(memo) != el : !_.include(memo, el))) {
377 memo[memo.length] = el;
378 result[result.length] = array[i];
379 }
380 return memo;
381 }, []);
382 return result;
383 };
384
385 // Produce an array that contains the union: each distinct element from all of
386 // the passed-in arrays.
387 _.union = function() {
388 return _.uniq(_.flatten(arguments, true));
389 };
390
391 // Produce an array that contains every item shared between all the
392 // passed-in arrays. (Aliased as "intersect" for back-compat.)
393 _.intersection = _.intersect = function(array) {
394 var rest = slice.call(arguments, 1);
395 return _.filter(_.uniq(array), function(item) {
396 return _.every(rest, function(other) {
397 return _.indexOf(other, item) >= 0;
398 });
399 });
400 };
401
402 // Take the difference between one array and a number of other arrays.
403 // Only the elements present in just the first array will remain.
404 _.difference = function(array) {
405 var rest = _.flatten(slice.call(arguments, 1));
406 return _.filter(array, function(value){ return !_.include(rest, value); });
407 };
408
409 // Zip together multiple lists into a single array -- elements that share
410 // an index go together.
411 _.zip = function() {
412 var args = slice.call(arguments);
413 var length = _.max(_.pluck(args, 'length'));
414 var results = new Array(length);
415 for (var i = 0; i < length; i++) results[i] = _.pluck(args, "" + i);
416 return results;
417 };
418
419 // If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**),
420 // we need this function. Return the position of the first occurrence of an
421 // item in an array, or -1 if the item is not included in the array.
422 // Delegates to **ECMAScript 5**'s native `indexOf` if available.
423 // If the array is large and already in sort order, pass `true`
424 // for **isSorted** to use binary search.
425 _.indexOf = function(array, item, isSorted) {
426 if (array == null) return -1;
427 var i, l;
428 if (isSorted) {
429 i = _.sortedIndex(array, item);
430 return array[i] === item ? i : -1;
431 }
432 if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item);
433 for (i = 0, l = array.length; i < l; i++) if (i in array && array[i] === item) return i;
434 return -1;
435 };
436
437 // Delegates to **ECMAScript 5**'s native `lastIndexOf` if available.
438 _.lastIndexOf = function(array, item) {
439 if (array == null) return -1;
440 if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) return array.lastIndexOf(item);
441 var i = array.length;
442 while (i--) if (i in array && array[i] === item) return i;
443 return -1;
444 };
445
446 // Generate an integer Array containing an arithmetic progression. A port of
447 // the native Python `range()` function. See
448 // [the Python documentation](http://docs.python.org/library/functions.html#range).
449 _.range = function(start, stop, step) {
450 if (arguments.length <= 1) {
451 stop = start || 0;
452 start = 0;
453 }
454 step = arguments[2] || 1;
455
456 var len = Math.max(Math.ceil((stop - start) / step), 0);
457 var idx = 0;
458 var range = new Array(len);
459
460 while(idx < len) {
461 range[idx++] = start;
462 start += step;
463 }
464
465 return range;
466 };
467
468 // Function (ahem) Functions
469 // ------------------
470
471 // Reusable constructor function for prototype setting.
472 var ctor = function(){};
473
474 // Create a function bound to a given object (assigning `this`, and arguments,
475 // optionally). Binding with arguments is also known as `curry`.
476 // Delegates to **ECMAScript 5**'s native `Function.bind` if available.
477 // We check for `func.bind` first, to fail fast when `func` is undefined.
478 _.bind = function bind(func, context) {
479 var bound, args;
480 if (func.bind === nativeBind && nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));
481 if (!_.isFunction(func)) throw new TypeError;
482 args = slice.call(arguments, 2);
483 return bound = function() {
484 if (!(this instanceof bound)) return func.apply(context, args.concat(slice.call(arguments)));
485 ctor.prototype = func.prototype;
486 var self = new ctor;
487 var result = func.apply(self, args.concat(slice.call(arguments)));
488 if (Object(result) === result) return result;
489 return self;
490 };
491 };
492
493 // Bind all of an object's methods to that object. Useful for ensuring that
494 // all callbacks defined on an object belong to it.
495 _.bindAll = function(obj) {
496 var funcs = slice.call(arguments, 1);
497 if (funcs.length == 0) funcs = _.functions(obj);
498 each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); });
499 return obj;
500 };
501
502 // Memoize an expensive function by storing its results.
503 _.memoize = function(func, hasher) {
504 var memo = {};
505 hasher || (hasher = _.identity);
506 return function() {
507 var key = hasher.apply(this, arguments);
508 return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments));
509 };
510 };
511
512 // Delays a function for the given number of milliseconds, and then calls
513 // it with the arguments supplied.
514 _.delay = function(func, wait) {
515 var args = slice.call(arguments, 2);
516 return setTimeout(function(){ return func.apply(func, args); }, wait);
517 };
518
519 // Defers a function, scheduling it to run after the current call stack has
520 // cleared.
521 _.defer = function(func) {
522 return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1)));
523 };
524
525 // Returns a function, that, when invoked, will only be triggered at most once
526 // during a given window of time.
527 _.throttle = function(func, wait) {
528 var context, args, timeout, throttling, more;
529 var whenDone = _.debounce(function(){ more = throttling = false; }, wait);
530 return function() {
531 context = this; args = arguments;
532 var later = function() {
533 timeout = null;
534 if (more) func.apply(context, args);
535 whenDone();
536 };
537 if (!timeout) timeout = setTimeout(later, wait);
538 if (throttling) {
539 more = true;
540 } else {
541 func.apply(context, args);
542 }
543 whenDone();
544 throttling = true;
545 };
546 };
547
548 // Returns a function, that, as long as it continues to be invoked, will not
549 // be triggered. The function will be called after it stops being called for
550 // N milliseconds.
551 _.debounce = function(func, wait) {
552 var timeout;
553 return function() {
554 var context = this, args = arguments;
555 var later = function() {
556 timeout = null;
557 func.apply(context, args);
558 };
559 clearTimeout(timeout);
560 timeout = setTimeout(later, wait);
561 };
562 };
563
564 // Returns a function that will be executed at most one time, no matter how
565 // often you call it. Useful for lazy initialization.
566 _.once = function(func) {
567 var ran = false, memo;
568 return function() {
569 if (ran) return memo;
570 ran = true;
571 return memo = func.apply(this, arguments);
572 };
573 };
574
575 // Returns the first function passed as an argument to the second,
576 // allowing you to adjust arguments, run code before and after, and
577 // conditionally execute the original function.
578 _.wrap = function(func, wrapper) {
579 return function() {
580 var args = [func].concat(slice.call(arguments, 0));
581 return wrapper.apply(this, args);
582 };
583 };
584
585 // Returns a function that is the composition of a list of functions, each
586 // consuming the return value of the function that follows.
587 _.compose = function() {
588 var funcs = arguments;
589 return function() {
590 var args = arguments;
591 for (var i = funcs.length - 1; i >= 0; i--) {
592 args = [funcs[i].apply(this, args)];
593 }
594 return args[0];
595 };
596 };
597
598 // Returns a function that will only be executed after being called N times.
599 _.after = function(times, func) {
600 if (times <= 0) return func();
601 return function() {
602 if (--times < 1) { return func.apply(this, arguments); }
603 };
604 };
605
606 // Object Functions
607 // ----------------
608
609 // Retrieve the names of an object's properties.
610 // Delegates to **ECMAScript 5**'s native `Object.keys`
611 _.keys = nativeKeys || function(obj) {
612 if (obj !== Object(obj)) throw new TypeError('Invalid object');
613 var keys = [];
614 for (var key in obj) if (_.has(obj, key)) keys[keys.length] = key;
615 return keys;
616 };
617
618 // Retrieve the values of an object's properties.
619 _.values = function(obj) {
620 return _.map(obj, _.identity);
621 };
622
623 // Return a sorted list of the function names available on the object.
624 // Aliased as `methods`
625 _.functions = _.methods = function(obj) {
626 var names = [];
627 for (var key in obj) {
628 if (_.isFunction(obj[key])) names.push(key);
629 }
630 return names.sort();
631 };
632
633 // Extend a given object with all the properties in passed-in object(s).
634 _.extend = function(obj) {
635 each(slice.call(arguments, 1), function(source) {
636 for (var prop in source) {
637 obj[prop] = source[prop];
638 }
639 });
640 return obj;
641 };
642
643 // Fill in a given object with default properties.
644 _.defaults = function(obj) {
645 each(slice.call(arguments, 1), function(source) {
646 for (var prop in source) {
647 if (obj[prop] == null) obj[prop] = source[prop];
648 }
649 });
650 return obj;
651 };
652
653 // Create a (shallow-cloned) duplicate of an object.
654 _.clone = function(obj) {
655 if (!_.isObject(obj)) return obj;
656 return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
657 };
658
659 // Invokes interceptor with the obj, and then returns obj.
660 // The primary purpose of this method is to "tap into" a method chain, in
661 // order to perform operations on intermediate results within the chain.
662 _.tap = function(obj, interceptor) {
663 interceptor(obj);
664 return obj;
665 };
666
667 // Internal recursive comparison function.
668 function eq(a, b, stack) {
669 // Identical objects are equal. `0 === -0`, but they aren't identical.
670 // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.
671 if (a === b) return a !== 0 || 1 / a == 1 / b;
672 // A strict comparison is necessary because `null == undefined`.
673 if (a == null || b == null) return a === b;
674 // Unwrap any wrapped objects.
675 if (a._chain) a = a._wrapped;
676 if (b._chain) b = b._wrapped;
677 // Invoke a custom `isEqual` method if one is provided.
678 if (a.isEqual && _.isFunction(a.isEqual)) return a.isEqual(b);
679 if (b.isEqual && _.isFunction(b.isEqual)) return b.isEqual(a);
680 // Compare `[[Class]]` names.
681 var className = toString.call(a);
682 if (className != toString.call(b)) return false;
683 switch (className) {
684 // Strings, numbers, dates, and booleans are compared by value.
685 case '[object String]':
686 // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
687 // equivalent to `new String("5")`.
688 return a == String(b);
689 case '[object Number]':
690 // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for
691 // other numeric values.
692 return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);
693 case '[object Date]':
694 case '[object Boolean]':
695 // Coerce dates and booleans to numeric primitive values. Dates are compared by their
696 // millisecond representations. Note that invalid dates with millisecond representations
697 // of `NaN` are not equivalent.
698 return +a == +b;
699 // RegExps are compared by their source patterns and flags.
700 case '[object RegExp]':
701 return a.source == b.source &&
702 a.global == b.global &&
703 a.multiline == b.multiline &&
704 a.ignoreCase == b.ignoreCase;
705 }
706 if (typeof a != 'object' || typeof b != 'object') return false;
707 // Assume equality for cyclic structures. The algorithm for detecting cyclic
708 // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
709 var length = stack.length;
710 while (length--) {
711 // Linear search. Performance is inversely proportional to the number of
712 // unique nested structures.
713 if (stack[length] == a) return true;
714 }
715 // Add the first object to the stack of traversed objects.
716 stack.push(a);
717 var size = 0, result = true;
718 // Recursively compare objects and arrays.
719 if (className == '[object Array]') {
720 // Compare array lengths to determine if a deep comparison is necessary.
721 size = a.length;
722 result = size == b.length;
723 if (result) {
724 // Deep compare the contents, ignoring non-numeric properties.
725 while (size--) {
726 // Ensure commutative equality for sparse arrays.
727 if (!(result = size in a == size in b && eq(a[size], b[size], stack))) break;
728 }
729 }
730 } else {
731 // Objects with different constructors are not equivalent.
732 if ('constructor' in a != 'constructor' in b || a.constructor != b.constructor) return false;
733 // Deep compare objects.
734 for (var key in a) {
735 if (_.has(a, key)) {
736 // Count the expected number of properties.
737 size++;
738 // Deep compare each member.
739 if (!(result = _.has(b, key) && eq(a[key], b[key], stack))) break;
740 }
741 }
742 // Ensure that both objects contain the same number of properties.
743 if (result) {
744 for (key in b) {
745 if (_.has(b, key) && !(size--)) break;
746 }
747 result = !size;
748 }
749 }
750 // Remove the first object from the stack of traversed objects.
751 stack.pop();
752 return result;
753 }
754
755 // Perform a deep comparison to check if two objects are equal.
756 _.isEqual = function(a, b) {
757 return eq(a, b, []);
758 };
759
760 // Is a given array, string, or object empty?
761 // An "empty" object has no enumerable own-properties.
762 _.isEmpty = function(obj) {
763 if (_.isArray(obj) || _.isString(obj)) return obj.length === 0;
764 for (var key in obj) if (_.has(obj, key)) return false;
765 return true;
766 };
767
768 // Is a given value a DOM element?
769 _.isElement = function(obj) {
770 return !!(obj && obj.nodeType == 1);
771 };
772
773 // Is a given value an array?
774 // Delegates to ECMA5's native Array.isArray
775 _.isArray = nativeIsArray || function(obj) {
776 return toString.call(obj) == '[object Array]';
777 };
778
779 // Is a given variable an object?
780 _.isObject = function(obj) {
781 return obj === Object(obj);
782 };
783
784 // Is a given variable an arguments object?
785 _.isArguments = function(obj) {
786 return toString.call(obj) == '[object Arguments]';
787 };
788 if (!_.isArguments(arguments)) {
789 _.isArguments = function(obj) {
790 return !!(obj && _.has(obj, 'callee'));
791 };
792 }
793
794 // Is a given value a function?
795 _.isFunction = function(obj) {
796 return toString.call(obj) == '[object Function]';
797 };
798
799 // Is a given value a string?
800 _.isString = function(obj) {
801 return toString.call(obj) == '[object String]';
802 };
803
804 // Is a given value a number?
805 _.isNumber = function(obj) {
806 return toString.call(obj) == '[object Number]';
807 };
808
809 // Is the given value `NaN`?
810 _.isNaN = function(obj) {
811 // `NaN` is the only value for which `===` is not reflexive.
812 return obj !== obj;
813 };
814
815 // Is a given value a boolean?
816 _.isBoolean = function(obj) {
817 return obj === true || obj === false || toString.call(obj) == '[object Boolean]';
818 };
819
820 // Is a given value a date?
821 _.isDate = function(obj) {
822 return toString.call(obj) == '[object Date]';
823 };
824
825 // Is the given value a regular expression?
826 _.isRegExp = function(obj) {
827 return toString.call(obj) == '[object RegExp]';
828 };
829
830 // Is a given value equal to null?
831 _.isNull = function(obj) {
832 return obj === null;
833 };
834
835 // Is a given variable undefined?
836 _.isUndefined = function(obj) {
837 return obj === void 0;
838 };
839
840 // Has own property?
841 _.has = function(obj, key) {
842 return hasOwnProperty.call(obj, key);
843 };
844
845 // Utility Functions
846 // -----------------
847
848 // Run Underscore.js in *noConflict* mode, returning the `_` variable to its
849 // previous owner. Returns a reference to the Underscore object.
850 _.noConflict = function() {
851 root._ = previousUnderscore;
852 return this;
853 };
854
855 // Keep the identity function around for default iterators.
856 _.identity = function(value) {
857 return value;
858 };
859
860 // Run a function **n** times.
861 _.times = function (n, iterator, context) {
862 for (var i = 0; i < n; i++) iterator.call(context, i);
863 };
864
865 // Escape a string for HTML interpolation.
866 _.escape = function(string) {
867 return (''+string).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;');
868 };
869
870 // Add your own custom functions to the Underscore object, ensuring that
871 // they're correctly added to the OOP wrapper as well.
872 _.mixin = function(obj) {
873 each(_.functions(obj), function(name){
874 addToWrapper(name, _[name] = obj[name]);
875 });
876 };
877
878 // Generate a unique integer id (unique within the entire client session).
879 // Useful for temporary DOM ids.
880 var idCounter = 0;
881 _.uniqueId = function(prefix) {
882 var id = idCounter++;
883 return prefix ? prefix + id : id;
884 };
885
886 // By default, Underscore uses ERB-style template delimiters, change the
887 // following template settings to use alternative delimiters.
888 _.templateSettings = {
889 evaluate : /<%([\s\S]+?)%>/g,
890 interpolate : /<%=([\s\S]+?)%>/g,
891 escape : /<%-([\s\S]+?)%>/g
892 };
893
894 // When customizing `templateSettings`, if you don't want to define an
895 // interpolation, evaluation or escaping regex, we need one that is
896 // guaranteed not to match.
897 var noMatch = /.^/;
898
899 // Within an interpolation, evaluation, or escaping, remove HTML escaping
900 // that had been previously added.
901 var unescape = function(code) {
902 return code.replace(/\\\\/g, '\\').replace(/\\'/g, "'");
903 };
904
905 // JavaScript micro-templating, similar to John Resig's implementation.
906 // Underscore templating handles arbitrary delimiters, preserves whitespace,
907 // and correctly escapes quotes within interpolated code.
908 _.template = function(str, data) {
909 var c = _.templateSettings;
910 var tmpl = 'var __p=[],print=function(){__p.push.apply(__p,arguments);};' +
911 'with(obj||{}){__p.push(\'' +
912 str.replace(/\\/g, '\\\\')
913 .replace(/'/g, "\\'")
914 .replace(c.escape || noMatch, function(match, code) {
915 return "',_.escape(" + unescape(code) + "),'";
916 })
917 .replace(c.interpolate || noMatch, function(match, code) {
918 return "'," + unescape(code) + ",'";
919 })
920 .replace(c.evaluate || noMatch, function(match, code) {
921 return "');" + unescape(code).replace(/[\r\n\t]/g, ' ') + ";__p.push('";
922 })
923 .replace(/\r/g, '\\r')
924 .replace(/\n/g, '\\n')
925 .replace(/\t/g, '\\t')
926 + "');}return __p.join('');";
927 var func = new Function('obj', '_', tmpl);
928 if (data) return func(data, _);
929 return function(data) {
930 return func.call(this, data, _);
931 };
932 };
933
934 // Add a "chain" function, which will delegate to the wrapper.
935 _.chain = function(obj) {
936 return _(obj).chain();
937 };
938
939 // The OOP Wrapper
940 // ---------------
941
942 // If Underscore is called as a function, it returns a wrapped object that
943 // can be used OO-style. This wrapper holds altered versions of all the
944 // underscore functions. Wrapped objects may be chained.
945 var wrapper = function(obj) { this._wrapped = obj; };
946
947 // Expose `wrapper.prototype` as `_.prototype`
948 _.prototype = wrapper.prototype;
949
950 // Helper function to continue chaining intermediate results.
951 var result = function(obj, chain) {
952 return chain ? _(obj).chain() : obj;
953 };
954
955 // A method to easily add functions to the OOP wrapper.
956 var addToWrapper = function(name, func) {
957 wrapper.prototype[name] = function() {
958 var args = slice.call(arguments);
959 unshift.call(args, this._wrapped);
960 return result(func.apply(_, args), this._chain);
961 };
962 };
963
964 // Add all of the Underscore functions to the wrapper object.
965 _.mixin(_);
966
967 // Add all mutator Array functions to the wrapper.
968 each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
969 var method = ArrayProto[name];
970 wrapper.prototype[name] = function() {
971 var wrapped = this._wrapped;
972 method.apply(wrapped, arguments);
973 var length = wrapped.length;
974 if ((name == 'shift' || name == 'splice') && length === 0) delete wrapped[0];
975 return result(wrapped, this._chain);
976 };
977 });
978
979 // Add all accessor Array functions to the wrapper.
980 each(['concat', 'join', 'slice'], function(name) {
981 var method = ArrayProto[name];
982 wrapper.prototype[name] = function() {
983 return result(method.apply(this._wrapped, arguments), this._chain);
984 };
985 });
986
987 // Start chaining a wrapped Underscore object.
988 wrapper.prototype.chain = function() {
989 this._chain = true;
990 return this;
991 };
992
993 // Extracts the result from a wrapped and chained object.
994 wrapper.prototype.value = function() {
995 return this._wrapped;
996 };
997
998 }).call(this);
+0
-31
doc/build/html/_static/underscore.js less more
0 // Underscore.js 1.3.1
1 // (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
2 // Underscore is freely distributable under the MIT license.
3 // Portions of Underscore are inspired or borrowed from Prototype,
4 // Oliver Steele's Functional, and John Resig's Micro-Templating.
5 // For all details and documentation:
6 // http://documentcloud.github.com/underscore
7 (function(){function q(a,c,d){if(a===c)return a!==0||1/a==1/c;if(a==null||c==null)return a===c;if(a._chain)a=a._wrapped;if(c._chain)c=c._wrapped;if(a.isEqual&&b.isFunction(a.isEqual))return a.isEqual(c);if(c.isEqual&&b.isFunction(c.isEqual))return c.isEqual(a);var e=l.call(a);if(e!=l.call(c))return false;switch(e){case "[object String]":return a==String(c);case "[object Number]":return a!=+a?c!=+c:a==0?1/a==1/c:a==+c;case "[object Date]":case "[object Boolean]":return+a==+c;case "[object RegExp]":return a.source==
8 c.source&&a.global==c.global&&a.multiline==c.multiline&&a.ignoreCase==c.ignoreCase}if(typeof a!="object"||typeof c!="object")return false;for(var f=d.length;f--;)if(d[f]==a)return true;d.push(a);var f=0,g=true;if(e=="[object Array]"){if(f=a.length,g=f==c.length)for(;f--;)if(!(g=f in a==f in c&&q(a[f],c[f],d)))break}else{if("constructor"in a!="constructor"in c||a.constructor!=c.constructor)return false;for(var h in a)if(b.has(a,h)&&(f++,!(g=b.has(c,h)&&q(a[h],c[h],d))))break;if(g){for(h in c)if(b.has(c,
9 h)&&!f--)break;g=!f}}d.pop();return g}var r=this,G=r._,n={},k=Array.prototype,o=Object.prototype,i=k.slice,H=k.unshift,l=o.toString,I=o.hasOwnProperty,w=k.forEach,x=k.map,y=k.reduce,z=k.reduceRight,A=k.filter,B=k.every,C=k.some,p=k.indexOf,D=k.lastIndexOf,o=Array.isArray,J=Object.keys,s=Function.prototype.bind,b=function(a){return new m(a)};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=b;exports._=b}else r._=b;b.VERSION="1.3.1";var j=b.each=
10 b.forEach=function(a,c,d){if(a!=null)if(w&&a.forEach===w)a.forEach(c,d);else if(a.length===+a.length)for(var e=0,f=a.length;e<f;e++){if(e in a&&c.call(d,a[e],e,a)===n)break}else for(e in a)if(b.has(a,e)&&c.call(d,a[e],e,a)===n)break};b.map=b.collect=function(a,c,b){var e=[];if(a==null)return e;if(x&&a.map===x)return a.map(c,b);j(a,function(a,g,h){e[e.length]=c.call(b,a,g,h)});if(a.length===+a.length)e.length=a.length;return e};b.reduce=b.foldl=b.inject=function(a,c,d,e){var f=arguments.length>2;a==
11 null&&(a=[]);if(y&&a.reduce===y)return e&&(c=b.bind(c,e)),f?a.reduce(c,d):a.reduce(c);j(a,function(a,b,i){f?d=c.call(e,d,a,b,i):(d=a,f=true)});if(!f)throw new TypeError("Reduce of empty array with no initial value");return d};b.reduceRight=b.foldr=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(z&&a.reduceRight===z)return e&&(c=b.bind(c,e)),f?a.reduceRight(c,d):a.reduceRight(c);var g=b.toArray(a).reverse();e&&!f&&(c=b.bind(c,e));return f?b.reduce(g,c,d,e):b.reduce(g,c)};b.find=b.detect=
12 function(a,c,b){var e;E(a,function(a,g,h){if(c.call(b,a,g,h))return e=a,true});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(A&&a.filter===A)return a.filter(c,b);j(a,function(a,g,h){c.call(b,a,g,h)&&(e[e.length]=a)});return e};b.reject=function(a,c,b){var e=[];if(a==null)return e;j(a,function(a,g,h){c.call(b,a,g,h)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=true;if(a==null)return e;if(B&&a.every===B)return a.every(c,b);j(a,function(a,g,h){if(!(e=
13 e&&c.call(b,a,g,h)))return n});return e};var E=b.some=b.any=function(a,c,d){c||(c=b.identity);var e=false;if(a==null)return e;if(C&&a.some===C)return a.some(c,d);j(a,function(a,b,h){if(e||(e=c.call(d,a,b,h)))return n});return!!e};b.include=b.contains=function(a,c){var b=false;if(a==null)return b;return p&&a.indexOf===p?a.indexOf(c)!=-1:b=E(a,function(a){return a===c})};b.invoke=function(a,c){var d=i.call(arguments,2);return b.map(a,function(a){return(b.isFunction(c)?c||a:a[c]).apply(a,d)})};b.pluck=
14 function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);if(!c&&b.isEmpty(a))return-Infinity;var e={computed:-Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);if(!c&&b.isEmpty(a))return Infinity;var e={computed:Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b<e.computed&&(e={value:a,computed:b})});
15 return e.value};b.shuffle=function(a){var b=[],d;j(a,function(a,f){f==0?b[0]=a:(d=Math.floor(Math.random()*(f+1)),b[f]=b[d],b[d]=a)});return b};b.sortBy=function(a,c,d){return b.pluck(b.map(a,function(a,b,g){return{value:a,criteria:c.call(d,a,b,g)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;return c<d?-1:c>d?1:0}),"value")};b.groupBy=function(a,c){var d={},e=b.isFunction(c)?c:function(a){return a[c]};j(a,function(a,b){var c=e(a,b);(d[c]||(d[c]=[])).push(a)});return d};b.sortedIndex=function(a,
16 c,d){d||(d=b.identity);for(var e=0,f=a.length;e<f;){var g=e+f>>1;d(a[g])<d(c)?e=g+1:f=g}return e};b.toArray=function(a){return!a?[]:a.toArray?a.toArray():b.isArray(a)?i.call(a):b.isArguments(a)?i.call(a):b.values(a)};b.size=function(a){return b.toArray(a).length};b.first=b.head=function(a,b,d){return b!=null&&!d?i.call(a,0,b):a[0]};b.initial=function(a,b,d){return i.call(a,0,a.length-(b==null||d?1:b))};b.last=function(a,b,d){return b!=null&&!d?i.call(a,Math.max(a.length-b,0)):a[a.length-1]};b.rest=
17 b.tail=function(a,b,d){return i.call(a,b==null||d?1:b)};b.compact=function(a){return b.filter(a,function(a){return!!a})};b.flatten=function(a,c){return b.reduce(a,function(a,e){if(b.isArray(e))return a.concat(c?e:b.flatten(e));a[a.length]=e;return a},[])};b.without=function(a){return b.difference(a,i.call(arguments,1))};b.uniq=b.unique=function(a,c,d){var d=d?b.map(a,d):a,e=[];b.reduce(d,function(d,g,h){if(0==h||(c===true?b.last(d)!=g:!b.include(d,g)))d[d.length]=g,e[e.length]=a[h];return d},[]);
18 return e};b.union=function(){return b.uniq(b.flatten(arguments,true))};b.intersection=b.intersect=function(a){var c=i.call(arguments,1);return b.filter(b.uniq(a),function(a){return b.every(c,function(c){return b.indexOf(c,a)>=0})})};b.difference=function(a){var c=b.flatten(i.call(arguments,1));return b.filter(a,function(a){return!b.include(c,a)})};b.zip=function(){for(var a=i.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),e=0;e<c;e++)d[e]=b.pluck(a,""+e);return d};b.indexOf=function(a,c,
19 d){if(a==null)return-1;var e;if(d)return d=b.sortedIndex(a,c),a[d]===c?d:-1;if(p&&a.indexOf===p)return a.indexOf(c);for(d=0,e=a.length;d<e;d++)if(d in a&&a[d]===c)return d;return-1};b.lastIndexOf=function(a,b){if(a==null)return-1;if(D&&a.lastIndexOf===D)return a.lastIndexOf(b);for(var d=a.length;d--;)if(d in a&&a[d]===b)return d;return-1};b.range=function(a,b,d){arguments.length<=1&&(b=a||0,a=0);for(var d=arguments[2]||1,e=Math.max(Math.ceil((b-a)/d),0),f=0,g=Array(e);f<e;)g[f++]=a,a+=d;return g};
20 var F=function(){};b.bind=function(a,c){var d,e;if(a.bind===s&&s)return s.apply(a,i.call(arguments,1));if(!b.isFunction(a))throw new TypeError;e=i.call(arguments,2);return d=function(){if(!(this instanceof d))return a.apply(c,e.concat(i.call(arguments)));F.prototype=a.prototype;var b=new F,g=a.apply(b,e.concat(i.call(arguments)));return Object(g)===g?g:b}};b.bindAll=function(a){var c=i.call(arguments,1);c.length==0&&(c=b.functions(a));j(c,function(c){a[c]=b.bind(a[c],a)});return a};b.memoize=function(a,
21 c){var d={};c||(c=b.identity);return function(){var e=c.apply(this,arguments);return b.has(d,e)?d[e]:d[e]=a.apply(this,arguments)}};b.delay=function(a,b){var d=i.call(arguments,2);return setTimeout(function(){return a.apply(a,d)},b)};b.defer=function(a){return b.delay.apply(b,[a,1].concat(i.call(arguments,1)))};b.throttle=function(a,c){var d,e,f,g,h,i=b.debounce(function(){h=g=false},c);return function(){d=this;e=arguments;var b;f||(f=setTimeout(function(){f=null;h&&a.apply(d,e);i()},c));g?h=true:
22 a.apply(d,e);i();g=true}};b.debounce=function(a,b){var d;return function(){var e=this,f=arguments;clearTimeout(d);d=setTimeout(function(){d=null;a.apply(e,f)},b)}};b.once=function(a){var b=false,d;return function(){if(b)return d;b=true;return d=a.apply(this,arguments)}};b.wrap=function(a,b){return function(){var d=[a].concat(i.call(arguments,0));return b.apply(this,d)}};b.compose=function(){var a=arguments;return function(){for(var b=arguments,d=a.length-1;d>=0;d--)b=[a[d].apply(this,b)];return b[0]}};
23 b.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};b.keys=J||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var c=[],d;for(d in a)b.has(a,d)&&(c[c.length]=d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=b.methods=function(a){var c=[],d;for(d in a)b.isFunction(a[d])&&c.push(d);return c.sort()};b.extend=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]=b[d]});return a};b.defaults=function(a){j(i.call(arguments,
24 1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return!b.isObject(a)?a:b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,b){return q(a,b,[])};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(b.has(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=o||function(a){return l.call(a)=="[object Array]"};b.isObject=function(a){return a===Object(a)};
25 b.isArguments=function(a){return l.call(a)=="[object Arguments]"};if(!b.isArguments(arguments))b.isArguments=function(a){return!(!a||!b.has(a,"callee"))};b.isFunction=function(a){return l.call(a)=="[object Function]"};b.isString=function(a){return l.call(a)=="[object String]"};b.isNumber=function(a){return l.call(a)=="[object Number]"};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===true||a===false||l.call(a)=="[object Boolean]"};b.isDate=function(a){return l.call(a)=="[object Date]"};
26 b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.has=function(a,b){return I.call(a,b)};b.noConflict=function(){r._=G;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=0;e<a;e++)b.call(d,e)};b.escape=function(a){return(""+a).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;")};b.mixin=function(a){j(b.functions(a),
27 function(c){K(c,b[c]=a[c])})};var L=0;b.uniqueId=function(a){var b=L++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var t=/.^/,u=function(a){return a.replace(/\\\\/g,"\\").replace(/\\'/g,"'")};b.template=function(a,c){var d=b.templateSettings,d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.escape||t,function(a,b){return"',_.escape("+
28 u(b)+"),'"}).replace(d.interpolate||t,function(a,b){return"',"+u(b)+",'"}).replace(d.evaluate||t,function(a,b){return"');"+u(b).replace(/[\r\n\t]/g," ")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",e=new Function("obj","_",d);return c?e(c,b):function(a){return e.call(this,a,b)}};b.chain=function(a){return b(a).chain()};var m=function(a){this._wrapped=a};b.prototype=m.prototype;var v=function(a,c){return c?b(a).chain():a},K=function(a,c){m.prototype[a]=
29 function(){var a=i.call(arguments);H.call(a,this._wrapped);return v(c.apply(b,a),this._chain)}};b.mixin(b);j("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=k[a];m.prototype[a]=function(){var d=this._wrapped;b.apply(d,arguments);var e=d.length;(a=="shift"||a=="splice")&&e===0&&delete d[0];return v(d,this._chain)}});j(["concat","join","slice"],function(a){var b=k[a];m.prototype[a]=function(){return v(b.apply(this._wrapped,arguments),this._chain)}});m.prototype.chain=function(){this._chain=
30 true;return this};m.prototype.value=function(){return this._wrapped}}).call(this);
doc/build/html/_static/up-pressed.png less more
Binary diff not shown
doc/build/html/_static/up.png less more
Binary diff not shown
+0
-808
doc/build/html/_static/websupport.js less more
0 /*
1 * websupport.js
2 * ~~~~~~~~~~~~~
3 *
4 * sphinx.websupport utilities for all documentation.
5 *
6 * :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
7 * :license: BSD, see LICENSE for details.
8 *
9 */
10
11 (function($) {
12 $.fn.autogrow = function() {
13 return this.each(function() {
14 var textarea = this;
15
16 $.fn.autogrow.resize(textarea);
17
18 $(textarea)
19 .focus(function() {
20 textarea.interval = setInterval(function() {
21 $.fn.autogrow.resize(textarea);
22 }, 500);
23 })
24 .blur(function() {
25 clearInterval(textarea.interval);
26 });
27 });
28 };
29
30 $.fn.autogrow.resize = function(textarea) {
31 var lineHeight = parseInt($(textarea).css('line-height'), 10);
32 var lines = textarea.value.split('\n');
33 var columns = textarea.cols;
34 var lineCount = 0;
35 $.each(lines, function() {
36 lineCount += Math.ceil(this.length / columns) || 1;
37 });
38 var height = lineHeight * (lineCount + 1);
39 $(textarea).css('height', height);
40 };
41 })(jQuery);
42
43 (function($) {
44 var comp, by;
45
46 function init() {
47 initEvents();
48 initComparator();
49 }
50
51 function initEvents() {
52 $(document).on("click", 'a.comment-close', function(event) {
53 event.preventDefault();
54 hide($(this).attr('id').substring(2));
55 });
56 $(document).on("click", 'a.vote', function(event) {
57 event.preventDefault();
58 handleVote($(this));
59 });
60 $(document).on("click", 'a.reply', function(event) {
61 event.preventDefault();
62 openReply($(this).attr('id').substring(2));
63 });
64 $(document).on("click", 'a.close-reply', function(event) {
65 event.preventDefault();
66 closeReply($(this).attr('id').substring(2));
67 });
68 $(document).on("click", 'a.sort-option', function(event) {
69 event.preventDefault();
70 handleReSort($(this));
71 });
72 $(document).on("click", 'a.show-proposal', function(event) {
73 event.preventDefault();
74 showProposal($(this).attr('id').substring(2));
75 });
76 $(document).on("click", 'a.hide-proposal', function(event) {
77 event.preventDefault();
78 hideProposal($(this).attr('id').substring(2));
79 });
80 $(document).on("click", 'a.show-propose-change', function(event) {
81 event.preventDefault();
82 showProposeChange($(this).attr('id').substring(2));
83 });
84 $(document).on("click", 'a.hide-propose-change', function(event) {
85 event.preventDefault();
86 hideProposeChange($(this).attr('id').substring(2));
87 });
88 $(document).on("click", 'a.accept-comment', function(event) {
89 event.preventDefault();
90 acceptComment($(this).attr('id').substring(2));
91 });
92 $(document).on("click", 'a.delete-comment', function(event) {
93 event.preventDefault();
94 deleteComment($(this).attr('id').substring(2));
95 });
96 $(document).on("click", 'a.comment-markup', function(event) {
97 event.preventDefault();
98 toggleCommentMarkupBox($(this).attr('id').substring(2));
99 });
100 }
101
102 /**
103 * Set comp, which is a comparator function used for sorting and
104 * inserting comments into the list.
105 */
106 function setComparator() {
107 // If the first three letters are "asc", sort in ascending order
108 // and remove the prefix.
109 if (by.substring(0,3) == 'asc') {
110 var i = by.substring(3);
111 comp = function(a, b) { return a[i] - b[i]; };
112 } else {
113 // Otherwise sort in descending order.
114 comp = function(a, b) { return b[by] - a[by]; };
115 }
116
117 // Reset link styles and format the selected sort option.
118 $('a.sel').attr('href', '#').removeClass('sel');
119 $('a.by' + by).removeAttr('href').addClass('sel');
120 }
121
122 /**
123 * Create a comp function. If the user has preferences stored in
124 * the sortBy cookie, use those, otherwise use the default.
125 */
126 function initComparator() {
127 by = 'rating'; // Default to sort by rating.
128 // If the sortBy cookie is set, use that instead.
129 if (document.cookie.length > 0) {
130 var start = document.cookie.indexOf('sortBy=');
131 if (start != -1) {
132 start = start + 7;
133 var end = document.cookie.indexOf(";", start);
134 if (end == -1) {
135 end = document.cookie.length;
136 by = unescape(document.cookie.substring(start, end));
137 }
138 }
139 }
140 setComparator();
141 }
142
143 /**
144 * Show a comment div.
145 */
146 function show(id) {
147 $('#ao' + id).hide();
148 $('#ah' + id).show();
149 var context = $.extend({id: id}, opts);
150 var popup = $(renderTemplate(popupTemplate, context)).hide();
151 popup.find('textarea[name="proposal"]').hide();
152 popup.find('a.by' + by).addClass('sel');
153 var form = popup.find('#cf' + id);
154 form.submit(function(event) {
155 event.preventDefault();
156 addComment(form);
157 });
158 $('#s' + id).after(popup);
159 popup.slideDown('fast', function() {
160 getComments(id);
161 });
162 }
163
164 /**
165 * Hide a comment div.
166 */
167 function hide(id) {
168 $('#ah' + id).hide();
169 $('#ao' + id).show();
170 var div = $('#sc' + id);
171 div.slideUp('fast', function() {
172 div.remove();
173 });
174 }
175
176 /**
177 * Perform an ajax request to get comments for a node
178 * and insert the comments into the comments tree.
179 */
180 function getComments(id) {
181 $.ajax({
182 type: 'GET',
183 url: opts.getCommentsURL,
184 data: {node: id},
185 success: function(data, textStatus, request) {
186 var ul = $('#cl' + id);
187 var speed = 100;
188 $('#cf' + id)
189 .find('textarea[name="proposal"]')
190 .data('source', data.source);
191
192 if (data.comments.length === 0) {
193 ul.html('<li>No comments yet.</li>');
194 ul.data('empty', true);
195 } else {
196 // If there are comments, sort them and put them in the list.
197 var comments = sortComments(data.comments);
198 speed = data.comments.length * 100;
199 appendComments(comments, ul);
200 ul.data('empty', false);
201 }
202 $('#cn' + id).slideUp(speed + 200);
203 ul.slideDown(speed);
204 },
205 error: function(request, textStatus, error) {
206 showError('Oops, there was a problem retrieving the comments.');
207 },
208 dataType: 'json'
209 });
210 }
211
212 /**
213 * Add a comment via ajax and insert the comment into the comment tree.
214 */
215 function addComment(form) {
216 var node_id = form.find('input[name="node"]').val();
217 var parent_id = form.find('input[name="parent"]').val();
218 var text = form.find('textarea[name="comment"]').val();
219 var proposal = form.find('textarea[name="proposal"]').val();
220
221 if (text == '') {
222 showError('Please enter a comment.');
223 return;
224 }
225
226 // Disable the form that is being submitted.
227 form.find('textarea,input').attr('disabled', 'disabled');
228
229 // Send the comment to the server.
230 $.ajax({
231 type: "POST",
232 url: opts.addCommentURL,
233 dataType: 'json',
234 data: {
235 node: node_id,
236 parent: parent_id,
237 text: text,
238 proposal: proposal
239 },
240 success: function(data, textStatus, error) {
241 // Reset the form.
242 if (node_id) {
243 hideProposeChange(node_id);
244 }
245 form.find('textarea')
246 .val('')
247 .add(form.find('input'))
248 .removeAttr('disabled');
249 var ul = $('#cl' + (node_id || parent_id));
250 if (ul.data('empty')) {
251 $(ul).empty();
252 ul.data('empty', false);
253 }
254 insertComment(data.comment);
255 var ao = $('#ao' + node_id);
256 ao.find('img').attr({'src': opts.commentBrightImage});
257 if (node_id) {
258 // if this was a "root" comment, remove the commenting box
259 // (the user can get it back by reopening the comment popup)
260 $('#ca' + node_id).slideUp();
261 }
262 },
263 error: function(request, textStatus, error) {
264 form.find('textarea,input').removeAttr('disabled');
265 showError('Oops, there was a problem adding the comment.');
266 }
267 });
268 }
269
270 /**
271 * Recursively append comments to the main comment list and children
272 * lists, creating the comment tree.
273 */
274 function appendComments(comments, ul) {
275 $.each(comments, function() {
276 var div = createCommentDiv(this);
277 ul.append($(document.createElement('li')).html(div));
278 appendComments(this.children, div.find('ul.comment-children'));
279 // To avoid stagnating data, don't store the comments children in data.
280 this.children = null;
281 div.data('comment', this);
282 });
283 }
284
285 /**
286 * After adding a new comment, it must be inserted in the correct
287 * location in the comment tree.
288 */
289 function insertComment(comment) {
290 var div = createCommentDiv(comment);
291
292 // To avoid stagnating data, don't store the comments children in data.
293 comment.children = null;
294 div.data('comment', comment);
295
296 var ul = $('#cl' + (comment.node || comment.parent));
297 var siblings = getChildren(ul);
298
299 var li = $(document.createElement('li'));
300 li.hide();
301
302 // Determine where in the parents children list to insert this comment.
303 for(i=0; i < siblings.length; i++) {
304 if (comp(comment, siblings[i]) <= 0) {
305 $('#cd' + siblings[i].id)
306 .parent()
307 .before(li.html(div));
308 li.slideDown('fast');
309 return;
310 }
311 }
312
313 // If we get here, this comment rates lower than all the others,
314 // or it is the only comment in the list.
315 ul.append(li.html(div));
316 li.slideDown('fast');
317 }
318
319 function acceptComment(id) {
320 $.ajax({
321 type: 'POST',
322 url: opts.acceptCommentURL,
323 data: {id: id},
324 success: function(data, textStatus, request) {
325 $('#cm' + id).fadeOut('fast');
326 $('#cd' + id).removeClass('moderate');
327 },
328 error: function(request, textStatus, error) {
329 showError('Oops, there was a problem accepting the comment.');
330 }
331 });
332 }
333
334 function deleteComment(id) {
335 $.ajax({
336 type: 'POST',
337 url: opts.deleteCommentURL,
338 data: {id: id},
339 success: function(data, textStatus, request) {
340 var div = $('#cd' + id);
341 if (data == 'delete') {
342 // Moderator mode: remove the comment and all children immediately
343 div.slideUp('fast', function() {
344 div.remove();
345 });
346 return;
347 }
348 // User mode: only mark the comment as deleted
349 div
350 .find('span.user-id:first')
351 .text('[deleted]').end()
352 .find('div.comment-text:first')
353 .text('[deleted]').end()
354 .find('#cm' + id + ', #dc' + id + ', #ac' + id + ', #rc' + id +
355 ', #sp' + id + ', #hp' + id + ', #cr' + id + ', #rl' + id)
356 .remove();
357 var comment = div.data('comment');
358 comment.username = '[deleted]';
359 comment.text = '[deleted]';
360 div.data('comment', comment);
361 },
362 error: function(request, textStatus, error) {
363 showError('Oops, there was a problem deleting the comment.');
364 }
365 });
366 }
367
368 function showProposal(id) {
369 $('#sp' + id).hide();
370 $('#hp' + id).show();
371 $('#pr' + id).slideDown('fast');
372 }
373
374 function hideProposal(id) {
375 $('#hp' + id).hide();
376 $('#sp' + id).show();
377 $('#pr' + id).slideUp('fast');
378 }
379
380 function showProposeChange(id) {
381 $('#pc' + id).hide();
382 $('#hc' + id).show();
383 var textarea = $('#pt' + id);
384 textarea.val(textarea.data('source'));
385 $.fn.autogrow.resize(textarea[0]);
386 textarea.slideDown('fast');
387 }
388
389 function hideProposeChange(id) {
390 $('#hc' + id).hide();
391 $('#pc' + id).show();
392 var textarea = $('#pt' + id);
393 textarea.val('').removeAttr('disabled');
394 textarea.slideUp('fast');
395 }
396
397 function toggleCommentMarkupBox(id) {
398 $('#mb' + id).toggle();
399 }
400
401 /** Handle when the user clicks on a sort by link. */
402 function handleReSort(link) {
403 var classes = link.attr('class').split(/\s+/);
404 for (var i=0; i<classes.length; i++) {
405 if (classes[i] != 'sort-option') {
406 by = classes[i].substring(2);
407 }
408 }
409 setComparator();
410 // Save/update the sortBy cookie.
411 var expiration = new Date();
412 expiration.setDate(expiration.getDate() + 365);
413 document.cookie= 'sortBy=' + escape(by) +
414 ';expires=' + expiration.toUTCString();
415 $('ul.comment-ul').each(function(index, ul) {
416 var comments = getChildren($(ul), true);
417 comments = sortComments(comments);
418 appendComments(comments, $(ul).empty());
419 });
420 }
421
422 /**
423 * Function to process a vote when a user clicks an arrow.
424 */
425 function handleVote(link) {
426 if (!opts.voting) {
427 showError("You'll need to login to vote.");
428 return;
429 }
430
431 var id = link.attr('id');
432 if (!id) {
433 // Didn't click on one of the voting arrows.
434 return;
435 }
436 // If it is an unvote, the new vote value is 0,
437 // Otherwise it's 1 for an upvote, or -1 for a downvote.
438 var value = 0;
439 if (id.charAt(1) != 'u') {
440 value = id.charAt(0) == 'u' ? 1 : -1;
441 }
442 // The data to be sent to the server.
443 var d = {
444 comment_id: id.substring(2),
445 value: value
446 };
447
448 // Swap the vote and unvote links.
449 link.hide();
450 $('#' + id.charAt(0) + (id.charAt(1) == 'u' ? 'v' : 'u') + d.comment_id)
451 .show();
452
453 // The div the comment is displayed in.
454 var div = $('div#cd' + d.comment_id);
455 var data = div.data('comment');
456
457 // If this is not an unvote, and the other vote arrow has
458 // already been pressed, unpress it.
459 if ((d.value !== 0) && (data.vote === d.value * -1)) {
460 $('#' + (d.value == 1 ? 'd' : 'u') + 'u' + d.comment_id).hide();
461 $('#' + (d.value == 1 ? 'd' : 'u') + 'v' + d.comment_id).show();
462 }
463
464 // Update the comments rating in the local data.
465 data.rating += (data.vote === 0) ? d.value : (d.value - data.vote);
466 data.vote = d.value;
467 div.data('comment', data);
468
469 // Change the rating text.
470 div.find('.rating:first')
471 .text(data.rating + ' point' + (data.rating == 1 ? '' : 's'));
472
473 // Send the vote information to the server.
474 $.ajax({
475 type: "POST",
476 url: opts.processVoteURL,
477 data: d,
478 error: function(request, textStatus, error) {
479 showError('Oops, there was a problem casting that vote.');
480 }
481 });
482 }
483
484 /**
485 * Open a reply form used to reply to an existing comment.
486 */
487 function openReply(id) {
488 // Swap out the reply link for the hide link
489 $('#rl' + id).hide();
490 $('#cr' + id).show();
491
492 // Add the reply li to the children ul.
493 var div = $(renderTemplate(replyTemplate, {id: id})).hide();
494 $('#cl' + id)
495 .prepend(div)
496 // Setup the submit handler for the reply form.
497 .find('#rf' + id)
498 .submit(function(event) {
499 event.preventDefault();
500 addComment($('#rf' + id));
501 closeReply(id);
502 })
503 .find('input[type=button]')
504 .click(function() {
505 closeReply(id);
506 });
507 div.slideDown('fast', function() {
508 $('#rf' + id).find('textarea').focus();
509 });
510 }
511
512 /**
513 * Close the reply form opened with openReply.
514 */
515 function closeReply(id) {
516 // Remove the reply div from the DOM.
517 $('#rd' + id).slideUp('fast', function() {
518 $(this).remove();
519 });
520
521 // Swap out the hide link for the reply link
522 $('#cr' + id).hide();
523 $('#rl' + id).show();
524 }
525
526 /**
527 * Recursively sort a tree of comments using the comp comparator.
528 */
529 function sortComments(comments) {
530 comments.sort(comp);
531 $.each(comments, function() {
532 this.children = sortComments(this.children);
533 });
534 return comments;
535 }
536
537 /**
538 * Get the children comments from a ul. If recursive is true,
539 * recursively include childrens' children.
540 */
541 function getChildren(ul, recursive) {
542 var children = [];
543 ul.children().children("[id^='cd']")
544 .each(function() {
545 var comment = $(this).data('comment');
546 if (recursive)
547 comment.children = getChildren($(this).find('#cl' + comment.id), true);
548 children.push(comment);
549 });
550 return children;
551 }
552
553 /** Create a div to display a comment in. */
554 function createCommentDiv(comment) {
555 if (!comment.displayed && !opts.moderator) {
556 return $('<div class="moderate">Thank you! Your comment will show up '
557 + 'once it is has been approved by a moderator.</div>');
558 }
559 // Prettify the comment rating.
560 comment.pretty_rating = comment.rating + ' point' +
561 (comment.rating == 1 ? '' : 's');
562 // Make a class (for displaying not yet moderated comments differently)
563 comment.css_class = comment.displayed ? '' : ' moderate';
564 // Create a div for this comment.
565 var context = $.extend({}, opts, comment);
566 var div = $(renderTemplate(commentTemplate, context));
567
568 // If the user has voted on this comment, highlight the correct arrow.
569 if (comment.vote) {
570 var direction = (comment.vote == 1) ? 'u' : 'd';
571 div.find('#' + direction + 'v' + comment.id).hide();
572 div.find('#' + direction + 'u' + comment.id).show();
573 }
574
575 if (opts.moderator || comment.text != '[deleted]') {
576 div.find('a.reply').show();
577 if (comment.proposal_diff)
578 div.find('#sp' + comment.id).show();
579 if (opts.moderator && !comment.displayed)
580 div.find('#cm' + comment.id).show();
581 if (opts.moderator || (opts.username == comment.username))
582 div.find('#dc' + comment.id).show();
583 }
584 return div;
585 }
586
587 /**
588 * A simple template renderer. Placeholders such as <%id%> are replaced
589 * by context['id'] with items being escaped. Placeholders such as <#id#>
590 * are not escaped.
591 */
592 function renderTemplate(template, context) {
593 var esc = $(document.createElement('div'));
594
595 function handle(ph, escape) {
596 var cur = context;
597 $.each(ph.split('.'), function() {
598 cur = cur[this];
599 });
600 return escape ? esc.text(cur || "").html() : cur;
601 }
602
603 return template.replace(/<([%#])([\w\.]*)\1>/g, function() {
604 return handle(arguments[2], arguments[1] == '%' ? true : false);
605 });
606 }
607
608 /** Flash an error message briefly. */
609 function showError(message) {
610 $(document.createElement('div')).attr({'class': 'popup-error'})
611 .append($(document.createElement('div'))
612 .attr({'class': 'error-message'}).text(message))
613 .appendTo('body')
614 .fadeIn("slow")
615 .delay(2000)
616 .fadeOut("slow");
617 }
618
619 /** Add a link the user uses to open the comments popup. */
620 $.fn.comment = function() {
621 return this.each(function() {
622 var id = $(this).attr('id').substring(1);
623 var count = COMMENT_METADATA[id];
624 var title = count + ' comment' + (count == 1 ? '' : 's');
625 var image = count > 0 ? opts.commentBrightImage : opts.commentImage;
626 var addcls = count == 0 ? ' nocomment' : '';
627 $(this)
628 .append(
629 $(document.createElement('a')).attr({
630 href: '#',
631 'class': 'sphinx-comment-open' + addcls,
632 id: 'ao' + id
633 })
634 .append($(document.createElement('img')).attr({
635 src: image,
636 alt: 'comment',
637 title: title
638 }))
639 .click(function(event) {
640 event.preventDefault();
641 show($(this).attr('id').substring(2));
642 })
643 )
644 .append(
645 $(document.createElement('a')).attr({
646 href: '#',
647 'class': 'sphinx-comment-close hidden',
648 id: 'ah' + id
649 })
650 .append($(document.createElement('img')).attr({
651 src: opts.closeCommentImage,
652 alt: 'close',
653 title: 'close'
654 }))
655 .click(function(event) {
656 event.preventDefault();
657 hide($(this).attr('id').substring(2));
658 })
659 );
660 });
661 };
662
663 var opts = {
664 processVoteURL: '/_process_vote',
665 addCommentURL: '/_add_comment',
666 getCommentsURL: '/_get_comments',
667 acceptCommentURL: '/_accept_comment',
668 deleteCommentURL: '/_delete_comment',
669 commentImage: '/static/_static/comment.png',
670 closeCommentImage: '/static/_static/comment-close.png',
671 loadingImage: '/static/_static/ajax-loader.gif',
672 commentBrightImage: '/static/_static/comment-bright.png',
673 upArrow: '/static/_static/up.png',
674 downArrow: '/static/_static/down.png',
675 upArrowPressed: '/static/_static/up-pressed.png',
676 downArrowPressed: '/static/_static/down-pressed.png',
677 voting: false,
678 moderator: false
679 };
680
681 if (typeof COMMENT_OPTIONS != "undefined") {
682 opts = jQuery.extend(opts, COMMENT_OPTIONS);
683 }
684
685 var popupTemplate = '\
686 <div class="sphinx-comments" id="sc<%id%>">\
687 <p class="sort-options">\
688 Sort by:\
689 <a href="#" class="sort-option byrating">best rated</a>\
690 <a href="#" class="sort-option byascage">newest</a>\
691 <a href="#" class="sort-option byage">oldest</a>\
692 </p>\
693 <div class="comment-header">Comments</div>\
694 <div class="comment-loading" id="cn<%id%>">\
695 loading comments... <img src="<%loadingImage%>" alt="" /></div>\
696 <ul id="cl<%id%>" class="comment-ul"></ul>\
697 <div id="ca<%id%>">\
698 <p class="add-a-comment">Add a comment\
699 (<a href="#" class="comment-markup" id="ab<%id%>">markup</a>):</p>\
700 <div class="comment-markup-box" id="mb<%id%>">\
701 reStructured text markup: <i>*emph*</i>, <b>**strong**</b>, \
702 <code>``code``</code>, \
703 code blocks: <code>::</code> and an indented block after blank line</div>\
704 <form method="post" id="cf<%id%>" class="comment-form" action="">\
705 <textarea name="comment" cols="80"></textarea>\
706 <p class="propose-button">\
707 <a href="#" id="pc<%id%>" class="show-propose-change">\
708 Propose a change &#9657;\
709 </a>\
710 <a href="#" id="hc<%id%>" class="hide-propose-change">\
711 Propose a change &#9663;\
712 </a>\
713 </p>\
714 <textarea name="proposal" id="pt<%id%>" cols="80"\
715 spellcheck="false"></textarea>\
716 <input type="submit" value="Add comment" />\
717 <input type="hidden" name="node" value="<%id%>" />\
718 <input type="hidden" name="parent" value="" />\
719 </form>\
720 </div>\
721 </div>';
722
723 var commentTemplate = '\
724 <div id="cd<%id%>" class="sphinx-comment<%css_class%>">\
725 <div class="vote">\
726 <div class="arrow">\
727 <a href="#" id="uv<%id%>" class="vote" title="vote up">\
728 <img src="<%upArrow%>" />\
729 </a>\
730 <a href="#" id="uu<%id%>" class="un vote" title="vote up">\
731 <img src="<%upArrowPressed%>" />\
732 </a>\
733 </div>\
734 <div class="arrow">\
735 <a href="#" id="dv<%id%>" class="vote" title="vote down">\
736 <img src="<%downArrow%>" id="da<%id%>" />\
737 </a>\
738 <a href="#" id="du<%id%>" class="un vote" title="vote down">\
739 <img src="<%downArrowPressed%>" />\
740 </a>\
741 </div>\
742 </div>\
743 <div class="comment-content">\
744 <p class="tagline comment">\
745 <span class="user-id"><%username%></span>\
746 <span class="rating"><%pretty_rating%></span>\
747 <span class="delta"><%time.delta%></span>\
748 </p>\
749 <div class="comment-text comment"><#text#></div>\
750 <p class="comment-opts comment">\
751 <a href="#" class="reply hidden" id="rl<%id%>">reply &#9657;</a>\
752 <a href="#" class="close-reply" id="cr<%id%>">reply &#9663;</a>\
753 <a href="#" id="sp<%id%>" class="show-proposal">proposal &#9657;</a>\
754 <a href="#" id="hp<%id%>" class="hide-proposal">proposal &#9663;</a>\
755 <a href="#" id="dc<%id%>" class="delete-comment hidden">delete</a>\
756 <span id="cm<%id%>" class="moderation hidden">\
757 <a href="#" id="ac<%id%>" class="accept-comment">accept</a>\
758 </span>\
759 </p>\
760 <pre class="proposal" id="pr<%id%>">\
761 <#proposal_diff#>\
762 </pre>\
763 <ul class="comment-children" id="cl<%id%>"></ul>\
764 </div>\
765 <div class="clearleft"></div>\
766 </div>\
767 </div>';
768
769 var replyTemplate = '\
770 <li>\
771 <div class="reply-div" id="rd<%id%>">\
772 <form id="rf<%id%>">\
773 <textarea name="comment" cols="80"></textarea>\
774 <input type="submit" value="Add reply" />\
775 <input type="button" value="Cancel" />\
776 <input type="hidden" name="parent" value="<%id%>" />\
777 <input type="hidden" name="node" value="" />\
778 </form>\
779 </div>\
780 </li>';
781
782 $(document).ready(function() {
783 init();
784 });
785 })(jQuery);
786
787 $(document).ready(function() {
788 // add comment anchors for all paragraphs that are commentable
789 $('.sphinx-has-comment').comment();
790
791 // highlight search words in search results
792 $("div.context").each(function() {
793 var params = $.getQueryParameters();
794 var terms = (params.q) ? params.q[0].split(/\s+/) : [];
795 var result = $(this);
796 $.each(terms, function() {
797 result.highlightText(this.toLowerCase(), 'highlighted');
798 });
799 });
800
801 // directly open comment window if requested
802 var anchor = document.location.hash;
803 if (anchor.substring(0, 9) == '#comment-') {
804 $('#ao' + anchor.substring(9)).click();
805 document.location.hash = '#s' + anchor.substring(9);
806 }
807 });
+0
-955
doc/build/html/changes.html less more
0 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
1 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
3
4 <html xmlns="http://www.w3.org/1999/xhtml">
5 <head>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
8 <title>Changelog &mdash; GitPython 2.0.9dev0 documentation</title>
9
10 <link rel="stylesheet" href="_static/default.css" type="text/css" />
11 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
12
13 <script type="text/javascript">
14 var DOCUMENTATION_OPTIONS = {
15 URL_ROOT: './',
16 VERSION: '2.0.9dev0',
17 COLLAPSE_INDEX: false,
18 FILE_SUFFIX: '.html',
19 HAS_SOURCE: true
20 };
21 </script>
22 <script type="text/javascript" src="_static/jquery.js"></script>
23 <script type="text/javascript" src="_static/underscore.js"></script>
24 <script type="text/javascript" src="_static/doctools.js"></script>
25 <link rel="top" title="GitPython 2.0.9dev0 documentation" href="index.html" />
26 <link rel="prev" title="Roadmap" href="roadmap.html" />
27
28
29 <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
30
31 </head>
32 <body role="document">
33
34 <div class="document">
35 <div class="documentwrapper">
36 <div class="bodywrapper">
37 <div class="body" role="main">
38
39 <div class="section" id="changelog">
40 <h1>Changelog<a class="headerlink" href="#changelog" title="Permalink to this headline">¶</a></h1>
41 <div class="section" id="bugfixes">
42 <h2>2.0.9 - Bugfixes<a class="headerlink" href="#bugfixes" title="Permalink to this headline">¶</a></h2>
43 <ul class="simple">
44 <li><cite>tag.commit</cite> will now resolve commits deeply.</li>
45 <li><cite>Repo</cite> objects can now be pickled, which helps with multi-processing.</li>
46 <li><cite>Head.checkout()</cite> now deals with detached heads, which is when it will return
47 the <cite>HEAD</cite> reference instead.</li>
48 <li><cite>DiffIndex.iter_change_type(...)</cite> produces better results when diffing</li>
49 </ul>
50 </div>
51 <div class="section" id="features-and-bugfixes">
52 <h2>2.0.8 - Features and Bugfixes<a class="headerlink" href="#features-and-bugfixes" title="Permalink to this headline">¶</a></h2>
53 <ul class="simple">
54 <li><cite>DiffIndex.iter_change_type(...)</cite> produces better results when diffing
55 an index against the working tree.</li>
56 <li><cite>Repo().is_dirty(...)</cite> now supports the <cite>path</cite> parameter, to specify a single
57 path by which to filter the output. Similar to <cite>git status &lt;path&gt;</cite></li>
58 <li>Symbolic refs created by this library will now be written with a newline
59 character, which was previously missing.</li>
60 <li><cite>blame()</cite> now properly preserves multi-line commit messages.</li>
61 <li>No longer corrupt ref-logs by writing multi-line comments into them.</li>
62 </ul>
63 </div>
64 <div class="section" id="new-features">
65 <h2>2.0.7 - New Features<a class="headerlink" href="#new-features" title="Permalink to this headline">¶</a></h2>
66 <ul>
67 <li><dl class="first docutils">
68 <dt><cite>IndexFile.commit(...,skip_hooks=False)</cite> added. This parameter emulates the</dt>
69 <dd><p class="first last">behaviour of <cite>&#8211;no-verify</cite> on the command-line.</p>
70 </dd>
71 </dl>
72 </li>
73 </ul>
74 </div>
75 <div class="section" id="fixes-and-features">
76 <h2>2.0.6 - Fixes and Features<a class="headerlink" href="#fixes-and-features" title="Permalink to this headline">¶</a></h2>
77 <ul class="simple">
78 <li>Fix: remote output parser now correctly matches refs with non-ASCII
79 chars in them</li>
80 <li>API: Diffs now have <cite>a_rawpath</cite>, <cite>b_rawpath</cite>, <cite>raw_rename_from</cite>,
81 <cite>raw_rename_to</cite> properties, which are the raw-bytes equivalents of their
82 unicode path counterparts.</li>
83 <li>Fix: TypeError about passing keyword argument to string decode() on
84 Python 2.6.</li>
85 <li>Feature: <a class="reference external" href="https://github.com/gitpython-developers/GitPython/pull/446#issuecomment-224670539">setUrl API on Remotes</a></li>
86 </ul>
87 </div>
88 <div class="section" id="fixes">
89 <h2>2.0.5 - Fixes<a class="headerlink" href="#fixes" title="Permalink to this headline">¶</a></h2>
90 <ul class="simple">
91 <li>Fix: parser of fetch info lines choked on some legitimate lines</li>
92 </ul>
93 </div>
94 <div class="section" id="id1">
95 <h2>2.0.4 - Fixes<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2>
96 <ul class="simple">
97 <li>Fix: parser of commit object data is now robust against cases where
98 commit object contains invalid bytes. The invalid characters are now
99 replaced rather than choked on.</li>
100 <li>Fix: non-ASCII paths are now properly decoded and returned in
101 <code class="docutils literal"><span class="pre">.diff()</span></code> output</li>
102 <li>Fix: <cite>RemoteProgress</cite> will now strip the &#8216;, &#8216; prefix or suffix from messages.</li>
103 <li>API: Remote.[fetch|push|pull](...) methods now allow the <code class="docutils literal"><span class="pre">progress</span></code> argument to
104 be a callable. This saves you from creating a custom type with usually just one
105 implemented method.</li>
106 </ul>
107 </div>
108 <div class="section" id="id2">
109 <h2>2.0.3 - Fixes<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h2>
110 <ul class="simple">
111 <li>Fix: bug in <code class="docutils literal"><span class="pre">git-blame</span> <span class="pre">--incremental</span></code> output parser that broken when
112 commit messages contained <code class="docutils literal"><span class="pre">\r</span></code> characters</li>
113 <li>Fix: progress handler exceptions are not caught anymore, which would usually just hide bugs
114 previously.</li>
115 <li>Fix: The <cite>Git.execute</cite> method will now redirect <cite>stdout</cite> to <cite>devnull</cite> if <cite>with_stdout</cite> is false,
116 which is the intended behaviour based on the parameter&#8217;s documentation.</li>
117 </ul>
118 </div>
119 <div class="section" id="id3">
120 <h2>2.0.2 - Fixes<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h2>
121 <ul class="simple">
122 <li>Fix: source package does not include *.pyc files</li>
123 <li>Fix: source package does include doc sources</li>
124 </ul>
125 </div>
126 <div class="section" id="id4">
127 <h2>2.0.1 - Fixes<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h2>
128 <ul class="simple">
129 <li>Fix: remote output parser now correctly matches refs with &#8220;&#64;&#8221; in them</li>
130 </ul>
131 </div>
132 <div class="section" id="features">
133 <h2>2.0.0 - Features<a class="headerlink" href="#features" title="Permalink to this headline">¶</a></h2>
134 <p>Please note that due to breaking changes, we have to increase the major version.</p>
135 <ul class="simple">
136 <li><strong>IMPORTANT</strong>: This release drops support for python 2.6, which is
137 officially deprecated by the python maintainers.</li>
138 <li><strong>CRITICAL</strong>: <cite>Diff</cite> objects created with patch output will now not carry
139 the &#8212; and +++ header lines anymore. All diffs now start with the
140 &#64;&#64; header line directly. Users that rely on the old behaviour can now
141 (reliably) read this information from the a_path and b_path properties
142 without having to parse these lines manually.</li>
143 <li><cite>Commit</cite> now has extra properties <cite>authored_datetime</cite> and
144 <cite>committer_datetime</cite> (to get Python datetime instances rather than
145 timestamps)</li>
146 <li><cite>Commit.diff()</cite> now supports diffing the root commit via
147 <cite>Commit.diff(NULL_TREE)</cite>.</li>
148 <li><cite>Repo.blame()</cite> now respects <cite>incremental=True</cite>, supporting incremental
149 blames. Incremental blames are slightly faster since they don&#8217;t include
150 the file&#8217;s contents in them.</li>
151 <li>Fix: <cite>Diff</cite> objects created with patch output will now have their
152 <cite>a_path</cite> and <cite>b_path</cite> properties parsed out correctly. Previously, some
153 values may have been populated incorrectly when a file was added or
154 deleted.</li>
155 <li>Fix: diff parsing issues with paths that contain &#8220;unsafe&#8221; chars, like
156 spaces, tabs, backslashes, etc.</li>
157 </ul>
158 </div>
159 <div class="section" id="id5">
160 <h2>1.0.2 - Fixes<a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h2>
161 <ul class="simple">
162 <li>IMPORTANT: Changed default object database of <cite>Repo</cite> objects to <cite>GitComdObjectDB</cite>. The pure-python implementation
163 used previously usually fails to release its resources (i.e. file handles), which can lead to problems when working
164 with large repositories.</li>
165 <li>CRITICAL: fixed incorrect <cite>Commit</cite> object serialization when authored or commit date had timezones which were not
166 divisiblej by 3600 seconds. This would happen if the timezone was something like <cite>+0530</cite> for instance.</li>
167 <li>A list of all additional fixes can be found <a class="reference external" href="https://github.com/gitpython-developers/GitPython/issues?q=milestone%3A%22v1.0.2+-+Fixes%22+is%3Aclosed">on github</a></li>
168 <li>CRITICAL: <cite>Tree.cache</cite> was removed without replacement. It is technically impossible to change individual trees and expect their serialization results to be consistent with what <em>git</em> expects. Instead, use the <cite>IndexFile</cite> facilities to adjust the content of the staging area, and write it out to the respective tree objects using <cite>IndexFile.write_tree()</cite> instead.</li>
169 </ul>
170 </div>
171 <div class="section" id="id6">
172 <h2>1.0.1 - Fixes<a class="headerlink" href="#id6" title="Permalink to this headline">¶</a></h2>
173 <ul class="simple">
174 <li>A list of all issues can be found <a class="reference external" href="https://github.com/gitpython-developers/GitPython/issues?q=milestone%3A%22v1.0.1+-+Fixes%22+is%3Aclosed">on github</a></li>
175 </ul>
176 </div>
177 <div class="section" id="notes">
178 <h2>1.0.0 - Notes<a class="headerlink" href="#notes" title="Permalink to this headline">¶</a></h2>
179 <p>This version is equivalent to v0.3.7, but finally acknowledges that GitPython is stable and production ready.</p>
180 <p>It follows the <a class="reference external" href="http://semver.org">semantic version scheme</a>, and thus will not break its existing API unless it goes 2.0.</p>
181 </div>
182 <div class="section" id="id8">
183 <h2>0.3.7 - Fixes<a class="headerlink" href="#id8" title="Permalink to this headline">¶</a></h2>
184 <ul class="simple">
185 <li><cite>IndexFile.add()</cite> will now write the index without any extension data by default. However, you may override this behaviour with the new <cite>write_extension_data</cite> keyword argument.<ul>
186 <li>Renamed <cite>ignore_tree_extension_data</cite> keyword argument in <cite>IndexFile.write(...)</cite> to <cite>ignore_extension_data</cite></li>
187 </ul>
188 </li>
189 <li>If the git command executed during <cite>Remote.push(...)|fetch(...)</cite> returns with an non-zero exit code and GitPython didn&#8217;t
190 obtain any head-information, the corresponding <cite>GitCommandError</cite> will be raised. This may break previous code which expected
191 these operations to never raise. However, that behavious is undesirable as it would effectively hide the fact that there
192 was an error. See <a class="reference external" href="https://github.com/gitpython-developers/GitPython/issues/271">this issue</a> for more information.</li>
193 <li>If the git executable can&#8217;t be found in the PATH or at the path provided by <cite>GIT_PYTHON_GIT_EXECUTABLE</cite>, this is made
194 obvious by throwing <cite>GitCommandNotFound</cite>, both on unix and on windows.<ul>
195 <li>Those who support <strong>GUI on windows</strong> will now have to set <cite>git.Git.USE_SHELL = True</cite> to get the previous behaviour.</li>
196 </ul>
197 </li>
198 <li>A list of all issues can be found <a class="reference external" href="https://github.com/gitpython-developers/GitPython/issues?q=milestone%3A%22v0.3.7+-+Fixes%22+is%3Aclosed">on github</a></li>
199 </ul>
200 </div>
201 <div class="section" id="id10">
202 <h2>0.3.6 - Features<a class="headerlink" href="#id10" title="Permalink to this headline">¶</a></h2>
203 <ul class="simple">
204 <li><strong>DOCS</strong><ul>
205 <li>special members like <cite>__init__</cite> are now listed in the API documentation</li>
206 <li>tutorial section was revised entirely, more advanced examples were added.</li>
207 </ul>
208 </li>
209 <li><strong>POSSIBLY BREAKING CHANGES</strong><ul>
210 <li>As <cite>rev_parse</cite> will now throw <cite>BadName</cite> as well as <cite>BadObject</cite>, client code will have to catch both exception types.</li>
211 <li>Repo.working_tree_dir now returns None if it is bare. Previously it raised AssertionError.</li>
212 <li>IndexFile.add() previously raised AssertionError when paths where used with bare repository, now it raises InvalidGitRepositoryError</li>
213 </ul>
214 </li>
215 <li>Added <cite>Repo.merge_base()</cite> implementation. See the <a class="reference external" href="https://github.com/gitpython-developers/GitPython/issues/169">respective issue on github</a></li>
216 <li><cite>[include]</cite> sections in git configuration files are now respected</li>
217 <li>Added <cite>GitConfigParser.rename_section()</cite></li>
218 <li>Added <cite>Submodule.rename()</cite></li>
219 <li>A list of all issues can be found <a class="reference external" href="https://github.com/gitpython-developers/GitPython/issues?q=milestone%3A%22v0.3.6+-+Features%22+">on github</a></li>
220 </ul>
221 </div>
222 <div class="section" id="id12">
223 <h2>0.3.5 - Bugfixes<a class="headerlink" href="#id12" title="Permalink to this headline">¶</a></h2>
224 <ul class="simple">
225 <li>push/pull/fetch operations will not block anymore</li>
226 <li>diff() can now properly detect renames, both in patch and raw format. Previously it only worked when create_patch was True.</li>
227 <li>repo.odb.update_cache() is now called automatically after fetch and pull operations. In case you did that in your own code, you might want to remove your line to prevent a double-update that causes unnecessary IO.</li>
228 <li><cite>Repo(path)</cite> will not automatically search upstream anymore and find any git directory on its way up. If you need that behaviour, you can turn it back on using the new <cite>search_parent_directories=True</cite> flag when constructing a <cite>Repo</cite> object.</li>
229 <li>IndexFile.commit() now runs the <cite>pre-commit</cite> and <cite>post-commit</cite> hooks. Verified to be working on posix systems only.</li>
230 <li>A list of all fixed issues can be found here: <a class="reference external" href="https://github.com/gitpython-developers/GitPython/issues?q=milestone%3A%22v0.3.5+-+bugfixes%22+">https://github.com/gitpython-developers/GitPython/issues?q=milestone%3A%22v0.3.5+-+bugfixes%22+</a></li>
231 </ul>
232 </div>
233 <div class="section" id="python-3-support">
234 <h2>0.3.4 - Python 3 Support<a class="headerlink" href="#python-3-support" title="Permalink to this headline">¶</a></h2>
235 <ul class="simple">
236 <li>Internally, hexadecimal SHA1 are treated as ascii encoded strings. Binary SHA1 are treated as bytes.</li>
237 <li>Id attribute of Commit objects is now <cite>hexsha</cite>, instead of <cite>binsha</cite>. The latter makes no sense in python 3 and I see no application of it anyway besides its artificial usage in test cases.</li>
238 <li><strong>IMPORTANT</strong>: If you were using the config_writer(), you implicitly relied on __del__ to work as expected to flush changes. To be sure changes are flushed under PY3, you will have to call the new <cite>release()</cite> method to trigger a flush. For some reason, __del__ is not called necessarily anymore when a symbol goes out of scope.</li>
239 <li>The <cite>Tree</cite> now has a <cite>.join(&#8216;name&#8217;)</cite> method which is equivalent to <cite>tree / &#8216;name&#8217;</cite></li>
240 </ul>
241 </div>
242 <div class="section" id="id13">
243 <h2>0.3.3<a class="headerlink" href="#id13" title="Permalink to this headline">¶</a></h2>
244 <ul class="simple">
245 <li>When fetching, pulling or pushing, and an error occours, it will not be reported on stdout anymore. However, if there is a fatal error, it will still result in a GitCommandError to be thrown. This goes hand in hand with improved fetch result parsing.</li>
246 <li>Code Cleanup (in preparation for python 3 support)<ul>
247 <li>Applied autopep8 and cleaned up code</li>
248 <li>Using python logging module instead of print statments to signal certain kinds of errors</li>
249 </ul>
250 </li>
251 </ul>
252 </div>
253 <div class="section" id="id14">
254 <h2>0.3.2.1<a class="headerlink" href="#id14" title="Permalink to this headline">¶</a></h2>
255 <ul class="simple">
256 <li><a class="reference external" href="https://github.com/gitpython-developers/GitPython/issues/207">Fix for #207</a></li>
257 </ul>
258 </div>
259 <div class="section" id="id15">
260 <h2>0.3.2<a class="headerlink" href="#id15" title="Permalink to this headline">¶</a></h2>
261 <ul class="simple">
262 <li>Release of most recent version as non-RC build, just to allow pip to install the latest version right away.</li>
263 <li>Have a look at the milestones (<a class="reference external" href="https://github.com/gitpython-developers/GitPython/milestones">https://github.com/gitpython-developers/GitPython/milestones</a>) to see what&#8217;s next.</li>
264 </ul>
265 </div>
266 <div class="section" id="rc1">
267 <h2>0.3.2 RC1<a class="headerlink" href="#rc1" title="Permalink to this headline">¶</a></h2>
268 <ul class="simple">
269 <li><strong>git</strong> command wrapper</li>
270 </ul>
271 <blockquote>
272 <div><ul class="simple">
273 <li>Added <code class="docutils literal"><span class="pre">version_info</span></code> property which returns a tuple of integers representing the installed git version.</li>
274 <li>Added GIT_PYTHON_GIT_EXECUTABLE environment variable, which can be used to set the desired git executable to be used. despite of what would be found in the path.</li>
275 </ul>
276 </div></blockquote>
277 <ul class="simple">
278 <li><strong>Blob</strong> Type</li>
279 </ul>
280 <blockquote>
281 <div><ul class="simple">
282 <li>Added mode constants to ease the manual creation of blobs</li>
283 </ul>
284 </div></blockquote>
285 <ul class="simple">
286 <li><strong>IterableList</strong></li>
287 </ul>
288 <blockquote>
289 <div><ul class="simple">
290 <li>Added __contains__ and __delitem__ methods</li>
291 </ul>
292 </div></blockquote>
293 <ul class="simple">
294 <li><strong>More Changes</strong></li>
295 </ul>
296 <blockquote>
297 <div><ul class="simple">
298 <li>Configuration file parsing is more robust. It should now be able to handle everything that the git command can parse as well.</li>
299 <li>The progress parsing was updated to support git 1.7.0.3 and newer. Previously progress was not enabled for the git command or only worked with ssh in case of older git versions.</li>
300 <li>Parsing of tags was improved. Previously some parts of the name could not be parsed properly.</li>
301 <li>The rev-parse pure python implementation now handles branches correctly if they look like hexadecimal sha&#8217;s.</li>
302 <li>GIT_PYTHON_TRACE is now set on class level of the Git type, previously it was a module level global variable.</li>
303 <li>GIT_PYTHON_GIT_EXECUTABLE is a class level variable as well.</li>
304 </ul>
305 </div></blockquote>
306 </div>
307 <div class="section" id="beta-2">
308 <h2>0.3.1 Beta 2<a class="headerlink" href="#beta-2" title="Permalink to this headline">¶</a></h2>
309 <ul class="simple">
310 <li>Added <strong>reflog support</strong> ( reading and writing )</li>
311 </ul>
312 <blockquote>
313 <div><ul>
314 <li><p class="first">New types: <code class="docutils literal"><span class="pre">RefLog</span></code> and <code class="docutils literal"><span class="pre">RefLogEntry</span></code></p>
315 </li>
316 <li><p class="first">Reflog is maintained automatically when creating references and deleting them</p>
317 </li>
318 <li><p class="first">Non-intrusive changes to <code class="docutils literal"><span class="pre">SymbolicReference</span></code>, these don&#8217;t require your code to change. They allow to append messages to the reflog.</p>
319 <blockquote>
320 <div><ul class="simple">
321 <li><code class="docutils literal"><span class="pre">abspath</span></code> property added, similar to <code class="docutils literal"><span class="pre">abspath</span></code> of Object instances</li>
322 <li><code class="docutils literal"><span class="pre">log()</span></code> method added</li>
323 <li><code class="docutils literal"><span class="pre">log_append(...)</span></code> method added</li>
324 <li><code class="docutils literal"><span class="pre">set_reference(...)</span></code> method added (reflog support)</li>
325 <li><code class="docutils literal"><span class="pre">set_commit(...)</span></code> method added (reflog support)</li>
326 <li><code class="docutils literal"><span class="pre">set_object(...)</span></code> method added (reflog support)</li>
327 </ul>
328 </div></blockquote>
329 </li>
330 <li><p class="first"><strong>Intrusive Changes</strong> to <code class="docutils literal"><span class="pre">Head</span></code> type</p>
331 </li>
332 </ul>
333 <blockquote>
334 <div><ul class="simple">
335 <li><code class="docutils literal"><span class="pre">create(...)</span></code> method now supports the reflog, but will not raise <code class="docutils literal"><span class="pre">GitCommandError</span></code> anymore as it is a pure python implementation now. Instead, it raises <code class="docutils literal"><span class="pre">OSError</span></code>.</li>
336 </ul>
337 </div></blockquote>
338 <ul class="simple">
339 <li><strong>Intrusive Changes</strong> to <code class="docutils literal"><span class="pre">Repo</span></code> type</li>
340 </ul>
341 <blockquote>
342 <div><ul class="simple">
343 <li><code class="docutils literal"><span class="pre">create_head(...)</span></code> method does not support kwargs anymore, instead it supports a logmsg parameter</li>
344 </ul>
345 </div></blockquote>
346 </div></blockquote>
347 <ul>
348 <li><p class="first">Repo.rev_parse now supports the [ref]&#64;{n} syntax, where <em>n</em> is the number of steps to look into the reference&#8217;s past</p>
349 </li>
350 <li><p class="first"><strong>BugFixes</strong></p>
351 <blockquote>
352 <div><ul class="simple">
353 <li>Removed incorrect ORIG_HEAD handling</li>
354 </ul>
355 </div></blockquote>
356 </li>
357 <li><p class="first"><strong>Flattened directory</strong> structure to make development more convenient.</p>
358 </li>
359 </ul>
360 <blockquote>
361 <div><ul>
362 <li><div class="first admonition note">
363 <p class="first admonition-title">Note</p>
364 <p class="last">This alters the way projects using git-python as a submodule have to adjust their sys.path to be able to import git-python successfully.</p>
365 </div>
366 </li>
367 <li><p class="first">Misc smaller changes and bugfixes</p>
368 </li>
369 </ul>
370 </div></blockquote>
371 </div>
372 <div class="section" id="beta-1">
373 <h2>0.3.1 Beta 1<a class="headerlink" href="#beta-1" title="Permalink to this headline">¶</a></h2>
374 <ul class="simple">
375 <li>Full Submodule-Support</li>
376 <li>Added unicode support for author names. Commit.author.name is now unicode instead of string.</li>
377 <li>Head Type changes</li>
378 </ul>
379 <blockquote>
380 <div><ul class="simple">
381 <li>config_reader() &amp; config_writer() methods added for access to head specific options.</li>
382 <li>tracking_branch() &amp; set_tracking_branch() methods addded for easy configuration of tracking branches.</li>
383 </ul>
384 </div></blockquote>
385 </div>
386 <div class="section" id="id16">
387 <h2>0.3.0 Beta 2<a class="headerlink" href="#id16" title="Permalink to this headline">¶</a></h2>
388 <ul class="simple">
389 <li>Added python 2.4 support</li>
390 </ul>
391 </div>
392 <div class="section" id="id17">
393 <h2>0.3.0 Beta 1<a class="headerlink" href="#id17" title="Permalink to this headline">¶</a></h2>
394 <div class="section" id="renamed-modules">
395 <h3>Renamed Modules<a class="headerlink" href="#renamed-modules" title="Permalink to this headline">¶</a></h3>
396 <ul class="simple">
397 <li>For consistency with naming conventions used in sub-modules like gitdb, the following modules have been renamed<ul>
398 <li>git.utils -&gt; git.util</li>
399 <li>git.errors -&gt; git.exc</li>
400 <li>git.objects.utils -&gt; git.objects.util</li>
401 </ul>
402 </li>
403 </ul>
404 </div>
405 <div class="section" id="general">
406 <h3>General<a class="headerlink" href="#general" title="Permalink to this headline">¶</a></h3>
407 <ul class="simple">
408 <li>Object instances, and everything derived from it, now use binary sha&#8217;s internally. The &#8216;sha&#8217; member was removed, in favor of the &#8216;binsha&#8217; member. An &#8216;hexsha&#8217; property is available for convenient conversions. They may only be initialized using their binary shas, reference names or revision specs are not allowed anymore.</li>
409 <li>IndexEntry instances contained in IndexFile.entries now use binary sha&#8217;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.</li>
410 <li>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.</li>
411 <li>The .data attribute was removed from the Object type, to obtain plain data, use the data_stream property instead.</li>
412 <li>ConcurrentWriteOperation was removed, and replaced by LockedFD</li>
413 <li>IndexFile.get_entries_key was renamed to entry_key</li>
414 <li>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&#8217;t support the missing_ok keyword yet.</li>
415 <li>diff.Diff.null_hex_sha renamed to NULL_HEX_SHA, to be conforming with the naming in the Object base class</li>
416 </ul>
417 </div>
418 </div>
419 <div class="section" id="id18">
420 <h2>0.2 Beta 2<a class="headerlink" href="#id18" title="Permalink to this headline">¶</a></h2>
421 <blockquote>
422 <div><ul class="simple">
423 <li>Commit objects now carry the &#8216;encoding&#8217; information of their message. It wasn&#8217;t parsed previously, and defaults to UTF-8</li>
424 <li>Commit.create_from_tree now uses a pure-python implementation, mimicing git-commit-tree</li>
425 </ul>
426 </div></blockquote>
427 </div>
428 <div class="section" id="id19">
429 <h2>0.2<a class="headerlink" href="#id19" title="Permalink to this headline">¶</a></h2>
430 <div class="section" id="id20">
431 <h3>General<a class="headerlink" href="#id20" title="Permalink to this headline">¶</a></h3>
432 <ul class="simple">
433 <li>file mode in Tree, Blob and Diff objects now is an int compatible to definintiions
434 in the stat module, allowing you to query whether individual user, group and other
435 read, write and execute bits are set.</li>
436 <li>Adjusted class hierarchy to generally allow comparison and hash for Objects and Refs</li>
437 <li>Improved Tag object which now is a Ref that may contain a tag object with additional
438 Information</li>
439 <li>id_abbrev method has been removed as it could not assure the returned short SHA&#8217;s
440 where unique</li>
441 <li>removed basename method from Objects with path&#8217;s as it replicated features of os.path</li>
442 <li>from_string and list_from_string methods are now private and were renamed to
443 _from_string and _list_from_string respectively. As part of the private API, they
444 may change without prior notice.</li>
445 <li>Renamed all find_all methods to list_items - this method is part of the Iterable interface
446 that also provides a more efficients and more responsive iter_items method</li>
447 <li>All dates, like authored_date and committer_date, are stored as seconds since epoc
448 to consume less memory - they can be converted using time.gmtime in a more suitable
449 presentation format if needed.</li>
450 <li>Named method parameters changed on a wide scale to unify their use. Now git specific
451 terms are used everywhere, such as &#8220;Reference&#8221; ( ref ) and &#8220;Revision&#8221; ( rev ).
452 Prevously multiple terms where used making it harder to know which type was allowed
453 or not.</li>
454 <li>Unified diff interface to allow easy diffing between trees, trees and index, trees
455 and working tree, index and working tree, trees and index. This closely follows
456 the git-diff capabilities.</li>
457 <li>Git.execute does not take the with_raw_output option anymore. It was not used
458 by anyone within the project and False by default.</li>
459 </ul>
460 </div>
461 <div class="section" id="item-iteration">
462 <h3>Item Iteration<a class="headerlink" href="#item-iteration" title="Permalink to this headline">¶</a></h3>
463 <ul class="simple">
464 <li>Previously one would return and process multiple items as list only which can
465 hurt performance and memory consumption and reduce response times.
466 iter_items method provide an iterator that will return items on demand as parsed
467 from a stream. This way any amount of objects can be handled.</li>
468 <li>list_items method returns IterableList allowing to access list members by name</li>
469 </ul>
470 </div>
471 <div class="section" id="objects-package">
472 <h3>objects Package<a class="headerlink" href="#objects-package" title="Permalink to this headline">¶</a></h3>
473 <ul class="simple">
474 <li>blob, tree, tag and commit module have been moved to new objects package. This should
475 not affect you though unless you explicitly imported individual objects. If you just
476 used the git package, names did not change.</li>
477 </ul>
478 </div>
479 <div class="section" id="blob">
480 <h3>Blob<a class="headerlink" href="#blob" title="Permalink to this headline">¶</a></h3>
481 <ul class="simple">
482 <li>former &#8216;name&#8217; member renamed to path as it suits the actual data better</li>
483 </ul>
484 </div>
485 <div class="section" id="gitcommand">
486 <h3>GitCommand<a class="headerlink" href="#gitcommand" title="Permalink to this headline">¶</a></h3>
487 <ul class="simple">
488 <li>git.subcommand call scheme now prunes out None from the argument list, allowing
489 to be called more confortably as None can never be a valid to the git command
490 if converted to a string.</li>
491 <li>Renamed &#8216;git_dir&#8217; attribute to &#8216;working_dir&#8217; which is exactly how it is used</li>
492 </ul>
493 </div>
494 <div class="section" id="commit">
495 <h3>Commit<a class="headerlink" href="#commit" title="Permalink to this headline">¶</a></h3>
496 <ul class="simple">
497 <li>&#8216;count&#8217; method is not an instance method to increase its ease of use</li>
498 <li>&#8216;name_rev&#8217; property returns a nice name for the commit&#8217;s sha</li>
499 </ul>
500 </div>
501 <div class="section" id="config">
502 <h3>Config<a class="headerlink" href="#config" title="Permalink to this headline">¶</a></h3>
503 <ul class="simple">
504 <li>The git configuration can now be read and manipulated directly from within python
505 using the GitConfigParser</li>
506 <li>Repo.config_reader() returns a read-only parser</li>
507 <li>Repo.config_writer() returns a read-write parser</li>
508 </ul>
509 </div>
510 <div class="section" id="diff">
511 <h3>Diff<a class="headerlink" href="#diff" title="Permalink to this headline">¶</a></h3>
512 <ul class="simple">
513 <li>Members a a_commit and b_commit renamed to a_blob and b_blob - they are populated
514 with Blob objects if possible</li>
515 <li>Members a_path and b_path removed as this information is kept in the blobs</li>
516 <li>Diffs are now returned as DiffIndex allowing to more quickly find the kind of
517 diffs you are interested in</li>
518 </ul>
519 </div>
520 <div class="section" id="diffing">
521 <h3>Diffing<a class="headerlink" href="#diffing" title="Permalink to this headline">¶</a></h3>
522 <ul class="simple">
523 <li>Commit and Tree objects now support diffing natively with a common interface to
524 compare agains other Commits or Trees, against the working tree or against the index.</li>
525 </ul>
526 </div>
527 <div class="section" id="index">
528 <h3>Index<a class="headerlink" href="#index" title="Permalink to this headline">¶</a></h3>
529 <ul class="simple">
530 <li>A new Index class allows to read and write index files directly, and to perform
531 simple two and three way merges based on an arbitrary index.</li>
532 </ul>
533 </div>
534 <div class="section" id="referernces">
535 <h3>Referernces<a class="headerlink" href="#referernces" title="Permalink to this headline">¶</a></h3>
536 <ul class="simple">
537 <li>References are object that point to a Commit</li>
538 <li>SymbolicReference are a pointer to a Reference Object, which itself points to a specific
539 Commit</li>
540 <li>They will dynmically retrieve their object at the time of query to assure the information
541 is actual. Recently objects would be cached, hence ref object not be safely kept
542 persistent.</li>
543 </ul>
544 </div>
545 <div class="section" id="repo">
546 <h3>Repo<a class="headerlink" href="#repo" title="Permalink to this headline">¶</a></h3>
547 <ul class="simple">
548 <li>Moved blame method from Blob to repo as it appeared to belong there much more.</li>
549 <li>active_branch method now returns a Head object instead of a string with the name
550 of the active branch.</li>
551 <li>tree method now requires a Ref instance as input and defaults to the active_branche
552 instead of master</li>
553 <li>is_dirty now takes additional arguments allowing fine-grained control about what is
554 considered dirty</li>
555 <li>Removed the following methods:<ul>
556 <li>&#8216;log&#8217; method as it as effectively the same as the &#8216;commits&#8217; method</li>
557 <li>&#8216;commits_since&#8217; as it is just a flag given to rev-list in Commit.iter_items</li>
558 <li>&#8216;commit_count&#8217; as it was just a redirection to the respective commit method</li>
559 <li>&#8216;commits_between&#8217;, replaced by a note on the iter_commits method as it can achieve the same thing</li>
560 <li>&#8216;commit_delta_from&#8217; as it was a very special case by comparing two different repjrelated repositories, i.e. clones, git-rev-list would be sufficient to find commits that would need to be transferred for example.</li>
561 <li>&#8216;create&#8217; method which equals the &#8216;init&#8217; method&#8217;s functionality</li>
562 <li>&#8216;diff&#8217; - it returned a mere string which still had to be parsed</li>
563 <li>&#8216;commit_diff&#8217; - moved to Commit, Tree and Diff types respectively</li>
564 </ul>
565 </li>
566 <li>Renamed the following methods:<ul>
567 <li>commits to iter_commits to improve the performance, adjusted signature</li>
568 <li>init_bare to init, implying less about the options to be used</li>
569 <li>fork_bare to clone, as it was to represent general clone functionality, but implied
570 a bare clone to be more versatile</li>
571 <li>archive_tar_gz and archive_tar and replaced by archive method with different signature</li>
572 </ul>
573 </li>
574 <li>&#8216;commits&#8217; method has no max-count of returned commits anymore, it now behaves like git-rev-list</li>
575 <li>The following methods and properties were added<ul>
576 <li>&#8216;untracked_files&#8217; property, returning all currently untracked files</li>
577 <li>&#8216;head&#8217;, creates a head object</li>
578 <li>&#8216;tag&#8217;, creates a tag object</li>
579 <li>&#8216;iter_trees&#8217; method</li>
580 <li>&#8216;config_reader&#8217; method</li>
581 <li>&#8216;config_writer&#8217; method</li>
582 <li>&#8216;bare&#8217; property, previously it was a simple attribute that could be written</li>
583 </ul>
584 </li>
585 <li>Renamed the following attributes<ul>
586 <li>&#8216;path&#8217; is now &#8216;git_dir&#8217;</li>
587 <li>&#8216;wd&#8217; is now &#8216;working_dir&#8217;</li>
588 </ul>
589 </li>
590 <li>Added attribute<ul>
591 <li>&#8216;working_tree_dir&#8217; which may be None in case of bare repositories</li>
592 </ul>
593 </li>
594 </ul>
595 </div>
596 <div class="section" id="remote">
597 <h3>Remote<a class="headerlink" href="#remote" title="Permalink to this headline">¶</a></h3>
598 <ul class="simple">
599 <li>Added Remote object allowing easy access to remotes</li>
600 <li>Repo.remotes lists all remotes</li>
601 <li>Repo.remote returns a remote of the specified name if it exists</li>
602 </ul>
603 </div>
604 <div class="section" id="test-framework">
605 <h3>Test Framework<a class="headerlink" href="#test-framework" title="Permalink to this headline">¶</a></h3>
606 <ul class="simple">
607 <li>Added support for common TestCase base class that provides additional functionality
608 to receive repositories tests can also write to. This way, more aspects can be
609 tested under real-world ( un-mocked ) conditions.</li>
610 </ul>
611 </div>
612 <div class="section" id="tree">
613 <h3>Tree<a class="headerlink" href="#tree" title="Permalink to this headline">¶</a></h3>
614 <ul class="simple">
615 <li>former &#8216;name&#8217; member renamed to path as it suits the actual data better</li>
616 <li>added traverse method allowing to recursively traverse tree items</li>
617 <li>deleted blob method</li>
618 <li>added blobs and trees properties allowing to query the respective items in the
619 tree</li>
620 <li>now mimics behaviour of a read-only list instead of a dict to maintain order.</li>
621 <li>content_from_string method is now private and not part of the public API anymore</li>
622 </ul>
623 </div>
624 </div>
625 <div class="section" id="id21">
626 <h2>0.1.6<a class="headerlink" href="#id21" title="Permalink to this headline">¶</a></h2>
627 <div class="section" id="id22">
628 <h3>General<a class="headerlink" href="#id22" title="Permalink to this headline">¶</a></h3>
629 <ul class="simple">
630 <li>Added in Sphinx documentation.</li>
631 <li>Removed ambiguity between paths and treeishs. When calling commands that
632 accept treeish and path arguments and there is a path with the same name as
633 a treeish git cowardly refuses to pick one and asks for the command to use
634 the unambiguous syntax where &#8216;&#8211;&#8217; seperates the treeish from the paths.</li>
635 <li><code class="docutils literal"><span class="pre">Repo.commits</span></code>, <code class="docutils literal"><span class="pre">Repo.commits_between</span></code>, <code class="docutils literal"><span class="pre">Repo.commits_since</span></code>,
636 <code class="docutils literal"><span class="pre">Repo.commit_count</span></code>, <code class="docutils literal"><span class="pre">Repo.commit</span></code>, <code class="docutils literal"><span class="pre">Commit.count</span></code> and
637 <code class="docutils literal"><span class="pre">Commit.find_all</span></code> all now optionally take a path argument which
638 constrains the lookup by path. This changes the order of the positional
639 arguments in <code class="docutils literal"><span class="pre">Repo.commits</span></code> and <code class="docutils literal"><span class="pre">Repo.commits_since</span></code>.</li>
640 </ul>
641 </div>
642 <div class="section" id="id23">
643 <h3>Commit<a class="headerlink" href="#id23" title="Permalink to this headline">¶</a></h3>
644 <ul class="simple">
645 <li><code class="docutils literal"><span class="pre">Commit.message</span></code> now contains the full commit message (rather than just
646 the first line) and a new property <code class="docutils literal"><span class="pre">Commit.summary</span></code> contains the first
647 line of the commit message.</li>
648 <li>Fixed a failure when trying to lookup the stats of a parentless commit from
649 a bare repo.</li>
650 </ul>
651 </div>
652 <div class="section" id="id24">
653 <h3>Diff<a class="headerlink" href="#id24" title="Permalink to this headline">¶</a></h3>
654 <ul class="simple">
655 <li>The diff parser is now far faster and also addresses a bug where
656 sometimes b_mode was not set.</li>
657 <li>Added support for parsing rename info to the diff parser. Addition of new
658 properties <code class="docutils literal"><span class="pre">Diff.renamed</span></code>, <code class="docutils literal"><span class="pre">Diff.rename_from</span></code>, and <code class="docutils literal"><span class="pre">Diff.rename_to</span></code>.</li>
659 </ul>
660 </div>
661 <div class="section" id="head">
662 <h3>Head<a class="headerlink" href="#head" title="Permalink to this headline">¶</a></h3>
663 <ul class="simple">
664 <li>Corrected problem where branches was only returning the last path component
665 instead of the entire path component following refs/heads/.</li>
666 </ul>
667 </div>
668 <div class="section" id="id25">
669 <h3>Repo<a class="headerlink" href="#id25" title="Permalink to this headline">¶</a></h3>
670 <ul class="simple">
671 <li>Modified the gzip archive creation to use the python gzip module.</li>
672 <li>Corrected <code class="docutils literal"><span class="pre">commits_between</span></code> always returning None instead of the reversed
673 list.</li>
674 </ul>
675 </div>
676 </div>
677 <div class="section" id="id26">
678 <h2>0.1.5<a class="headerlink" href="#id26" title="Permalink to this headline">¶</a></h2>
679 <div class="section" id="id27">
680 <h3>General<a class="headerlink" href="#id27" title="Permalink to this headline">¶</a></h3>
681 <ul class="simple">
682 <li>upgraded to Mock 0.4 dependency.</li>
683 <li>Replace GitPython with git in repr() outputs.</li>
684 <li>Fixed packaging issue caused by ez_setup.py.</li>
685 </ul>
686 </div>
687 <div class="section" id="id28">
688 <h3>Blob<a class="headerlink" href="#id28" title="Permalink to this headline">¶</a></h3>
689 <ul class="simple">
690 <li>No longer strip newlines from Blob data.</li>
691 </ul>
692 </div>
693 <div class="section" id="id29">
694 <h3>Commit<a class="headerlink" href="#id29" title="Permalink to this headline">¶</a></h3>
695 <ul class="simple">
696 <li>Corrected problem with git-rev-list &#8211;bisect-all. See
697 <a class="reference external" href="http://groups.google.com/group/git-python/browse_thread/thread/aed1d5c4b31d5027">http://groups.google.com/group/git-python/browse_thread/thread/aed1d5c4b31d5027</a></li>
698 </ul>
699 </div>
700 <div class="section" id="id30">
701 <h3>Repo<a class="headerlink" href="#id30" title="Permalink to this headline">¶</a></h3>
702 <ul>
703 <li><p class="first">Corrected problems with creating bare repositories.</p>
704 </li>
705 <li><p class="first">Repo.tree no longer accepts a path argument. Use:</p>
706 <div class="highlight-default"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="nb">dict</span><span class="p">(</span><span class="n">k</span><span class="p">,</span> <span class="n">o</span> <span class="k">for</span> <span class="n">k</span><span class="p">,</span> <span class="n">o</span> <span class="ow">in</span> <span class="n">tree</span><span class="o">.</span><span class="n">items</span><span class="p">()</span> <span class="k">if</span> <span class="n">k</span> <span class="ow">in</span> <span class="n">paths</span><span class="p">)</span>
707 </pre></div>
708 </div>
709 </li>
710 <li><p class="first">Made daemon export a property of Repo. Now you can do this:</p>
711 <div class="highlight-default"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">exported</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">daemon_export</span>
712 <span class="gp">&gt;&gt;&gt; </span><span class="n">repo</span><span class="o">.</span><span class="n">daemon_export</span> <span class="o">=</span> <span class="kc">True</span>
713 </pre></div>
714 </div>
715 </li>
716 <li><p class="first">Allows modifying the project description. Do this:</p>
717 <div class="highlight-default"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">repo</span><span class="o">.</span><span class="n">description</span> <span class="o">=</span> <span class="s2">&quot;Foo Bar&quot;</span>
718 <span class="gp">&gt;&gt;&gt; </span><span class="n">repo</span><span class="o">.</span><span class="n">description</span>
719 <span class="go">&#39;Foo Bar&#39;</span>
720 </pre></div>
721 </div>
722 </li>
723 <li><p class="first">Added a read-only property Repo.is_dirty which reflects the status of the
724 working directory.</p>
725 </li>
726 <li><p class="first">Added a read-only Repo.active_branch property which returns the name of the
727 currently active branch.</p>
728 </li>
729 </ul>
730 </div>
731 <div class="section" id="id31">
732 <h3>Tree<a class="headerlink" href="#id31" title="Permalink to this headline">¶</a></h3>
733 <ul>
734 <li><p class="first">Switched to using a dictionary for Tree contents since you will usually want
735 to access them by name and order is unimportant.</p>
736 </li>
737 <li><p class="first">Implemented a dictionary protocol for Tree objects. The following:</p>
738 <blockquote>
739 <div><p>child = tree.contents[&#8216;grit&#8217;]</p>
740 </div></blockquote>
741 <p>becomes:</p>
742 <blockquote>
743 <div><p>child = tree[&#8216;grit&#8217;]</p>
744 </div></blockquote>
745 </li>
746 <li><p class="first">Made Tree.content_from_string a static method.</p>
747 </li>
748 </ul>
749 </div>
750 </div>
751 <div class="section" id="id32">
752 <h2>0.1.4.1<a class="headerlink" href="#id32" title="Permalink to this headline">¶</a></h2>
753 <ul class="simple">
754 <li>removed <code class="docutils literal"><span class="pre">method_missing</span></code> stuff and replaced with a <code class="docutils literal"><span class="pre">__getattr__</span></code>
755 override in <code class="docutils literal"><span class="pre">Git</span></code>.</li>
756 </ul>
757 </div>
758 <div class="section" id="id33">
759 <h2>0.1.4<a class="headerlink" href="#id33" title="Permalink to this headline">¶</a></h2>
760 <ul class="simple">
761 <li>renamed <code class="docutils literal"><span class="pre">git_python</span></code> to <code class="docutils literal"><span class="pre">git</span></code>. Be sure to delete all pyc files before
762 testing.</li>
763 </ul>
764 <div class="section" id="id34">
765 <h3>Commit<a class="headerlink" href="#id34" title="Permalink to this headline">¶</a></h3>
766 <ul class="simple">
767 <li>Fixed problem with commit stats not working under all conditions.</li>
768 </ul>
769 </div>
770 <div class="section" id="git">
771 <h3>Git<a class="headerlink" href="#git" title="Permalink to this headline">¶</a></h3>
772 <ul class="simple">
773 <li>Renamed module to cmd.</li>
774 <li>Removed shell escaping completely.</li>
775 <li>Added support for <code class="docutils literal"><span class="pre">stderr</span></code>, <code class="docutils literal"><span class="pre">stdin</span></code>, and <code class="docutils literal"><span class="pre">with_status</span></code>.</li>
776 <li><code class="docutils literal"><span class="pre">git_dir</span></code> is now optional in the constructor for <code class="docutils literal"><span class="pre">git.Git</span></code>. Git now
777 falls back to <code class="docutils literal"><span class="pre">os.getcwd()</span></code> when git_dir is not specified.</li>
778 <li>add a <code class="docutils literal"><span class="pre">with_exceptions</span></code> keyword argument to git commands.
779 <code class="docutils literal"><span class="pre">GitCommandError</span></code> is raised when the exit status is non-zero.</li>
780 <li>add support for a <code class="docutils literal"><span class="pre">GIT_PYTHON_TRACE</span></code> environment variable.
781 <code class="docutils literal"><span class="pre">GIT_PYTHON_TRACE</span></code> allows us to debug GitPython&#8217;s usage of git through
782 the use of an environment variable.</li>
783 </ul>
784 </div>
785 <div class="section" id="id35">
786 <h3>Tree<a class="headerlink" href="#id35" title="Permalink to this headline">¶</a></h3>
787 <ul class="simple">
788 <li>Fixed up problem where <code class="docutils literal"><span class="pre">name</span></code> doesn&#8217;t exist on root of tree.</li>
789 </ul>
790 </div>
791 <div class="section" id="id36">
792 <h3>Repo<a class="headerlink" href="#id36" title="Permalink to this headline">¶</a></h3>
793 <ul class="simple">
794 <li>Corrected problem with creating bare repo. Added <code class="docutils literal"><span class="pre">Repo.create</span></code> alias.</li>
795 </ul>
796 </div>
797 </div>
798 <div class="section" id="id37">
799 <h2>0.1.2<a class="headerlink" href="#id37" title="Permalink to this headline">¶</a></h2>
800 <div class="section" id="id38">
801 <h3>Tree<a class="headerlink" href="#id38" title="Permalink to this headline">¶</a></h3>
802 <ul class="simple">
803 <li>Corrected problem with <code class="docutils literal"><span class="pre">Tree.__div__</span></code> not working with zero length files.
804 Removed <code class="docutils literal"><span class="pre">__len__</span></code> override and replaced with size instead. Also made size
805 cach properly. This is a breaking change.</li>
806 </ul>
807 </div>
808 </div>
809 <div class="section" id="id39">
810 <h2>0.1.1<a class="headerlink" href="#id39" title="Permalink to this headline">¶</a></h2>
811 <p>Fixed up some urls because I&#8217;m a moron</p>
812 </div>
813 <div class="section" id="id40">
814 <h2>0.1.0<a class="headerlink" href="#id40" title="Permalink to this headline">¶</a></h2>
815 <p>initial release</p>
816 </div>
817 </div>
818
819
820 </div>
821 </div>
822 </div>
823 <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
824 <div class="sphinxsidebarwrapper">
825 <h3><a href="index.html">Table Of Contents</a></h3>
826 <ul>
827 <li><a class="reference internal" href="#">Changelog</a><ul>
828 <li><a class="reference internal" href="#bugfixes">2.0.9 - Bugfixes</a></li>
829 <li><a class="reference internal" href="#features-and-bugfixes">2.0.8 - Features and Bugfixes</a></li>
830 <li><a class="reference internal" href="#new-features">2.0.7 - New Features</a></li>
831 <li><a class="reference internal" href="#fixes-and-features">2.0.6 - Fixes and Features</a></li>
832 <li><a class="reference internal" href="#fixes">2.0.5 - Fixes</a></li>
833 <li><a class="reference internal" href="#id1">2.0.4 - Fixes</a></li>
834 <li><a class="reference internal" href="#id2">2.0.3 - Fixes</a></li>
835 <li><a class="reference internal" href="#id3">2.0.2 - Fixes</a></li>
836 <li><a class="reference internal" href="#id4">2.0.1 - Fixes</a></li>
837 <li><a class="reference internal" href="#features">2.0.0 - Features</a></li>
838 <li><a class="reference internal" href="#id5">1.0.2 - Fixes</a></li>
839 <li><a class="reference internal" href="#id6">1.0.1 - Fixes</a></li>
840 <li><a class="reference internal" href="#notes">1.0.0 - Notes</a></li>
841 <li><a class="reference internal" href="#id8">0.3.7 - Fixes</a></li>
842 <li><a class="reference internal" href="#id10">0.3.6 - Features</a></li>
843 <li><a class="reference internal" href="#id12">0.3.5 - Bugfixes</a></li>
844 <li><a class="reference internal" href="#python-3-support">0.3.4 - Python 3 Support</a></li>
845 <li><a class="reference internal" href="#id13">0.3.3</a></li>
846 <li><a class="reference internal" href="#id14">0.3.2.1</a></li>
847 <li><a class="reference internal" href="#id15">0.3.2</a></li>
848 <li><a class="reference internal" href="#rc1">0.3.2 RC1</a></li>
849 <li><a class="reference internal" href="#beta-2">0.3.1 Beta 2</a></li>
850 <li><a class="reference internal" href="#beta-1">0.3.1 Beta 1</a></li>
851 <li><a class="reference internal" href="#id16">0.3.0 Beta 2</a></li>
852 <li><a class="reference internal" href="#id17">0.3.0 Beta 1</a><ul>
853 <li><a class="reference internal" href="#renamed-modules">Renamed Modules</a></li>
854 <li><a class="reference internal" href="#general">General</a></li>
855 </ul>
856 </li>
857 <li><a class="reference internal" href="#id18">0.2 Beta 2</a></li>
858 <li><a class="reference internal" href="#id19">0.2</a><ul>
859 <li><a class="reference internal" href="#id20">General</a></li>
860 <li><a class="reference internal" href="#item-iteration">Item Iteration</a></li>
861 <li><a class="reference internal" href="#objects-package">objects Package</a></li>
862 <li><a class="reference internal" href="#blob">Blob</a></li>
863 <li><a class="reference internal" href="#gitcommand">GitCommand</a></li>
864 <li><a class="reference internal" href="#commit">Commit</a></li>
865 <li><a class="reference internal" href="#config">Config</a></li>
866 <li><a class="reference internal" href="#diff">Diff</a></li>
867 <li><a class="reference internal" href="#diffing">Diffing</a></li>
868 <li><a class="reference internal" href="#index">Index</a></li>
869 <li><a class="reference internal" href="#referernces">Referernces</a></li>
870 <li><a class="reference internal" href="#repo">Repo</a></li>
871 <li><a class="reference internal" href="#remote">Remote</a></li>
872 <li><a class="reference internal" href="#test-framework">Test Framework</a></li>
873 <li><a class="reference internal" href="#tree">Tree</a></li>
874 </ul>
875 </li>
876 <li><a class="reference internal" href="#id21">0.1.6</a><ul>
877 <li><a class="reference internal" href="#id22">General</a></li>
878 <li><a class="reference internal" href="#id23">Commit</a></li>
879 <li><a class="reference internal" href="#id24">Diff</a></li>
880 <li><a class="reference internal" href="#head">Head</a></li>
881 <li><a class="reference internal" href="#id25">Repo</a></li>
882 </ul>
883 </li>
884 <li><a class="reference internal" href="#id26">0.1.5</a><ul>
885 <li><a class="reference internal" href="#id27">General</a></li>
886 <li><a class="reference internal" href="#id28">Blob</a></li>
887 <li><a class="reference internal" href="#id29">Commit</a></li>
888 <li><a class="reference internal" href="#id30">Repo</a></li>
889 <li><a class="reference internal" href="#id31">Tree</a></li>
890 </ul>
891 </li>
892 <li><a class="reference internal" href="#id32">0.1.4.1</a></li>
893 <li><a class="reference internal" href="#id33">0.1.4</a><ul>
894 <li><a class="reference internal" href="#id34">Commit</a></li>
895 <li><a class="reference internal" href="#git">Git</a></li>
896 <li><a class="reference internal" href="#id35">Tree</a></li>
897 <li><a class="reference internal" href="#id36">Repo</a></li>
898 </ul>
899 </li>
900 <li><a class="reference internal" href="#id37">0.1.2</a><ul>
901 <li><a class="reference internal" href="#id38">Tree</a></li>
902 </ul>
903 </li>
904 <li><a class="reference internal" href="#id39">0.1.1</a></li>
905 <li><a class="reference internal" href="#id40">0.1.0</a></li>
906 </ul>
907 </li>
908 </ul>
909 <div class="relations">
910 <h3>Related Topics</h3>
911 <ul>
912 <li><a href="index.html">Documentation overview</a><ul>
913 <li>Previous: <a href="roadmap.html" title="previous chapter">Roadmap</a></li>
914 </ul></li>
915 </ul>
916 </div>
917 <div role="note" aria-label="source link">
918 <h3>This Page</h3>
919 <ul class="this-page-menu">
920 <li><a href="_sources/changes.txt"
921 rel="nofollow">Show Source</a></li>
922 </ul>
923 </div>
924 <div id="searchbox" style="display: none" role="search">
925 <h3>Quick search</h3>
926 <form class="search" action="search.html" method="get">
927 <input type="text" name="q" />
928 <input type="submit" value="Go" />
929 <input type="hidden" name="check_keywords" value="yes" />
930 <input type="hidden" name="area" value="default" />
931 </form>
932 </div>
933 <script type="text/javascript">$('#searchbox').show(0);</script>
934 </div>
935 </div>
936 <div class="clearer"></div>
937 </div>
938 <div class="footer">
939 &copy;Copyright (C) 2008, 2009 Michael Trier and contributors, 2010-2015 Sebastian Thiel.
940
941 |
942 Powered by <a href="http://sphinx-doc.org/">Sphinx 1.4.1</a>
943 &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.7</a>
944
945 |
946 <a href="_sources/changes.txt"
947 rel="nofollow">Page source</a>
948 </div>
949
950
951
952
953 </body>
954 </html>
+0
-3877
doc/build/html/genindex.html less more
0
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
4
5 <html xmlns="http://www.w3.org/1999/xhtml">
6 <head>
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8
9 <title>Index &mdash; GitPython 2.0.9dev0 documentation</title>
10
11 <link rel="stylesheet" href="_static/default.css" type="text/css" />
12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
13
14 <script type="text/javascript">
15 var DOCUMENTATION_OPTIONS = {
16 URL_ROOT: './',
17 VERSION: '2.0.9dev0',
18 COLLAPSE_INDEX: false,
19 FILE_SUFFIX: '.html',
20 HAS_SOURCE: true
21 };
22 </script>
23 <script type="text/javascript" src="_static/jquery.js"></script>
24 <script type="text/javascript" src="_static/underscore.js"></script>
25 <script type="text/javascript" src="_static/doctools.js"></script>
26 <link rel="top" title="GitPython 2.0.9dev0 documentation" href="index.html" />
27
28
29 <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
30
31 </head>
32 <body role="document">
33
34 <div class="document">
35 <div class="documentwrapper">
36 <div class="bodywrapper">
37 <div class="body" role="main">
38
39
40 <h1 id="index">Index</h1>
41
42 <div class="genindex-jumpbox">
43 <a href="#_"><strong>_</strong></a>
44 | <a href="#A"><strong>A</strong></a>
45 | <a href="#B"><strong>B</strong></a>
46 | <a href="#C"><strong>C</strong></a>
47 | <a href="#D"><strong>D</strong></a>
48 | <a href="#E"><strong>E</strong></a>
49 | <a href="#F"><strong>F</strong></a>
50 | <a href="#G"><strong>G</strong></a>
51 | <a href="#H"><strong>H</strong></a>
52 | <a href="#I"><strong>I</strong></a>
53 | <a href="#J"><strong>J</strong></a>
54 | <a href="#K"><strong>K</strong></a>
55 | <a href="#L"><strong>L</strong></a>
56 | <a href="#M"><strong>M</strong></a>
57 | <a href="#N"><strong>N</strong></a>
58 | <a href="#O"><strong>O</strong></a>
59 | <a href="#P"><strong>P</strong></a>
60 | <a href="#R"><strong>R</strong></a>
61 | <a href="#S"><strong>S</strong></a>
62 | <a href="#T"><strong>T</strong></a>
63 | <a href="#U"><strong>U</strong></a>
64 | <a href="#V"><strong>V</strong></a>
65 | <a href="#W"><strong>W</strong></a>
66 | <a href="#X"><strong>X</strong></a>
67
68 </div>
69 <h2 id="_">_</h2>
70 <table style="width: 100%" class="indextable genindextable"><tr>
71 <td style="width: 33%" valign="top"><dl>
72
73 <dt><a href="reference.html#git.objects.submodule.util.SubmoduleConfigParser.__abstractmethods__">__abstractmethods__ (git.objects.submodule.util.SubmoduleConfigParser attribute)</a>
74 </dt>
75
76
77 <dt><a href="reference.html#git.cmd.Git.__call__">__call__() (git.cmd.Git method)</a>
78 </dt>
79
80 <dd><dl>
81
82 <dt><a href="reference.html#git.index.typ.BlobFilter.__call__">(git.index.typ.BlobFilter method)</a>
83 </dt>
84
85 </dl></dd>
86
87 <dt><a href="reference.html#git.objects.tree.Tree.__contains__">__contains__() (git.objects.tree.Tree method)</a>
88 </dt>
89
90 <dd><dl>
91
92 <dt><a href="reference.html#git.util.IterableList.__contains__">(git.util.IterableList method)</a>
93 </dt>
94
95 </dl></dd>
96
97 <dt><a href="reference.html#git.cmd.Git.AutoInterrupt.__del__">__del__() (git.cmd.Git.AutoInterrupt method)</a>
98 </dt>
99
100 <dd><dl>
101
102 <dt><a href="reference.html#git.cmd.Git.CatFileContentStream.__del__">(git.cmd.Git.CatFileContentStream method)</a>
103 </dt>
104
105
106 <dt><a href="reference.html#git.config.SectionConstraint.__del__">(git.config.SectionConstraint method)</a>
107 </dt>
108
109
110 <dt><a href="reference.html#git.index.util.TemporaryFileSwap.__del__">(git.index.util.TemporaryFileSwap method)</a>
111 </dt>
112
113
114 <dt><a href="reference.html#git.repo.base.Repo.__del__">(git.repo.base.Repo method)</a>
115 </dt>
116
117
118 <dt><a href="reference.html#git.util.LockFile.__del__">(git.util.LockFile method)</a>
119 </dt>
120
121 </dl></dd>
122
123 <dt><a href="reference.html#git.objects.tree.TreeModifier.__delitem__">__delitem__() (git.objects.tree.TreeModifier method)</a>
124 </dt>
125
126 <dd><dl>
127
128 <dt><a href="reference.html#git.util.IterableList.__delitem__">(git.util.IterableList method)</a>
129 </dt>
130
131 </dl></dd>
132
133 <dt><a href="reference.html#git.diff.Diffable.Index.__dict__">__dict__ (git.diff.Diffable.Index attribute)</a>
134 </dt>
135
136 <dd><dl>
137
138 <dt><a href="reference.html#git.diff.DiffIndex.__dict__">(git.diff.DiffIndex attribute)</a>
139 </dt>
140
141
142 <dt><a href="reference.html#git.index.typ.BaseIndexEntry.__dict__">(git.index.typ.BaseIndexEntry attribute)</a>
143 </dt>
144
145
146 <dt><a href="reference.html#git.objects.util.tzoffset.__dict__">(git.objects.util.tzoffset attribute)</a>
147 </dt>
148
149
150 <dt><a href="reference.html#git.refs.head.Head.__dict__">(git.refs.head.Head attribute)</a>
151 </dt>
152
153
154 <dt><a href="reference.html#git.repo.base.Repo.__dict__">(git.repo.base.Repo attribute)</a>
155 </dt>
156
157
158 <dt><a href="reference.html#git.util.WaitGroup.__dict__">(git.util.WaitGroup attribute)</a>
159 </dt>
160
161 </dl></dd>
162
163 <dt><a href="reference.html#git.objects.tree.Tree.__div__">__div__() (git.objects.tree.Tree method)</a>
164 </dt>
165
166
167 <dt><a href="reference.html#git.config.SectionConstraint.__enter__">__enter__() (git.config.SectionConstraint method)</a>
168 </dt>
169
170
171 <dt><a href="reference.html#git.diff.Diff.__eq__">__eq__() (git.diff.Diff method)</a>
172 </dt>
173
174 <dd><dl>
175
176 <dt><a href="reference.html#git.objects.base.Object.__eq__">(git.objects.base.Object method)</a>
177 </dt>
178
179
180 <dt><a href="reference.html#git.objects.submodule.base.Submodule.__eq__">(git.objects.submodule.base.Submodule method)</a>
181 </dt>
182
183
184 <dt><a href="reference.html#git.objects.util.Actor.__eq__">(git.objects.util.Actor method)</a>
185 </dt>
186
187
188 <dt><a href="reference.html#git.refs.symbolic.SymbolicReference.__eq__">(git.refs.symbolic.SymbolicReference method)</a>
189 </dt>
190
191
192 <dt><a href="reference.html#git.remote.Remote.__eq__">(git.remote.Remote method)</a>
193 </dt>
194
195
196 <dt><a href="reference.html#git.repo.base.Repo.__eq__">(git.repo.base.Repo method)</a>
197 </dt>
198
199
200 <dt><a href="reference.html#git.util.Actor.__eq__">(git.util.Actor method)</a>
201 </dt>
202
203 </dl></dd>
204
205 <dt><a href="reference.html#git.config.SectionConstraint.__exit__">__exit__() (git.config.SectionConstraint method)</a>
206 </dt>
207
208
209 <dt><a href="reference.html#git.cmd.Git.__getattr__">__getattr__() (git.cmd.Git method)</a>
210 </dt>
211
212 <dd><dl>
213
214 <dt><a href="reference.html#git.cmd.Git.AutoInterrupt.__getattr__">(git.cmd.Git.AutoInterrupt method)</a>
215 </dt>
216
217
218 <dt><a href="reference.html#git.config.SectionConstraint.__getattr__">(git.config.SectionConstraint method)</a>
219 </dt>
220
221
222 <dt><a href="reference.html#git.objects.util.ProcessStreamAdapter.__getattr__">(git.objects.util.ProcessStreamAdapter method)</a>
223 </dt>
224
225
226 <dt><a href="reference.html#git.remote.Remote.__getattr__">(git.remote.Remote method)</a>
227 </dt>
228
229
230 <dt><a href="reference.html#git.util.IterableList.__getattr__">(git.util.IterableList method)</a>
231 </dt>
232
233 </dl></dd>
234
235 <dt><a href="reference.html#git.objects.tree.Tree.__getitem__">__getitem__() (git.objects.tree.Tree method)</a>
236 </dt>
237
238 <dd><dl>
239
240 <dt><a href="reference.html#git.util.IterableList.__getitem__">(git.util.IterableList method)</a>
241 </dt>
242
243 </dl></dd>
244
245 <dt><a href="reference.html#git.objects.tree.Tree.__getslice__">__getslice__() (git.objects.tree.Tree method)</a>
246 </dt>
247
248
249 <dt><a href="reference.html#git.cmd.Git.__getstate__">__getstate__() (git.cmd.Git method)</a>
250 </dt>
251
252 </dl></td>
253 <td style="width: 33%" valign="top"><dl>
254
255 <dt><a href="reference.html#git.diff.Diff.__hash__">__hash__() (git.diff.Diff method)</a>
256 </dt>
257
258 <dd><dl>
259
260 <dt><a href="reference.html#git.objects.base.IndexObject.__hash__">(git.objects.base.IndexObject method)</a>
261 </dt>
262
263
264 <dt><a href="reference.html#git.objects.base.Object.__hash__">(git.objects.base.Object method)</a>
265 </dt>
266
267
268 <dt><a href="reference.html#git.objects.submodule.base.Submodule.__hash__">(git.objects.submodule.base.Submodule method)</a>
269 </dt>
270
271
272 <dt><a href="reference.html#git.objects.util.Actor.__hash__">(git.objects.util.Actor method)</a>
273 </dt>
274
275
276 <dt><a href="reference.html#git.refs.symbolic.SymbolicReference.__hash__">(git.refs.symbolic.SymbolicReference method)</a>
277 </dt>
278
279
280 <dt><a href="reference.html#git.remote.Remote.__hash__">(git.remote.Remote method)</a>
281 </dt>
282
283
284 <dt><a href="reference.html#git.repo.base.Repo.__hash__">(git.repo.base.Repo method)</a>
285 </dt>
286
287
288 <dt><a href="reference.html#git.util.Actor.__hash__">(git.util.Actor method)</a>
289 </dt>
290
291 </dl></dd>
292
293 <dt><a href="reference.html#git.cmd.Git.__init__">__init__() (git.cmd.Git method)</a>
294 </dt>
295
296 <dd><dl>
297
298 <dt><a href="reference.html#git.cmd.Git.AutoInterrupt.__init__">(git.cmd.Git.AutoInterrupt method)</a>
299 </dt>
300
301
302 <dt><a href="reference.html#git.cmd.Git.CatFileContentStream.__init__">(git.cmd.Git.CatFileContentStream method)</a>
303 </dt>
304
305
306 <dt><a href="reference.html#git.config.SectionConstraint.__init__">(git.config.SectionConstraint method)</a>
307 </dt>
308
309
310 <dt><a href="reference.html#git.diff.Diff.__init__">(git.diff.Diff method)</a>
311 </dt>
312
313
314 <dt><a href="reference.html#git.exc.CheckoutError.__init__">(git.exc.CheckoutError method)</a>
315 </dt>
316
317
318 <dt><a href="reference.html#git.exc.GitCommandError.__init__">(git.exc.GitCommandError method)</a>
319 </dt>
320
321
322 <dt><a href="reference.html#git.exc.HookExecutionError.__init__">(git.exc.HookExecutionError method)</a>
323 </dt>
324
325
326 <dt><a href="reference.html#git.exc.RepositoryDirtyError.__init__">(git.exc.RepositoryDirtyError method)</a>
327 </dt>
328
329
330 <dt><a href="reference.html#git.index.base.CheckoutError.__init__">(git.index.base.CheckoutError method)</a>
331 </dt>
332
333
334 <dt><a href="reference.html#git.index.base.IndexFile.__init__">(git.index.base.IndexFile method)</a>
335 </dt>
336
337
338 <dt><a href="reference.html#git.index.typ.BlobFilter.__init__">(git.index.typ.BlobFilter method)</a>
339 </dt>
340
341
342 <dt><a href="reference.html#git.index.util.TemporaryFileSwap.__init__">(git.index.util.TemporaryFileSwap method)</a>
343 </dt>
344
345
346 <dt><a href="reference.html#git.objects.base.IndexObject.__init__">(git.objects.base.IndexObject method)</a>
347 </dt>
348
349
350 <dt><a href="reference.html#git.objects.base.Object.__init__">(git.objects.base.Object method)</a>
351 </dt>
352
353
354 <dt><a href="reference.html#git.objects.commit.Commit.__init__">(git.objects.commit.Commit method)</a>
355 </dt>
356
357
358 <dt><a href="reference.html#git.objects.submodule.base.Submodule.__init__">(git.objects.submodule.base.Submodule method)</a>
359 </dt>
360
361
362 <dt><a href="reference.html#git.objects.submodule.root.RootModule.__init__">(git.objects.submodule.root.RootModule method)</a>
363 </dt>
364
365
366 <dt><a href="reference.html#git.objects.submodule.util.SubmoduleConfigParser.__init__">(git.objects.submodule.util.SubmoduleConfigParser method)</a>
367 </dt>
368
369
370 <dt><a href="reference.html#git.objects.tag.TagObject.__init__">(git.objects.tag.TagObject method)</a>
371 </dt>
372
373
374 <dt><a href="reference.html#git.objects.tree.Tree.__init__">(git.objects.tree.Tree method)</a>
375 </dt>
376
377
378 <dt><a href="reference.html#git.objects.tree.TreeModifier.__init__">(git.objects.tree.TreeModifier method)</a>
379 </dt>
380
381
382 <dt><a href="reference.html#git.objects.util.Actor.__init__">(git.objects.util.Actor method)</a>
383 </dt>
384
385
386 <dt><a href="reference.html#git.objects.util.ProcessStreamAdapter.__init__">(git.objects.util.ProcessStreamAdapter method)</a>
387 </dt>
388
389
390 <dt><a href="reference.html#git.objects.util.tzoffset.__init__">(git.objects.util.tzoffset method)</a>
391 </dt>
392
393
394 <dt><a href="reference.html#git.refs.head.HEAD.__init__">(git.refs.head.HEAD method)</a>
395 </dt>
396
397
398 <dt><a href="reference.html#git.refs.log.RefLog.__init__">(git.refs.log.RefLog method)</a>
399 </dt>
400
401
402 <dt><a href="reference.html#git.refs.reference.Reference.__init__">(git.refs.reference.Reference method)</a>
403 </dt>
404
405
406 <dt><a href="reference.html#git.refs.symbolic.SymbolicReference.__init__">(git.refs.symbolic.SymbolicReference method)</a>
407 </dt>
408
409
410 <dt><a href="reference.html#git.remote.FetchInfo.__init__">(git.remote.FetchInfo method)</a>
411 </dt>
412
413
414 <dt><a href="reference.html#git.remote.PushInfo.__init__">(git.remote.PushInfo method)</a>
415 </dt>
416
417
418 <dt><a href="reference.html#git.remote.Remote.__init__">(git.remote.Remote method)</a>
419 </dt>
420
421
422 <dt><a href="reference.html#git.remote.RemoteProgress.__init__">(git.remote.RemoteProgress method)</a>
423 </dt>
424
425
426 <dt><a href="reference.html#git.repo.base.Repo.__init__">(git.repo.base.Repo method)</a>
427 </dt>
428
429
430 <dt><a href="reference.html#git.util.Actor.__init__">(git.util.Actor method)</a>
431 </dt>
432
433
434 <dt><a href="reference.html#git.util.BlockingLockFile.__init__">(git.util.BlockingLockFile method)</a>
435 </dt>
436
437
438 <dt><a href="reference.html#git.util.CallableRemoteProgress.__init__">(git.util.CallableRemoteProgress method)</a>
439 </dt>
440
441
442 <dt><a href="reference.html#git.util.IndexFileSHA1Writer.__init__">(git.util.IndexFileSHA1Writer method)</a>
443 </dt>
444
445
446 <dt><a href="reference.html#git.util.IterableList.__init__">(git.util.IterableList method)</a>
447 </dt>
448
449
450 <dt><a href="reference.html#git.util.LockFile.__init__">(git.util.LockFile method)</a>
451 </dt>
452
453
454 <dt><a href="reference.html#git.util.RemoteProgress.__init__">(git.util.RemoteProgress method)</a>
455 </dt>
456
457
458 <dt><a href="reference.html#git.util.Stats.__init__">(git.util.Stats method)</a>
459 </dt>
460
461
462 <dt><a href="reference.html#git.util.WaitGroup.__init__">(git.util.WaitGroup method)</a>
463 </dt>
464
465 </dl></dd>
466
467 <dt><a href="reference.html#git.cmd.Git.CatFileContentStream.__iter__">__iter__() (git.cmd.Git.CatFileContentStream method)</a>
468 </dt>
469
470 <dd><dl>
471
472 <dt><a href="reference.html#git.objects.tree.Tree.__iter__">(git.objects.tree.Tree method)</a>
473 </dt>
474
475 </dl></dd>
476
477 <dt><a href="reference.html#git.objects.tree.Tree.__len__">__len__() (git.objects.tree.Tree method)</a>
478 </dt>
479
480
481 <dt><a href="reference.html#git.cmd.Git.__module__">__module__ (git.cmd.Git attribute)</a>
482 </dt>
483
484 <dd><dl>
485
486 <dt><a href="reference.html#git.cmd.Git.AutoInterrupt.__module__">(git.cmd.Git.AutoInterrupt attribute)</a>
487 </dt>
488
489
490 <dt><a href="reference.html#git.cmd.Git.CatFileContentStream.__module__">(git.cmd.Git.CatFileContentStream attribute)</a>
491 </dt>
492
493
494 <dt><a href="reference.html#git.config.SectionConstraint.__module__">(git.config.SectionConstraint attribute)</a>
495 </dt>
496
497
498 <dt><a href="reference.html#git.diff.Diff.__module__">(git.diff.Diff attribute)</a>
499 </dt>
500
501
502 <dt><a href="reference.html#git.diff.DiffIndex.__module__">(git.diff.DiffIndex attribute)</a>
503 </dt>
504
505
506 <dt><a href="reference.html#git.diff.Diffable.__module__">(git.diff.Diffable attribute)</a>
507 </dt>
508
509
510 <dt><a href="reference.html#git.diff.Diffable.Index.__module__">(git.diff.Diffable.Index attribute)</a>
511 </dt>
512
513
514 <dt><a href="reference.html#git.exc.CacheError.__module__">(git.exc.CacheError attribute)</a>
515 </dt>
516
517
518 <dt><a href="reference.html#git.exc.CheckoutError.__module__">(git.exc.CheckoutError attribute)</a>
519 </dt>
520
521
522 <dt><a href="reference.html#git.exc.GitCommandError.__module__">(git.exc.GitCommandError attribute)</a>
523 </dt>
524
525
526 <dt><a href="reference.html#git.exc.GitCommandNotFound.__module__">(git.exc.GitCommandNotFound attribute)</a>
527 </dt>
528
529
530 <dt><a href="reference.html#git.exc.HookExecutionError.__module__">(git.exc.HookExecutionError attribute)</a>
531 </dt>
532
533
534 <dt><a href="reference.html#git.exc.InvalidGitRepositoryError.__module__">(git.exc.InvalidGitRepositoryError attribute)</a>
535 </dt>
536
537
538 <dt><a href="reference.html#git.exc.NoSuchPathError.__module__">(git.exc.NoSuchPathError attribute)</a>
539 </dt>
540
541
542 <dt><a href="reference.html#git.exc.RepositoryDirtyError.__module__">(git.exc.RepositoryDirtyError attribute)</a>
543 </dt>
544
545
546 <dt><a href="reference.html#git.exc.UnmergedEntriesError.__module__">(git.exc.UnmergedEntriesError attribute)</a>
547 </dt>
548
549
550 <dt><a href="reference.html#git.exc.WorkTreeRepositoryUnsupported.__module__">(git.exc.WorkTreeRepositoryUnsupported attribute)</a>
551 </dt>
552
553
554 <dt><a href="reference.html#git.index.base.CheckoutError.__module__">(git.index.base.CheckoutError attribute)</a>
555 </dt>
556
557
558 <dt><a href="reference.html#git.index.base.IndexFile.__module__">(git.index.base.IndexFile attribute)</a>
559 </dt>
560
561
562 <dt><a href="reference.html#git.index.typ.BaseIndexEntry.__module__">(git.index.typ.BaseIndexEntry attribute)</a>
563 </dt>
564
565
566 <dt><a href="reference.html#git.index.typ.BlobFilter.__module__">(git.index.typ.BlobFilter attribute)</a>
567 </dt>
568
569
570 <dt><a href="reference.html#git.index.typ.IndexEntry.__module__">(git.index.typ.IndexEntry attribute)</a>
571 </dt>
572
573
574 <dt><a href="reference.html#git.index.util.TemporaryFileSwap.__module__">(git.index.util.TemporaryFileSwap attribute)</a>
575 </dt>
576
577
578 <dt><a href="reference.html#git.objects.base.IndexObject.__module__">(git.objects.base.IndexObject attribute)</a>
579 </dt>
580
581
582 <dt><a href="reference.html#git.objects.base.Object.__module__">(git.objects.base.Object attribute)</a>
583 </dt>
584
585
586 <dt><a href="reference.html#git.objects.blob.Blob.__module__">(git.objects.blob.Blob attribute)</a>
587 </dt>
588
589
590 <dt><a href="reference.html#git.objects.commit.Commit.__module__">(git.objects.commit.Commit attribute)</a>
591 </dt>
592
593
594 <dt><a href="reference.html#git.objects.submodule.base.Submodule.__module__">(git.objects.submodule.base.Submodule attribute)</a>
595 </dt>
596
597
598 <dt><a href="reference.html#git.objects.submodule.base.UpdateProgress.__module__">(git.objects.submodule.base.UpdateProgress attribute)</a>
599 </dt>
600
601
602 <dt><a href="reference.html#git.objects.submodule.root.RootModule.__module__">(git.objects.submodule.root.RootModule attribute)</a>
603 </dt>
604
605
606 <dt><a href="reference.html#git.objects.submodule.root.RootUpdateProgress.__module__">(git.objects.submodule.root.RootUpdateProgress attribute)</a>
607 </dt>
608
609
610 <dt><a href="reference.html#git.objects.submodule.util.SubmoduleConfigParser.__module__">(git.objects.submodule.util.SubmoduleConfigParser attribute)</a>
611 </dt>
612
613
614 <dt><a href="reference.html#git.objects.tag.TagObject.__module__">(git.objects.tag.TagObject attribute)</a>
615 </dt>
616
617
618 <dt><a href="reference.html#git.objects.tree.Tree.__module__">(git.objects.tree.Tree attribute)</a>
619 </dt>
620
621
622 <dt><a href="reference.html#git.objects.tree.TreeModifier.__module__">(git.objects.tree.TreeModifier attribute)</a>
623 </dt>
624
625
626 <dt><a href="reference.html#git.objects.util.Actor.__module__">(git.objects.util.Actor attribute)</a>
627 </dt>
628
629
630 <dt><a href="reference.html#git.objects.util.ProcessStreamAdapter.__module__">(git.objects.util.ProcessStreamAdapter attribute)</a>
631 </dt>
632
633
634 <dt><a href="reference.html#git.objects.util.Traversable.__module__">(git.objects.util.Traversable attribute)</a>
635 </dt>
636
637
638 <dt><a href="reference.html#git.objects.util.tzoffset.__module__">(git.objects.util.tzoffset attribute)</a>
639 </dt>
640
641
642 <dt><a href="reference.html#git.refs.head.HEAD.__module__">(git.refs.head.HEAD attribute)</a>
643 </dt>
644
645
646 <dt><a href="reference.html#git.refs.head.Head.__module__">(git.refs.head.Head attribute)</a>
647 </dt>
648
649
650 <dt><a href="reference.html#git.refs.log.RefLog.__module__">(git.refs.log.RefLog attribute)</a>
651 </dt>
652
653
654 <dt><a href="reference.html#git.refs.log.RefLogEntry.__module__">(git.refs.log.RefLogEntry attribute)</a>
655 </dt>
656
657
658 <dt><a href="reference.html#git.refs.reference.Reference.__module__">(git.refs.reference.Reference attribute)</a>
659 </dt>
660
661
662 <dt><a href="reference.html#git.refs.remote.RemoteReference.__module__">(git.refs.remote.RemoteReference attribute)</a>
663 </dt>
664
665
666 <dt><a href="reference.html#git.refs.symbolic.SymbolicReference.__module__">(git.refs.symbolic.SymbolicReference attribute)</a>
667 </dt>
668
669
670 <dt><a href="reference.html#git.refs.tag.TagReference.__module__">(git.refs.tag.TagReference attribute)</a>
671 </dt>
672
673
674 <dt><a href="reference.html#git.remote.FetchInfo.__module__">(git.remote.FetchInfo attribute)</a>
675 </dt>
676
677
678 <dt><a href="reference.html#git.remote.PushInfo.__module__">(git.remote.PushInfo attribute)</a>
679 </dt>
680
681
682 <dt><a href="reference.html#git.remote.Remote.__module__">(git.remote.Remote attribute)</a>
683 </dt>
684
685
686 <dt><a href="reference.html#git.remote.RemoteProgress.__module__">(git.remote.RemoteProgress attribute)</a>
687 </dt>
688
689
690 <dt><a href="reference.html#git.repo.base.Repo.__module__">(git.repo.base.Repo attribute)</a>
691 </dt>
692
693
694 <dt><a href="reference.html#git.util.Actor.__module__">(git.util.Actor attribute)</a>
695 </dt>
696
697
698 <dt><a href="reference.html#git.util.BlockingLockFile.__module__">(git.util.BlockingLockFile attribute)</a>
699 </dt>
700
701
702 <dt><a href="reference.html#git.util.CallableRemoteProgress.__module__">(git.util.CallableRemoteProgress attribute)</a>
703 </dt>
704
705
706 <dt><a href="reference.html#git.util.IndexFileSHA1Writer.__module__">(git.util.IndexFileSHA1Writer attribute)</a>
707 </dt>
708
709
710 <dt><a href="reference.html#git.util.Iterable.__module__">(git.util.Iterable attribute)</a>
711 </dt>
712
713
714 <dt><a href="reference.html#git.util.IterableList.__module__">(git.util.IterableList attribute)</a>
715 </dt>
716
717
718 <dt><a href="reference.html#git.util.LockFile.__module__">(git.util.LockFile attribute)</a>
719 </dt>
720
721
722 <dt><a href="reference.html#git.util.RemoteProgress.__module__">(git.util.RemoteProgress attribute)</a>
723 </dt>
724
725
726 <dt><a href="reference.html#git.util.Stats.__module__">(git.util.Stats attribute)</a>
727 </dt>
728
729
730 <dt><a href="reference.html#git.util.WaitGroup.__module__">(git.util.WaitGroup attribute)</a>
731 </dt>
732
733 </dl></dd>
734
735 <dt><a href="reference.html#git.diff.Diff.__ne__">__ne__() (git.diff.Diff method)</a>
736 </dt>
737
738 <dd><dl>
739
740 <dt><a href="reference.html#git.objects.base.Object.__ne__">(git.objects.base.Object method)</a>
741 </dt>
742
743
744 <dt><a href="reference.html#git.objects.submodule.base.Submodule.__ne__">(git.objects.submodule.base.Submodule method)</a>
745 </dt>
746
747
748 <dt><a href="reference.html#git.objects.util.Actor.__ne__">(git.objects.util.Actor method)</a>
749 </dt>
750
751
752 <dt><a href="reference.html#git.refs.symbolic.SymbolicReference.__ne__">(git.refs.symbolic.SymbolicReference method)</a>
753 </dt>
754
755
756 <dt><a href="reference.html#git.remote.Remote.__ne__">(git.remote.Remote method)</a>
757 </dt>
758
759
760 <dt><a href="reference.html#git.repo.base.Repo.__ne__">(git.repo.base.Repo method)</a>
761 </dt>
762
763
764 <dt><a href="reference.html#git.util.Actor.__ne__">(git.util.Actor method)</a>
765 </dt>
766
767 </dl></dd>
768
769 <dt><a href="reference.html#git.refs.log.RefLog.__new__">__new__() (git.refs.log.RefLog static method)</a>
770 </dt>
771
772 <dd><dl>
773
774 <dt><a href="reference.html#git.util.IterableList.__new__">(git.util.IterableList static method)</a>
775 </dt>
776
777 </dl></dd>
778
779 <dt><a href="reference.html#git.index.typ.BaseIndexEntry.__repr__">__repr__() (git.index.typ.BaseIndexEntry method)</a>
780 </dt>
781
782 <dd><dl>
783
784 <dt><a href="reference.html#git.objects.base.Object.__repr__">(git.objects.base.Object method)</a>
785 </dt>
786
787
788 <dt><a href="reference.html#git.objects.submodule.base.Submodule.__repr__">(git.objects.submodule.base.Submodule method)</a>
789 </dt>
790
791
792 <dt><a href="reference.html#git.objects.util.Actor.__repr__">(git.objects.util.Actor method)</a>
793 </dt>
794
795
796 <dt><a href="reference.html#git.refs.log.RefLogEntry.__repr__">(git.refs.log.RefLogEntry method)</a>
797 </dt>
798
799
800 <dt><a href="reference.html#git.refs.symbolic.SymbolicReference.__repr__">(git.refs.symbolic.SymbolicReference method)</a>
801 </dt>
802
803
804 <dt><a href="reference.html#git.remote.Remote.__repr__">(git.remote.Remote method)</a>
805 </dt>
806
807
808 <dt><a href="reference.html#git.repo.base.Repo.__repr__">(git.repo.base.Repo method)</a>
809 </dt>
810
811
812 <dt><a href="reference.html#git.util.Actor.__repr__">(git.util.Actor method)</a>
813 </dt>
814
815 </dl></dd>
816
817 <dt><a href="reference.html#git.objects.tree.Tree.__reversed__">__reversed__() (git.objects.tree.Tree method)</a>
818 </dt>
819
820
821 <dt><a href="reference.html#git.cmd.Git.__setstate__">__setstate__() (git.cmd.Git method)</a>
822 </dt>
823
824
825 <dt><a href="reference.html#git.cmd.Git.__slots__">__slots__ (git.cmd.Git attribute)</a>
826 </dt>
827
828 <dd><dl>
829
830 <dt><a href="reference.html#git.cmd.Git.AutoInterrupt.__slots__">(git.cmd.Git.AutoInterrupt attribute)</a>
831 </dt>
832
833
834 <dt><a href="reference.html#git.cmd.Git.CatFileContentStream.__slots__">(git.cmd.Git.CatFileContentStream attribute)</a>
835 </dt>
836
837
838 <dt><a href="reference.html#git.config.SectionConstraint.__slots__">(git.config.SectionConstraint attribute)</a>
839 </dt>
840
841
842 <dt><a href="reference.html#git.diff.Diff.__slots__">(git.diff.Diff attribute)</a>
843 </dt>
844
845
846 <dt><a href="reference.html#git.diff.Diffable.__slots__">(git.diff.Diffable attribute)</a>
847 </dt>
848
849
850 <dt><a href="reference.html#git.index.base.IndexFile.__slots__">(git.index.base.IndexFile attribute)</a>
851 </dt>
852
853
854 <dt><a href="reference.html#git.index.typ.BlobFilter.__slots__">(git.index.typ.BlobFilter attribute)</a>
855 </dt>
856
857
858 <dt><a href="reference.html#git.index.util.TemporaryFileSwap.__slots__">(git.index.util.TemporaryFileSwap attribute)</a>
859 </dt>
860
861
862 <dt><a href="reference.html#git.objects.base.IndexObject.__slots__">(git.objects.base.IndexObject attribute)</a>
863 </dt>
864
865
866 <dt><a href="reference.html#git.objects.base.Object.__slots__">(git.objects.base.Object attribute)</a>
867 </dt>
868
869
870 <dt><a href="reference.html#git.objects.blob.Blob.__slots__">(git.objects.blob.Blob attribute)</a>
871 </dt>
872
873
874 <dt><a href="reference.html#git.objects.commit.Commit.__slots__">(git.objects.commit.Commit attribute)</a>
875 </dt>
876
877
878 <dt><a href="reference.html#git.objects.submodule.base.Submodule.__slots__">(git.objects.submodule.base.Submodule attribute)</a>
879 </dt>
880
881
882 <dt><a href="reference.html#git.objects.submodule.base.UpdateProgress.__slots__">(git.objects.submodule.base.UpdateProgress attribute)</a>
883 </dt>
884
885
886 <dt><a href="reference.html#git.objects.submodule.root.RootModule.__slots__">(git.objects.submodule.root.RootModule attribute)</a>
887 </dt>
888
889
890 <dt><a href="reference.html#git.objects.submodule.root.RootUpdateProgress.__slots__">(git.objects.submodule.root.RootUpdateProgress attribute)</a>
891 </dt>
892
893
894 <dt><a href="reference.html#git.objects.tag.TagObject.__slots__">(git.objects.tag.TagObject attribute)</a>
895 </dt>
896
897
898 <dt><a href="reference.html#git.objects.tree.Tree.__slots__">(git.objects.tree.Tree attribute)</a>
899 </dt>
900
901
902 <dt><a href="reference.html#git.objects.tree.TreeModifier.__slots__">(git.objects.tree.TreeModifier attribute)</a>
903 </dt>
904
905
906 <dt><a href="reference.html#git.objects.util.Actor.__slots__">(git.objects.util.Actor attribute)</a>
907 </dt>
908
909
910 <dt><a href="reference.html#git.objects.util.ProcessStreamAdapter.__slots__">(git.objects.util.ProcessStreamAdapter attribute)</a>
911 </dt>
912
913
914 <dt><a href="reference.html#git.objects.util.Traversable.__slots__">(git.objects.util.Traversable attribute)</a>
915 </dt>
916
917
918 <dt><a href="reference.html#git.refs.head.HEAD.__slots__">(git.refs.head.HEAD attribute)</a>
919 </dt>
920
921
922 <dt><a href="reference.html#git.refs.log.RefLog.__slots__">(git.refs.log.RefLog attribute)</a>
923 </dt>
924
925
926 <dt><a href="reference.html#git.refs.log.RefLogEntry.__slots__">(git.refs.log.RefLogEntry attribute)</a>
927 </dt>
928
929
930 <dt><a href="reference.html#git.refs.reference.Reference.__slots__">(git.refs.reference.Reference attribute)</a>
931 </dt>
932
933
934 <dt><a href="reference.html#git.refs.symbolic.SymbolicReference.__slots__">(git.refs.symbolic.SymbolicReference attribute)</a>
935 </dt>
936
937
938 <dt><a href="reference.html#git.refs.tag.TagReference.__slots__">(git.refs.tag.TagReference attribute)</a>
939 </dt>
940
941
942 <dt><a href="reference.html#git.remote.FetchInfo.__slots__">(git.remote.FetchInfo attribute)</a>
943 </dt>
944
945
946 <dt><a href="reference.html#git.remote.PushInfo.__slots__">(git.remote.PushInfo attribute)</a>
947 </dt>
948
949
950 <dt><a href="reference.html#git.remote.Remote.__slots__">(git.remote.Remote attribute)</a>
951 </dt>
952
953
954 <dt><a href="reference.html#git.remote.RemoteProgress.__slots__">(git.remote.RemoteProgress attribute)</a>
955 </dt>
956
957
958 <dt><a href="reference.html#git.util.Actor.__slots__">(git.util.Actor attribute)</a>
959 </dt>
960
961
962 <dt><a href="reference.html#git.util.BlockingLockFile.__slots__">(git.util.BlockingLockFile attribute)</a>
963 </dt>
964
965
966 <dt><a href="reference.html#git.util.CallableRemoteProgress.__slots__">(git.util.CallableRemoteProgress attribute)</a>
967 </dt>
968
969
970 <dt><a href="reference.html#git.util.IndexFileSHA1Writer.__slots__">(git.util.IndexFileSHA1Writer attribute)</a>
971 </dt>
972
973
974 <dt><a href="reference.html#git.util.Iterable.__slots__">(git.util.Iterable attribute)</a>
975 </dt>
976
977
978 <dt><a href="reference.html#git.util.IterableList.__slots__">(git.util.IterableList attribute)</a>
979 </dt>
980
981
982 <dt><a href="reference.html#git.util.LockFile.__slots__">(git.util.LockFile attribute)</a>
983 </dt>
984
985
986 <dt><a href="reference.html#git.util.RemoteProgress.__slots__">(git.util.RemoteProgress attribute)</a>
987 </dt>
988
989
990 <dt><a href="reference.html#git.util.Stats.__slots__">(git.util.Stats attribute)</a>
991 </dt>
992
993 </dl></dd>
994
995 <dt><a href="reference.html#git.diff.Diff.__str__">__str__() (git.diff.Diff method)</a>
996 </dt>
997
998 <dd><dl>
999
1000 <dt><a href="reference.html#git.exc.CheckoutError.__str__">(git.exc.CheckoutError method)</a>
1001 </dt>
1002
1003
1004 <dt><a href="reference.html#git.exc.GitCommandError.__str__">(git.exc.GitCommandError method)</a>
1005 </dt>
1006
1007
1008 <dt><a href="reference.html#git.exc.HookExecutionError.__str__">(git.exc.HookExecutionError method)</a>
1009 </dt>
1010
1011
1012 <dt><a href="reference.html#git.exc.RepositoryDirtyError.__str__">(git.exc.RepositoryDirtyError method)</a>
1013 </dt>
1014
1015
1016 <dt><a href="reference.html#git.index.base.CheckoutError.__str__">(git.index.base.CheckoutError method)</a>
1017 </dt>
1018
1019
1020 <dt><a href="reference.html#git.index.typ.BaseIndexEntry.__str__">(git.index.typ.BaseIndexEntry method)</a>
1021 </dt>
1022
1023
1024 <dt><a href="reference.html#git.objects.base.Object.__str__">(git.objects.base.Object method)</a>
1025 </dt>
1026
1027
1028 <dt><a href="reference.html#git.objects.submodule.base.Submodule.__str__">(git.objects.submodule.base.Submodule method)</a>
1029 </dt>
1030
1031
1032 <dt><a href="reference.html#git.objects.util.Actor.__str__">(git.objects.util.Actor method)</a>
1033 </dt>
1034
1035
1036 <dt><a href="reference.html#git.refs.reference.Reference.__str__">(git.refs.reference.Reference method)</a>
1037 </dt>
1038
1039
1040 <dt><a href="reference.html#git.refs.symbolic.SymbolicReference.__str__">(git.refs.symbolic.SymbolicReference method)</a>
1041 </dt>
1042
1043
1044 <dt><a href="reference.html#git.remote.FetchInfo.__str__">(git.remote.FetchInfo method)</a>
1045 </dt>
1046
1047
1048 <dt><a href="reference.html#git.remote.Remote.__str__">(git.remote.Remote method)</a>
1049 </dt>
1050
1051
1052 <dt><a href="reference.html#git.util.Actor.__str__">(git.util.Actor method)</a>
1053 </dt>
1054
1055 </dl></dd>
1056
1057 <dt><a href="reference.html#git.objects.tree.Tree.__truediv__">__truediv__() (git.objects.tree.Tree method)</a>
1058 </dt>
1059
1060
1061 <dt><a href="reference.html#git.diff.Diffable.Index.__weakref__">__weakref__ (git.diff.Diffable.Index attribute)</a>
1062 </dt>
1063
1064 <dd><dl>
1065
1066 <dt><a href="reference.html#git.diff.DiffIndex.__weakref__">(git.diff.DiffIndex attribute)</a>
1067 </dt>
1068
1069
1070 <dt><a href="reference.html#git.exc.CacheError.__weakref__">(git.exc.CacheError attribute)</a>
1071 </dt>
1072
1073
1074 <dt><a href="reference.html#git.exc.CheckoutError.__weakref__">(git.exc.CheckoutError attribute)</a>
1075 </dt>
1076
1077
1078 <dt><a href="reference.html#git.exc.GitCommandError.__weakref__">(git.exc.GitCommandError attribute)</a>
1079 </dt>
1080
1081
1082 <dt><a href="reference.html#git.exc.GitCommandNotFound.__weakref__">(git.exc.GitCommandNotFound attribute)</a>
1083 </dt>
1084
1085
1086 <dt><a href="reference.html#git.exc.HookExecutionError.__weakref__">(git.exc.HookExecutionError attribute)</a>
1087 </dt>
1088
1089
1090 <dt><a href="reference.html#git.exc.InvalidGitRepositoryError.__weakref__">(git.exc.InvalidGitRepositoryError attribute)</a>
1091 </dt>
1092
1093
1094 <dt><a href="reference.html#git.exc.NoSuchPathError.__weakref__">(git.exc.NoSuchPathError attribute)</a>
1095 </dt>
1096
1097
1098 <dt><a href="reference.html#git.exc.RepositoryDirtyError.__weakref__">(git.exc.RepositoryDirtyError attribute)</a>
1099 </dt>
1100
1101
1102 <dt><a href="reference.html#git.index.base.CheckoutError.__weakref__">(git.index.base.CheckoutError attribute)</a>
1103 </dt>
1104
1105
1106 <dt><a href="reference.html#git.objects.submodule.base.Submodule.__weakref__">(git.objects.submodule.base.Submodule attribute)</a>
1107 </dt>
1108
1109
1110 <dt><a href="reference.html#git.objects.util.tzoffset.__weakref__">(git.objects.util.tzoffset attribute)</a>
1111 </dt>
1112
1113
1114 <dt><a href="reference.html#git.refs.head.Head.__weakref__">(git.refs.head.Head attribute)</a>
1115 </dt>
1116
1117
1118 <dt><a href="reference.html#git.repo.base.Repo.__weakref__">(git.repo.base.Repo attribute)</a>
1119 </dt>
1120
1121
1122 <dt><a href="reference.html#git.util.WaitGroup.__weakref__">(git.util.WaitGroup attribute)</a>
1123 </dt>
1124
1125 </dl></dd>
1126 </dl></td>
1127 </tr></table>
1128
1129 <h2 id="A">A</h2>
1130 <table style="width: 100%" class="indextable genindextable"><tr>
1131 <td style="width: 33%" valign="top"><dl>
1132
1133 <dt><a href="reference.html#git.diff.Diff.a_blob">a_blob (git.diff.Diff attribute)</a>
1134 </dt>
1135
1136
1137 <dt><a href="reference.html#git.diff.Diff.a_mode">a_mode (git.diff.Diff attribute)</a>
1138 </dt>
1139
1140
1141 <dt><a href="reference.html#git.diff.Diff.a_path">a_path (git.diff.Diff attribute)</a>
1142 </dt>
1143
1144
1145 <dt><a href="reference.html#git.diff.Diff.a_rawpath">a_rawpath (git.diff.Diff attribute)</a>
1146 </dt>
1147
1148
1149 <dt><a href="reference.html#git.objects.base.IndexObject.abspath">abspath (git.objects.base.IndexObject attribute)</a>
1150 </dt>
1151
1152 <dd><dl>
1153
1154 <dt><a href="reference.html#git.refs.symbolic.SymbolicReference.abspath">(git.refs.symbolic.SymbolicReference attribute)</a>
1155 </dt>
1156
1157 </dl></dd>
1158
1159 <dt><a href="reference.html#git.repo.base.Repo.active_branch">active_branch (git.repo.base.Repo attribute)</a>
1160 </dt>
1161
1162
1163 <dt><a href="reference.html#git.objects.util.Actor">Actor (class in git.objects.util)</a>
1164 </dt>
1165
1166 <dd><dl>
1167
1168 <dt><a href="reference.html#git.util.Actor">(class in git.util)</a>
1169 </dt>
1170
1171 </dl></dd>
1172
1173 <dt><a href="reference.html#git.refs.log.RefLogEntry.actor">actor (git.refs.log.RefLogEntry attribute)</a>
1174 </dt>
1175
1176
1177 <dt><a href="reference.html#git.index.base.IndexFile.add">add() (git.index.base.IndexFile method)</a>
1178 </dt>
1179
1180 <dd><dl>
1181
1182 <dt><a href="reference.html#git.objects.submodule.base.Submodule.add">(git.objects.submodule.base.Submodule class method)</a>
1183 </dt>
1184
1185
1186 <dt><a href="reference.html#git.objects.tree.TreeModifier.add">(git.objects.tree.TreeModifier method)</a>
1187 </dt>
1188
1189
1190 <dt><a href="reference.html#git.remote.Remote.add">(git.remote.Remote class method)</a>
1191 </dt>
1192
1193
1194 <dt><a href="reference.html#git.util.WaitGroup.add">(git.util.WaitGroup method)</a>
1195 </dt>
1196
1197 </dl></dd>
1198
1199 <dt><a href="reference.html#git.objects.tree.TreeModifier.add_unchecked">add_unchecked() (git.objects.tree.TreeModifier method)</a>
1200 </dt>
1201
1202
1203 <dt><a href="reference.html#git.remote.Remote.add_url">add_url() (git.remote.Remote method)</a>
1204 </dt>
1205
1206 </dl></td>
1207 <td style="width: 33%" valign="top"><dl>
1208
1209 <dt><a href="reference.html#git.repo.base.Repo.alternates">alternates (git.repo.base.Repo attribute)</a>
1210 </dt>
1211
1212
1213 <dt><a href="reference.html#git.objects.util.altz_to_utctz_str">altz_to_utctz_str() (in module git.objects.util)</a>
1214 </dt>
1215
1216
1217 <dt><a href="reference.html#git.refs.log.RefLog.append_entry">append_entry() (git.refs.log.RefLog class method)</a>
1218 </dt>
1219
1220
1221 <dt><a href="reference.html#git.repo.base.Repo.archive">archive() (git.repo.base.Repo method)</a>
1222 </dt>
1223
1224
1225 <dt><a href="reference.html#git.cmd.Git.AutoInterrupt.args">args (git.cmd.Git.AutoInterrupt attribute)</a>
1226 </dt>
1227
1228
1229 <dt><a href="reference.html#git.util.assure_directory_exists">assure_directory_exists() (in module git.util)</a>
1230 </dt>
1231
1232
1233 <dt><a href="reference.html#git.objects.commit.Commit.author">author (git.objects.commit.Commit attribute)</a>
1234 </dt>
1235
1236
1237 <dt><a href="reference.html#git.objects.util.Actor.author">author() (git.objects.util.Actor class method)</a>
1238 </dt>
1239
1240 <dd><dl>
1241
1242 <dt><a href="reference.html#git.util.Actor.author">(git.util.Actor class method)</a>
1243 </dt>
1244
1245 </dl></dd>
1246
1247 <dt><a href="reference.html#git.objects.commit.Commit.author_tz_offset">author_tz_offset (git.objects.commit.Commit attribute)</a>
1248 </dt>
1249
1250
1251 <dt><a href="reference.html#git.objects.commit.Commit.authored_date">authored_date (git.objects.commit.Commit attribute)</a>
1252 </dt>
1253
1254
1255 <dt><a href="reference.html#git.objects.commit.Commit.authored_datetime">authored_datetime (git.objects.commit.Commit attribute)</a>
1256 </dt>
1257
1258 </dl></td>
1259 </tr></table>
1260
1261 <h2 id="B">B</h2>
1262 <table style="width: 100%" class="indextable genindextable"><tr>
1263 <td style="width: 33%" valign="top"><dl>
1264
1265 <dt><a href="reference.html#git.diff.Diff.b_blob">b_blob (git.diff.Diff attribute)</a>
1266 </dt>
1267
1268
1269 <dt><a href="reference.html#git.diff.Diff.b_mode">b_mode (git.diff.Diff attribute)</a>
1270 </dt>
1271
1272
1273 <dt><a href="reference.html#git.diff.Diff.b_path">b_path (git.diff.Diff attribute)</a>
1274 </dt>
1275
1276
1277 <dt><a href="reference.html#git.diff.Diff.b_rawpath">b_rawpath (git.diff.Diff attribute)</a>
1278 </dt>
1279
1280
1281 <dt><a href="reference.html#git.repo.base.Repo.bare">bare (git.repo.base.Repo attribute)</a>
1282 </dt>
1283
1284
1285 <dt><a href="reference.html#git.index.typ.BaseIndexEntry">BaseIndexEntry (class in git.index.typ)</a>
1286 </dt>
1287
1288
1289 <dt><a href="reference.html#git.remote.RemoteProgress.BEGIN">BEGIN (git.remote.RemoteProgress attribute)</a>
1290 </dt>
1291
1292 <dd><dl>
1293
1294 <dt><a href="reference.html#git.util.RemoteProgress.BEGIN">(git.util.RemoteProgress attribute)</a>
1295 </dt>
1296
1297 </dl></dd>
1298
1299 <dt><a href="reference.html#git.index.typ.BaseIndexEntry.binsha">binsha (git.index.typ.BaseIndexEntry attribute)</a>
1300 </dt>
1301
1302 <dd><dl>
1303
1304 <dt><a href="reference.html#git.objects.base.Object.binsha">(git.objects.base.Object attribute)</a>
1305 </dt>
1306
1307 </dl></dd>
1308
1309 <dt><a href="reference.html#git.repo.base.Repo.blame">blame() (git.repo.base.Repo method)</a>
1310 </dt>
1311
1312
1313 <dt><a href="reference.html#git.repo.base.Repo.blame_incremental">blame_incremental() (git.repo.base.Repo method)</a>
1314 </dt>
1315
1316 </dl></td>
1317 <td style="width: 33%" valign="top"><dl>
1318
1319 <dt><a href="reference.html#git.objects.blob.Blob">Blob (class in git.objects.blob)</a>
1320 </dt>
1321
1322
1323 <dt><a href="reference.html#git.objects.tree.Tree.blob_id">blob_id (git.objects.tree.Tree attribute)</a>
1324 </dt>
1325
1326
1327 <dt><a href="reference.html#git.index.typ.BlobFilter">BlobFilter (class in git.index.typ)</a>
1328 </dt>
1329
1330
1331 <dt><a href="reference.html#git.objects.tree.Tree.blobs">blobs (git.objects.tree.Tree attribute)</a>
1332 </dt>
1333
1334
1335 <dt><a href="reference.html#git.util.BlockingLockFile">BlockingLockFile (class in git.util)</a>
1336 </dt>
1337
1338
1339 <dt><a href="reference.html#git.objects.submodule.base.Submodule.branch">branch (git.objects.submodule.base.Submodule attribute)</a>
1340 </dt>
1341
1342
1343 <dt><a href="reference.html#git.objects.submodule.base.Submodule.branch_name">branch_name (git.objects.submodule.base.Submodule attribute)</a>
1344 </dt>
1345
1346
1347 <dt><a href="reference.html#git.objects.submodule.base.Submodule.branch_path">branch_path (git.objects.submodule.base.Submodule attribute)</a>
1348 </dt>
1349
1350
1351 <dt><a href="reference.html#git.objects.submodule.root.RootUpdateProgress.BRANCHCHANGE">BRANCHCHANGE (git.objects.submodule.root.RootUpdateProgress attribute)</a>
1352 </dt>
1353
1354
1355 <dt><a href="reference.html#git.repo.base.Repo.branches">branches (git.repo.base.Repo attribute)</a>
1356 </dt>
1357
1358 </dl></td>
1359 </tr></table>
1360
1361 <h2 id="C">C</h2>
1362 <table style="width: 100%" class="indextable genindextable"><tr>
1363 <td style="width: 33%" valign="top"><dl>
1364
1365 <dt><a href="reference.html#git.objects.tree.Tree.cache">cache (git.objects.tree.Tree attribute)</a>
1366 </dt>
1367
1368
1369 <dt><a href="reference.html#git.exc.CacheError">CacheError</a>
1370 </dt>
1371
1372
1373 <dt><a href="reference.html#git.util.CallableRemoteProgress">CallableRemoteProgress (class in git.util)</a>
1374 </dt>
1375
1376
1377 <dt><a href="reference.html#git.cmd.Git.cat_file_all">cat_file_all (git.cmd.Git attribute)</a>
1378 </dt>
1379
1380
1381 <dt><a href="reference.html#git.cmd.Git.cat_file_header">cat_file_header (git.cmd.Git attribute)</a>
1382 </dt>
1383
1384
1385 <dt><a href="reference.html#git.diff.Diff.change_type">change_type (git.diff.Diff attribute)</a>
1386 </dt>
1387
1388 <dd><dl>
1389
1390 <dt><a href="reference.html#git.diff.DiffIndex.change_type">(git.diff.DiffIndex attribute)</a>
1391 </dt>
1392
1393 </dl></dd>
1394
1395 <dt><a href="reference.html#git.remote.RemoteProgress.CHECKING_OUT">CHECKING_OUT (git.remote.RemoteProgress attribute)</a>
1396 </dt>
1397
1398 <dd><dl>
1399
1400 <dt><a href="reference.html#git.util.RemoteProgress.CHECKING_OUT">(git.util.RemoteProgress attribute)</a>
1401 </dt>
1402
1403 </dl></dd>
1404
1405 <dt><a href="reference.html#git.index.base.IndexFile.checkout">checkout() (git.index.base.IndexFile method)</a>
1406 </dt>
1407
1408 <dd><dl>
1409
1410 <dt><a href="reference.html#git.refs.head.Head.checkout">(git.refs.head.Head method)</a>
1411 </dt>
1412
1413 </dl></dd>
1414
1415 <dt><a href="reference.html#git.exc.CheckoutError">CheckoutError</a>, <a href="reference.html#git.index.base.CheckoutError">[1]</a>
1416 </dt>
1417
1418
1419 <dt><a href="reference.html#git.objects.submodule.base.Submodule.children">children() (git.objects.submodule.base.Submodule method)</a>
1420 </dt>
1421
1422
1423 <dt><a href="reference.html#git.cmd.Git.clear_cache">clear_cache() (git.cmd.Git method)</a>
1424 </dt>
1425
1426
1427 <dt><a href="reference.html#git.objects.submodule.base.UpdateProgress.CLONE">CLONE (git.objects.submodule.base.UpdateProgress attribute)</a>
1428 </dt>
1429
1430
1431 <dt><a href="reference.html#git.repo.base.Repo.clone">clone() (git.repo.base.Repo method)</a>
1432 </dt>
1433
1434
1435 <dt><a href="reference.html#git.repo.base.Repo.clone_from">clone_from() (git.repo.base.Repo class method)</a>
1436 </dt>
1437
1438
1439 <dt><a href="reference.html#git.util.IndexFileSHA1Writer.close">close() (git.util.IndexFileSHA1Writer method)</a>
1440 </dt>
1441
1442
1443 <dt><a href="reference.html#git.objects.commit.Commit">Commit (class in git.objects.commit)</a>
1444 </dt>
1445
1446
1447 <dt><a href="reference.html#git.refs.symbolic.SymbolicReference.commit">commit (git.refs.symbolic.SymbolicReference attribute)</a>
1448 </dt>
1449
1450 <dd><dl>
1451
1452 <dt><a href="reference.html#git.refs.tag.TagReference.commit">(git.refs.tag.TagReference attribute)</a>
1453 </dt>
1454
1455
1456 <dt><a href="reference.html#git.remote.FetchInfo.commit">(git.remote.FetchInfo attribute)</a>
1457 </dt>
1458
1459 </dl></dd>
1460
1461 <dt><a href="reference.html#git.index.base.IndexFile.commit">commit() (git.index.base.IndexFile method)</a>
1462 </dt>
1463
1464 <dd><dl>
1465
1466 <dt><a href="reference.html#git.repo.base.Repo.commit">(git.repo.base.Repo method)</a>
1467 </dt>
1468
1469 </dl></dd>
1470
1471 <dt><a href="reference.html#git.objects.tree.Tree.commit_id">commit_id (git.objects.tree.Tree attribute)</a>
1472 </dt>
1473
1474
1475 <dt><a href="reference.html#git.objects.commit.Commit.committed_date">committed_date (git.objects.commit.Commit attribute)</a>
1476 </dt>
1477
1478
1479 <dt><a href="reference.html#git.objects.commit.Commit.committed_datetime">committed_datetime (git.objects.commit.Commit attribute)</a>
1480 </dt>
1481
1482
1483 <dt><a href="reference.html#git.objects.commit.Commit.committer">committer (git.objects.commit.Commit attribute)</a>
1484 </dt>
1485
1486
1487 <dt><a href="reference.html#git.objects.util.Actor.committer">committer() (git.objects.util.Actor class method)</a>
1488 </dt>
1489
1490 <dd><dl>
1491
1492 <dt><a href="reference.html#git.util.Actor.committer">(git.util.Actor class method)</a>
1493 </dt>
1494
1495 </dl></dd>
1496 </dl></td>
1497 <td style="width: 33%" valign="top"><dl>
1498
1499 <dt><a href="reference.html#git.objects.commit.Commit.committer_tz_offset">committer_tz_offset (git.objects.commit.Commit attribute)</a>
1500 </dt>
1501
1502
1503 <dt><a href="reference.html#git.remote.RemoteProgress.COMPRESSING">COMPRESSING (git.remote.RemoteProgress attribute)</a>
1504 </dt>
1505
1506 <dd><dl>
1507
1508 <dt><a href="reference.html#git.util.RemoteProgress.COMPRESSING">(git.util.RemoteProgress attribute)</a>
1509 </dt>
1510
1511 </dl></dd>
1512
1513 <dt><a href="reference.html#git.objects.util.Actor.conf_email">conf_email (git.objects.util.Actor attribute)</a>
1514 </dt>
1515
1516 <dd><dl>
1517
1518 <dt><a href="reference.html#git.util.Actor.conf_email">(git.util.Actor attribute)</a>
1519 </dt>
1520
1521 </dl></dd>
1522
1523 <dt><a href="reference.html#git.objects.commit.Commit.conf_encoding">conf_encoding (git.objects.commit.Commit attribute)</a>
1524 </dt>
1525
1526
1527 <dt><a href="reference.html#git.objects.util.Actor.conf_name">conf_name (git.objects.util.Actor attribute)</a>
1528 </dt>
1529
1530 <dd><dl>
1531
1532 <dt><a href="reference.html#git.util.Actor.conf_name">(git.util.Actor attribute)</a>
1533 </dt>
1534
1535 </dl></dd>
1536
1537 <dt><a href="reference.html#git.config.SectionConstraint.config">config (git.config.SectionConstraint attribute)</a>
1538 </dt>
1539
1540
1541 <dt><a href="reference.html#git.repo.base.Repo.config_level">config_level (git.repo.base.Repo attribute)</a>
1542 </dt>
1543
1544
1545 <dt><a href="reference.html#git.remote.Remote.config_reader">config_reader (git.remote.Remote attribute)</a>
1546 </dt>
1547
1548
1549 <dt><a href="reference.html#git.objects.submodule.base.Submodule.config_reader">config_reader() (git.objects.submodule.base.Submodule method)</a>
1550 </dt>
1551
1552 <dd><dl>
1553
1554 <dt><a href="reference.html#git.refs.head.Head.config_reader">(git.refs.head.Head method)</a>
1555 </dt>
1556
1557
1558 <dt><a href="reference.html#git.repo.base.Repo.config_reader">(git.repo.base.Repo method)</a>
1559 </dt>
1560
1561 </dl></dd>
1562
1563 <dt><a href="reference.html#git.remote.Remote.config_writer">config_writer (git.remote.Remote attribute)</a>
1564 </dt>
1565
1566
1567 <dt><a href="reference.html#git.objects.submodule.base.Submodule.config_writer">config_writer() (git.objects.submodule.base.Submodule method)</a>
1568 </dt>
1569
1570 <dd><dl>
1571
1572 <dt><a href="reference.html#git.refs.head.Head.config_writer">(git.refs.head.Head method)</a>
1573 </dt>
1574
1575
1576 <dt><a href="reference.html#git.repo.base.Repo.config_writer">(git.repo.base.Repo method)</a>
1577 </dt>
1578
1579 </dl></dd>
1580
1581 <dt><a href="reference.html#git.objects.commit.Commit.count">count() (git.objects.commit.Commit method)</a>
1582 </dt>
1583
1584
1585 <dt><a href="reference.html#git.remote.RemoteProgress.COUNTING">COUNTING (git.remote.RemoteProgress attribute)</a>
1586 </dt>
1587
1588 <dd><dl>
1589
1590 <dt><a href="reference.html#git.util.RemoteProgress.COUNTING">(git.util.RemoteProgress attribute)</a>
1591 </dt>
1592
1593 </dl></dd>
1594
1595 <dt><a href="reference.html#git.refs.remote.RemoteReference.create">create() (git.refs.remote.RemoteReference class method)</a>
1596 </dt>
1597
1598 <dd><dl>
1599
1600 <dt><a href="reference.html#git.refs.symbolic.SymbolicReference.create">(git.refs.symbolic.SymbolicReference class method)</a>
1601 </dt>
1602
1603
1604 <dt><a href="reference.html#git.refs.tag.TagReference.create">(git.refs.tag.TagReference class method)</a>
1605 </dt>
1606
1607
1608 <dt><a href="reference.html#git.remote.Remote.create">(git.remote.Remote class method)</a>
1609 </dt>
1610
1611 </dl></dd>
1612
1613 <dt><a href="reference.html#git.objects.commit.Commit.create_from_tree">create_from_tree() (git.objects.commit.Commit class method)</a>
1614 </dt>
1615
1616
1617 <dt><a href="reference.html#git.repo.base.Repo.create_head">create_head() (git.repo.base.Repo method)</a>
1618 </dt>
1619
1620
1621 <dt><a href="reference.html#git.cmd.Git.CREATE_NO_WINDOW">CREATE_NO_WINDOW (git.cmd.Git attribute)</a>
1622 </dt>
1623
1624
1625 <dt><a href="reference.html#git.repo.base.Repo.create_remote">create_remote() (git.repo.base.Repo method)</a>
1626 </dt>
1627
1628
1629 <dt><a href="reference.html#git.repo.base.Repo.create_submodule">create_submodule() (git.repo.base.Repo method)</a>
1630 </dt>
1631
1632
1633 <dt><a href="reference.html#git.repo.base.Repo.create_tag">create_tag() (git.repo.base.Repo method)</a>
1634 </dt>
1635
1636
1637 <dt><a href="reference.html#git.index.typ.IndexEntry.ctime">ctime (git.index.typ.IndexEntry attribute)</a>
1638 </dt>
1639
1640
1641 <dt><a href="reference.html#git.cmd.Git.custom_environment">custom_environment() (git.cmd.Git method)</a>
1642 </dt>
1643
1644 </dl></td>
1645 </tr></table>
1646
1647 <h2 id="D">D</h2>
1648 <table style="width: 100%" class="indextable genindextable"><tr>
1649 <td style="width: 33%" valign="top"><dl>
1650
1651 <dt><a href="reference.html#git.repo.base.Repo.daemon_export">daemon_export (git.repo.base.Repo attribute)</a>
1652 </dt>
1653
1654
1655 <dt><a href="reference.html#git.repo.base.Repo.DAEMON_EXPORT_FILE">DAEMON_EXPORT_FILE (git.repo.base.Repo attribute)</a>
1656 </dt>
1657
1658
1659 <dt><a href="reference.html#git.objects.base.Object.data_stream">data_stream (git.objects.base.Object attribute)</a>
1660 </dt>
1661
1662
1663 <dt><a href="reference.html#git.objects.commit.Commit.default_encoding">default_encoding (git.objects.commit.Commit attribute)</a>
1664 </dt>
1665
1666
1667 <dt><a href="reference.html#git.index.util.default_index">default_index() (in module git.index.util)</a>
1668 </dt>
1669
1670
1671 <dt><a href="reference.html#git.objects.blob.Blob.DEFAULT_MIME_TYPE">DEFAULT_MIME_TYPE (git.objects.blob.Blob attribute)</a>
1672 </dt>
1673
1674
1675 <dt><a href="reference.html#git.refs.head.Head.delete">delete() (git.refs.head.Head class method)</a>
1676 </dt>
1677
1678 <dd><dl>
1679
1680 <dt><a href="reference.html#git.refs.remote.RemoteReference.delete">(git.refs.remote.RemoteReference class method)</a>
1681 </dt>
1682
1683
1684 <dt><a href="reference.html#git.refs.symbolic.SymbolicReference.delete">(git.refs.symbolic.SymbolicReference class method)</a>
1685 </dt>
1686
1687
1688 <dt><a href="reference.html#git.refs.tag.TagReference.delete">(git.refs.tag.TagReference class method)</a>
1689 </dt>
1690
1691 </dl></dd>
1692
1693 <dt><a href="reference.html#git.repo.base.Repo.delete_head">delete_head() (git.repo.base.Repo method)</a>
1694 </dt>
1695
1696
1697 <dt><a href="reference.html#git.repo.base.Repo.delete_remote">delete_remote() (git.repo.base.Repo method)</a>
1698 </dt>
1699
1700
1701 <dt><a href="reference.html#git.repo.base.Repo.delete_tag">delete_tag() (git.repo.base.Repo method)</a>
1702 </dt>
1703
1704
1705 <dt><a href="reference.html#git.remote.Remote.delete_url">delete_url() (git.remote.Remote method)</a>
1706 </dt>
1707
1708
1709 <dt><a href="reference.html#git.remote.PushInfo.DELETED">DELETED (git.remote.PushInfo attribute)</a>
1710 </dt>
1711
1712
1713 <dt><a href="reference.html#git.diff.Diff.deleted_file">deleted_file (git.diff.Diff attribute)</a>
1714 </dt>
1715
1716 </dl></td>
1717 <td style="width: 33%" valign="top"><dl>
1718
1719 <dt><a href="reference.html#git.repo.fun.deref_tag">deref_tag() (in module git.repo.fun)</a>
1720 </dt>
1721
1722
1723 <dt><a href="reference.html#git.refs.symbolic.SymbolicReference.dereference_recursive">dereference_recursive() (git.refs.symbolic.SymbolicReference class method)</a>
1724 </dt>
1725
1726
1727 <dt><a href="reference.html#git.repo.base.Repo.description">description (git.repo.base.Repo attribute)</a>
1728 </dt>
1729
1730
1731 <dt><a href="reference.html#git.index.typ.IndexEntry.dev">dev (git.index.typ.IndexEntry attribute)</a>
1732 </dt>
1733
1734
1735 <dt><a href="reference.html#git.diff.Diff">Diff (class in git.diff)</a>
1736 </dt>
1737
1738
1739 <dt><a href="reference.html#git.diff.Diff.diff">diff (git.diff.Diff attribute)</a>
1740 </dt>
1741
1742
1743 <dt><a href="reference.html#git.diff.Diffable.diff">diff() (git.diff.Diffable method)</a>
1744 </dt>
1745
1746 <dd><dl>
1747
1748 <dt><a href="reference.html#git.index.base.IndexFile.diff">(git.index.base.IndexFile method)</a>
1749 </dt>
1750
1751 </dl></dd>
1752
1753 <dt><a href="reference.html#git.diff.Diffable">Diffable (class in git.diff)</a>
1754 </dt>
1755
1756
1757 <dt><a href="reference.html#git.diff.Diffable.Index">Diffable.Index (class in git.diff)</a>
1758 </dt>
1759
1760
1761 <dt><a href="reference.html#git.diff.DiffIndex">DiffIndex (class in git.diff)</a>
1762 </dt>
1763
1764
1765 <dt><a href="reference.html#git.util.WaitGroup.done">done() (git.util.WaitGroup method)</a>
1766 </dt>
1767
1768
1769 <dt><a href="reference.html#git.remote.RemoteProgress.DONE_TOKEN">DONE_TOKEN (git.remote.RemoteProgress attribute)</a>
1770 </dt>
1771
1772 <dd><dl>
1773
1774 <dt><a href="reference.html#git.util.RemoteProgress.DONE_TOKEN">(git.util.RemoteProgress attribute)</a>
1775 </dt>
1776
1777 </dl></dd>
1778
1779 <dt><a href="reference.html#git.objects.util.tzoffset.dst">dst() (git.objects.util.tzoffset method)</a>
1780 </dt>
1781
1782 </dl></td>
1783 </tr></table>
1784
1785 <h2 id="E">E</h2>
1786 <table style="width: 100%" class="indextable genindextable"><tr>
1787 <td style="width: 33%" valign="top"><dl>
1788
1789 <dt><a href="reference.html#git.objects.util.Actor.email">email (git.objects.util.Actor attribute)</a>
1790 </dt>
1791
1792 <dd><dl>
1793
1794 <dt><a href="reference.html#git.util.Actor.email">(git.util.Actor attribute)</a>
1795 </dt>
1796
1797 </dl></dd>
1798
1799 <dt><a href="reference.html#git.objects.commit.Commit.encoding">encoding (git.objects.commit.Commit attribute)</a>
1800 </dt>
1801
1802
1803 <dt><a href="reference.html#git.remote.RemoteProgress.END">END (git.remote.RemoteProgress attribute)</a>
1804 </dt>
1805
1806 <dd><dl>
1807
1808 <dt><a href="reference.html#git.util.RemoteProgress.END">(git.util.RemoteProgress attribute)</a>
1809 </dt>
1810
1811 </dl></dd>
1812
1813 <dt><a href="reference.html#git.index.base.IndexFile.entries">entries (git.index.base.IndexFile attribute)</a>
1814 </dt>
1815
1816
1817 <dt><a href="reference.html#git.refs.log.RefLog.entry_at">entry_at() (git.refs.log.RefLog class method)</a>
1818 </dt>
1819
1820
1821 <dt><a href="reference.html#git.index.base.IndexFile.entry_key">entry_key() (git.index.base.IndexFile class method)</a>
1822 </dt>
1823
1824 <dd><dl>
1825
1826 <dt><a href="reference.html#git.index.fun.entry_key">(in module git.index.fun)</a>
1827 </dt>
1828
1829 </dl></dd>
1830
1831 <dt><a href="reference.html#git.objects.commit.Commit.env_author_date">env_author_date (git.objects.commit.Commit attribute)</a>
1832 </dt>
1833
1834
1835 <dt><a href="reference.html#git.objects.util.Actor.env_author_email">env_author_email (git.objects.util.Actor attribute)</a>
1836 </dt>
1837
1838 <dd><dl>
1839
1840 <dt><a href="reference.html#git.util.Actor.env_author_email">(git.util.Actor attribute)</a>
1841 </dt>
1842
1843 </dl></dd>
1844
1845 <dt><a href="reference.html#git.objects.util.Actor.env_author_name">env_author_name (git.objects.util.Actor attribute)</a>
1846 </dt>
1847
1848 <dd><dl>
1849
1850 <dt><a href="reference.html#git.util.Actor.env_author_name">(git.util.Actor attribute)</a>
1851 </dt>
1852
1853 </dl></dd>
1854 </dl></td>
1855 <td style="width: 33%" valign="top"><dl>
1856
1857 <dt><a href="reference.html#git.objects.commit.Commit.env_committer_date">env_committer_date (git.objects.commit.Commit attribute)</a>
1858 </dt>
1859
1860
1861 <dt><a href="reference.html#git.objects.util.Actor.env_committer_email">env_committer_email (git.objects.util.Actor attribute)</a>
1862 </dt>
1863
1864 <dd><dl>
1865
1866 <dt><a href="reference.html#git.util.Actor.env_committer_email">(git.util.Actor attribute)</a>
1867 </dt>
1868
1869 </dl></dd>
1870
1871 <dt><a href="reference.html#git.objects.util.Actor.env_committer_name">env_committer_name (git.objects.util.Actor attribute)</a>
1872 </dt>
1873
1874 <dd><dl>
1875
1876 <dt><a href="reference.html#git.util.Actor.env_committer_name">(git.util.Actor attribute)</a>
1877 </dt>
1878
1879 </dl></dd>
1880
1881 <dt><a href="reference.html#git.cmd.Git.environment">environment() (git.cmd.Git method)</a>
1882 </dt>
1883
1884
1885 <dt><a href="reference.html#git.remote.FetchInfo.ERROR">ERROR (git.remote.FetchInfo attribute)</a>
1886 </dt>
1887
1888 <dd><dl>
1889
1890 <dt><a href="reference.html#git.remote.PushInfo.ERROR">(git.remote.PushInfo attribute)</a>
1891 </dt>
1892
1893 </dl></dd>
1894
1895 <dt><a href="reference.html#git.remote.RemoteProgress.error_lines">error_lines() (git.remote.RemoteProgress method)</a>
1896 </dt>
1897
1898 <dd><dl>
1899
1900 <dt><a href="reference.html#git.util.RemoteProgress.error_lines">(git.util.RemoteProgress method)</a>
1901 </dt>
1902
1903 </dl></dd>
1904
1905 <dt><a href="reference.html#git.objects.blob.Blob.executable_mode">executable_mode (git.objects.blob.Blob attribute)</a>
1906 </dt>
1907
1908
1909 <dt><a href="reference.html#git.cmd.Git.execute">execute() (git.cmd.Git method)</a>
1910 </dt>
1911
1912
1913 <dt><a href="reference.html#git.objects.submodule.base.Submodule.exists">exists() (git.objects.submodule.base.Submodule method)</a>
1914 </dt>
1915
1916 <dd><dl>
1917
1918 <dt><a href="reference.html#git.remote.Remote.exists">(git.remote.Remote method)</a>
1919 </dt>
1920
1921 </dl></dd>
1922 </dl></td>
1923 </tr></table>
1924
1925 <h2 id="F">F</h2>
1926 <table style="width: 100%" class="indextable genindextable"><tr>
1927 <td style="width: 33%" valign="top"><dl>
1928
1929 <dt><a href="reference.html#git.util.IndexFileSHA1Writer.f">f (git.util.IndexFileSHA1Writer attribute)</a>
1930 </dt>
1931
1932
1933 <dt><a href="reference.html#git.remote.FetchInfo.FAST_FORWARD">FAST_FORWARD (git.remote.FetchInfo attribute)</a>
1934 </dt>
1935
1936 <dd><dl>
1937
1938 <dt><a href="reference.html#git.remote.PushInfo.FAST_FORWARD">(git.remote.PushInfo attribute)</a>
1939 </dt>
1940
1941 </dl></dd>
1942
1943 <dt><a href="reference.html#git.objects.submodule.base.UpdateProgress.FETCH">FETCH (git.objects.submodule.base.UpdateProgress attribute)</a>
1944 </dt>
1945
1946
1947 <dt><a href="reference.html#git.remote.Remote.fetch">fetch() (git.remote.Remote method)</a>
1948 </dt>
1949
1950
1951 <dt><a href="reference.html#git.remote.FetchInfo">FetchInfo (class in git.remote)</a>
1952 </dt>
1953
1954
1955 <dt><a href="reference.html#git.objects.blob.Blob.file_mode">file_mode (git.objects.blob.Blob attribute)</a>
1956 </dt>
1957
1958
1959 <dt><a href="reference.html#git.index.util.TemporaryFileSwap.file_path">file_path (git.index.util.TemporaryFileSwap attribute)</a>
1960 </dt>
1961
1962
1963 <dt><a href="reference.html#git.util.Stats.files">files (git.util.Stats attribute)</a>
1964 </dt>
1965
1966
1967 <dt><a href="reference.html#git.objects.submodule.util.find_first_remote_branch">find_first_remote_branch() (in module git.objects.submodule.util)</a>
1968 </dt>
1969
1970
1971 <dt><a href="reference.html#git.repo.fun.find_git_dir">find_git_dir() (in module git.repo.fun)</a>
1972 </dt>
1973
1974
1975 <dt><a href="reference.html#git.remote.RemoteProgress.FINDING_SOURCES">FINDING_SOURCES (git.remote.RemoteProgress attribute)</a>
1976 </dt>
1977
1978 <dd><dl>
1979
1980 <dt><a href="reference.html#git.util.RemoteProgress.FINDING_SOURCES">(git.util.RemoteProgress attribute)</a>
1981 </dt>
1982
1983 </dl></dd>
1984 </dl></td>
1985 <td style="width: 33%" valign="top"><dl>
1986
1987 <dt><a href="reference.html#git.index.typ.BaseIndexEntry.flags">flags (git.index.typ.BaseIndexEntry attribute)</a>
1988 </dt>
1989
1990 <dd><dl>
1991
1992 <dt><a href="reference.html#git.remote.FetchInfo.flags">(git.remote.FetchInfo attribute)</a>
1993 </dt>
1994
1995
1996 <dt><a href="reference.html#git.remote.PushInfo.flags">(git.remote.PushInfo attribute)</a>
1997 </dt>
1998
1999 </dl></dd>
2000
2001 <dt><a href="reference.html#git.objects.submodule.util.SubmoduleConfigParser.flush_to_index">flush_to_index() (git.objects.submodule.util.SubmoduleConfigParser method)</a>
2002 </dt>
2003
2004
2005 <dt><a href="reference.html#git.remote.FetchInfo.FORCED_UPDATE">FORCED_UPDATE (git.remote.FetchInfo attribute)</a>
2006 </dt>
2007
2008 <dd><dl>
2009
2010 <dt><a href="reference.html#git.remote.PushInfo.FORCED_UPDATE">(git.remote.PushInfo attribute)</a>
2011 </dt>
2012
2013 </dl></dd>
2014
2015 <dt><a href="reference.html#git.refs.log.RefLogEntry.format">format() (git.refs.log.RefLogEntry method)</a>
2016 </dt>
2017
2018
2019 <dt><a href="reference.html#git.index.typ.IndexEntry.from_base">from_base() (git.index.typ.IndexEntry class method)</a>
2020 </dt>
2021
2022
2023 <dt><a href="reference.html#git.index.typ.BaseIndexEntry.from_blob">from_blob() (git.index.typ.BaseIndexEntry class method)</a>
2024 </dt>
2025
2026 <dd><dl>
2027
2028 <dt><a href="reference.html#git.index.typ.IndexEntry.from_blob">(git.index.typ.IndexEntry class method)</a>
2029 </dt>
2030
2031 </dl></dd>
2032
2033 <dt><a href="reference.html#git.refs.log.RefLog.from_file">from_file() (git.refs.log.RefLog class method)</a>
2034 </dt>
2035
2036
2037 <dt><a href="reference.html#git.refs.log.RefLogEntry.from_line">from_line() (git.refs.log.RefLogEntry class method)</a>
2038 </dt>
2039
2040
2041 <dt><a href="reference.html#git.refs.symbolic.SymbolicReference.from_path">from_path() (git.refs.symbolic.SymbolicReference class method)</a>
2042 </dt>
2043
2044
2045 <dt><a href="reference.html#git.index.base.IndexFile.from_tree">from_tree() (git.index.base.IndexFile class method)</a>
2046 </dt>
2047
2048 </dl></td>
2049 </tr></table>
2050
2051 <h2 id="G">G</h2>
2052 <table style="width: 100%" class="indextable genindextable"><tr>
2053 <td style="width: 33%" valign="top"><dl>
2054
2055 <dt><a href="reference.html#git.cmd.Git.get_object_data">get_object_data() (git.cmd.Git method)</a>
2056 </dt>
2057
2058
2059 <dt><a href="reference.html#git.cmd.Git.get_object_header">get_object_header() (git.cmd.Git method)</a>
2060 </dt>
2061
2062
2063 <dt><a href="reference.html#git.objects.util.get_object_type_by_name">get_object_type_by_name() (in module git.objects.util)</a>
2064 </dt>
2065
2066
2067 <dt><a href="reference.html#git.util.get_user_id">get_user_id() (in module git.util)</a>
2068 </dt>
2069
2070
2071 <dt><a href="reference.html#git.index.typ.IndexEntry.gid">gid (git.index.typ.IndexEntry attribute)</a>
2072 </dt>
2073
2074
2075 <dt><a href="reference.html#git.cmd.Git">Git (class in git.cmd)</a>
2076 </dt>
2077
2078
2079 <dt><a href="reference.html#git.cmd.Git.AutoInterrupt">Git.AutoInterrupt (class in git.cmd)</a>
2080 </dt>
2081
2082
2083 <dt><a href="reference.html#git.cmd.Git.CatFileContentStream">Git.CatFileContentStream (class in git.cmd)</a>
2084 </dt>
2085
2086
2087 <dt><a href="reference.html#module-git.cmd">git.cmd (module)</a>
2088 </dt>
2089
2090
2091 <dt><a href="reference.html#module-git.config">git.config (module)</a>
2092 </dt>
2093
2094
2095 <dt><a href="reference.html#module-git.diff">git.diff (module)</a>
2096 </dt>
2097
2098
2099 <dt><a href="reference.html#module-git.exc">git.exc (module)</a>
2100 </dt>
2101
2102
2103 <dt><a href="reference.html#module-git.index.base">git.index.base (module)</a>
2104 </dt>
2105
2106
2107 <dt><a href="reference.html#module-git.index.fun">git.index.fun (module)</a>
2108 </dt>
2109
2110
2111 <dt><a href="reference.html#module-git.index.typ">git.index.typ (module)</a>
2112 </dt>
2113
2114
2115 <dt><a href="reference.html#module-git.index.util">git.index.util (module)</a>
2116 </dt>
2117
2118
2119 <dt><a href="reference.html#module-git.objects.base">git.objects.base (module)</a>
2120 </dt>
2121
2122
2123 <dt><a href="reference.html#module-git.objects.blob">git.objects.blob (module)</a>
2124 </dt>
2125
2126
2127 <dt><a href="reference.html#module-git.objects.commit">git.objects.commit (module)</a>
2128 </dt>
2129
2130
2131 <dt><a href="reference.html#module-git.objects.fun">git.objects.fun (module)</a>
2132 </dt>
2133
2134
2135 <dt><a href="reference.html#module-git.objects.submodule.base">git.objects.submodule.base (module)</a>
2136 </dt>
2137
2138
2139 <dt><a href="reference.html#module-git.objects.submodule.root">git.objects.submodule.root (module)</a>
2140 </dt>
2141
2142
2143 <dt><a href="reference.html#module-git.objects.submodule.util">git.objects.submodule.util (module)</a>
2144 </dt>
2145
2146 </dl></td>
2147 <td style="width: 33%" valign="top"><dl>
2148
2149 <dt><a href="reference.html#module-git.objects.tag">git.objects.tag (module)</a>
2150 </dt>
2151
2152
2153 <dt><a href="reference.html#module-git.objects.tree">git.objects.tree (module)</a>
2154 </dt>
2155
2156
2157 <dt><a href="reference.html#module-git.objects.util">git.objects.util (module)</a>
2158 </dt>
2159
2160
2161 <dt><a href="reference.html#module-git.refs.head">git.refs.head (module)</a>
2162 </dt>
2163
2164
2165 <dt><a href="reference.html#module-git.refs.log">git.refs.log (module)</a>
2166 </dt>
2167
2168
2169 <dt><a href="reference.html#module-git.refs.reference">git.refs.reference (module)</a>
2170 </dt>
2171
2172
2173 <dt><a href="reference.html#module-git.refs.remote">git.refs.remote (module)</a>
2174 </dt>
2175
2176
2177 <dt><a href="reference.html#module-git.refs.symbolic">git.refs.symbolic (module)</a>
2178 </dt>
2179
2180
2181 <dt><a href="reference.html#module-git.refs.tag">git.refs.tag (module)</a>
2182 </dt>
2183
2184
2185 <dt><a href="reference.html#module-git.remote">git.remote (module)</a>
2186 </dt>
2187
2188
2189 <dt><a href="reference.html#module-git.repo.base">git.repo.base (module)</a>
2190 </dt>
2191
2192
2193 <dt><a href="reference.html#module-git.repo.fun">git.repo.fun (module)</a>
2194 </dt>
2195
2196
2197 <dt><a href="reference.html#module-git.util">git.util (module)</a>
2198 </dt>
2199
2200
2201 <dt><a href="reference.html#git.cmd.Git.git_exec_name">git_exec_name (git.cmd.Git attribute)</a>
2202 </dt>
2203
2204
2205 <dt><a href="reference.html#git.cmd.Git.git_exec_name_win">git_exec_name_win (git.cmd.Git attribute)</a>
2206 </dt>
2207
2208
2209 <dt><a href="reference.html#git.cmd.Git.GIT_PYTHON_GIT_EXECUTABLE">GIT_PYTHON_GIT_EXECUTABLE (git.cmd.Git attribute)</a>
2210 </dt>
2211
2212
2213 <dt><a href="reference.html#git.cmd.Git.GIT_PYTHON_TRACE">GIT_PYTHON_TRACE (git.cmd.Git attribute)</a>
2214 </dt>
2215
2216
2217 <dt><a href="reference.html#git.index.util.git_working_dir">git_working_dir() (in module git.index.util)</a>
2218 </dt>
2219
2220
2221 <dt><a href="reference.html#git.exc.GitCommandError">GitCommandError</a>
2222 </dt>
2223
2224
2225 <dt><a href="reference.html#git.exc.GitCommandNotFound">GitCommandNotFound</a>
2226 </dt>
2227
2228
2229 <dt><a href="reference.html#git.repo.base.Repo.GitCommandWrapperType">GitCommandWrapperType (git.repo.base.Repo attribute)</a>
2230 </dt>
2231
2232
2233 <dt><a href="reference.html#git.config.GitConfigParser">GitConfigParser (in module git.config)</a>
2234 </dt>
2235
2236
2237 <dt><a href="reference.html#git.objects.commit.Commit.gpgsig">gpgsig (git.objects.commit.Commit attribute)</a>
2238 </dt>
2239
2240 </dl></td>
2241 </tr></table>
2242
2243 <h2 id="H">H</h2>
2244 <table style="width: 100%" class="indextable genindextable"><tr>
2245 <td style="width: 33%" valign="top"><dl>
2246
2247 <dt><a href="reference.html#git.repo.base.Repo.has_separate_working_tree">has_separate_working_tree() (git.repo.base.Repo method)</a>
2248 </dt>
2249
2250
2251 <dt><a href="reference.html#git.refs.head.HEAD">HEAD (class in git.refs.head)</a>
2252 </dt>
2253
2254
2255 <dt><a href="reference.html#git.refs.head.Head">Head (class in git.refs.head)</a>
2256 </dt>
2257
2258
2259 <dt><a href="reference.html#git.repo.base.Repo.head">head (git.repo.base.Repo attribute)</a>
2260 </dt>
2261
2262
2263 <dt><a href="reference.html#git.remote.FetchInfo.HEAD_UPTODATE">HEAD_UPTODATE (git.remote.FetchInfo attribute)</a>
2264 </dt>
2265
2266 </dl></td>
2267 <td style="width: 33%" valign="top"><dl>
2268
2269 <dt><a href="reference.html#git.repo.base.Repo.heads">heads (git.repo.base.Repo attribute)</a>
2270 </dt>
2271
2272
2273 <dt><a href="reference.html#git.index.typ.BaseIndexEntry.hexsha">hexsha (git.index.typ.BaseIndexEntry attribute)</a>
2274 </dt>
2275
2276 <dd><dl>
2277
2278 <dt><a href="reference.html#git.objects.base.Object.hexsha">(git.objects.base.Object attribute)</a>
2279 </dt>
2280
2281 </dl></dd>
2282
2283 <dt><a href="reference.html#git.index.fun.hook_path">hook_path() (in module git.index.fun)</a>
2284 </dt>
2285
2286
2287 <dt><a href="reference.html#git.exc.HookExecutionError">HookExecutionError</a>
2288 </dt>
2289
2290 </dl></td>
2291 </tr></table>
2292
2293 <h2 id="I">I</h2>
2294 <table style="width: 100%" class="indextable genindextable"><tr>
2295 <td style="width: 33%" valign="top"><dl>
2296
2297 <dt><a href="reference.html#git.repo.base.Repo.index">index (git.repo.base.Repo attribute)</a>
2298 </dt>
2299
2300
2301 <dt><a href="reference.html#git.index.typ.IndexEntry">IndexEntry (class in git.index.typ)</a>
2302 </dt>
2303
2304
2305 <dt><a href="reference.html#git.index.base.IndexFile">IndexFile (class in git.index.base)</a>
2306 </dt>
2307
2308
2309 <dt><a href="reference.html#git.util.IndexFileSHA1Writer">IndexFileSHA1Writer (class in git.util)</a>
2310 </dt>
2311
2312
2313 <dt><a href="reference.html#git.objects.base.IndexObject">IndexObject (class in git.objects.base)</a>
2314 </dt>
2315
2316
2317 <dt><a href="reference.html#git.repo.base.Repo.init">init() (git.repo.base.Repo class method)</a>
2318 </dt>
2319
2320
2321 <dt><a href="reference.html#git.index.typ.IndexEntry.inode">inode (git.index.typ.IndexEntry attribute)</a>
2322 </dt>
2323
2324
2325 <dt><a href="reference.html#git.exc.InvalidGitRepositoryError">InvalidGitRepositoryError</a>
2326 </dt>
2327
2328
2329 <dt><a href="reference.html#git.repo.base.Repo.is_ancestor">is_ancestor() (git.repo.base.Repo method)</a>
2330 </dt>
2331
2332
2333 <dt><a href="reference.html#git.refs.symbolic.SymbolicReference.is_detached">is_detached (git.refs.symbolic.SymbolicReference attribute)</a>
2334 </dt>
2335
2336
2337 <dt><a href="reference.html#git.repo.base.Repo.is_dirty">is_dirty() (git.repo.base.Repo method)</a>
2338 </dt>
2339
2340
2341 <dt><a href="reference.html#git.repo.fun.is_git_dir">is_git_dir() (in module git.repo.fun)</a>
2342 </dt>
2343
2344 </dl></td>
2345 <td style="width: 33%" valign="top"><dl>
2346
2347 <dt><a href="reference.html#git.refs.symbolic.SymbolicReference.is_remote">is_remote() (git.refs.symbolic.SymbolicReference method)</a>
2348 </dt>
2349
2350
2351 <dt><a href="reference.html#git.refs.symbolic.SymbolicReference.is_valid">is_valid() (git.refs.symbolic.SymbolicReference method)</a>
2352 </dt>
2353
2354
2355 <dt><a href="reference.html#git.index.base.IndexFile.iter_blobs">iter_blobs() (git.index.base.IndexFile method)</a>
2356 </dt>
2357
2358
2359 <dt><a href="reference.html#git.diff.DiffIndex.iter_change_type">iter_change_type() (git.diff.DiffIndex method)</a>
2360 </dt>
2361
2362
2363 <dt><a href="reference.html#git.repo.base.Repo.iter_commits">iter_commits() (git.repo.base.Repo method)</a>
2364 </dt>
2365
2366
2367 <dt><a href="reference.html#git.refs.log.RefLog.iter_entries">iter_entries() (git.refs.log.RefLog class method)</a>
2368 </dt>
2369
2370
2371 <dt><a href="reference.html#git.objects.commit.Commit.iter_items">iter_items() (git.objects.commit.Commit class method)</a>
2372 </dt>
2373
2374 <dd><dl>
2375
2376 <dt><a href="reference.html#git.objects.submodule.base.Submodule.iter_items">(git.objects.submodule.base.Submodule class method)</a>
2377 </dt>
2378
2379
2380 <dt><a href="reference.html#git.refs.reference.Reference.iter_items">(git.refs.reference.Reference class method)</a>
2381 </dt>
2382
2383
2384 <dt><a href="reference.html#git.refs.remote.RemoteReference.iter_items">(git.refs.remote.RemoteReference class method)</a>
2385 </dt>
2386
2387
2388 <dt><a href="reference.html#git.refs.symbolic.SymbolicReference.iter_items">(git.refs.symbolic.SymbolicReference class method)</a>
2389 </dt>
2390
2391
2392 <dt><a href="reference.html#git.remote.Remote.iter_items">(git.remote.Remote class method)</a>
2393 </dt>
2394
2395
2396 <dt><a href="reference.html#git.util.Iterable.iter_items">(git.util.Iterable class method)</a>
2397 </dt>
2398
2399 </dl></dd>
2400
2401 <dt><a href="reference.html#git.objects.commit.Commit.iter_parents">iter_parents() (git.objects.commit.Commit method)</a>
2402 </dt>
2403
2404
2405 <dt><a href="reference.html#git.repo.base.Repo.iter_submodules">iter_submodules() (git.repo.base.Repo method)</a>
2406 </dt>
2407
2408
2409 <dt><a href="reference.html#git.repo.base.Repo.iter_trees">iter_trees() (git.repo.base.Repo method)</a>
2410 </dt>
2411
2412
2413 <dt><a href="reference.html#git.util.Iterable">Iterable (class in git.util)</a>
2414 </dt>
2415
2416
2417 <dt><a href="reference.html#git.util.IterableList">IterableList (class in git.util)</a>
2418 </dt>
2419
2420 </dl></td>
2421 </tr></table>
2422
2423 <h2 id="J">J</h2>
2424 <table style="width: 100%" class="indextable genindextable"><tr>
2425 <td style="width: 33%" valign="top"><dl>
2426
2427 <dt><a href="reference.html#git.objects.tree.Tree.join">join() (git.objects.tree.Tree method)</a>
2428 </dt>
2429
2430
2431 <dt><a href="reference.html#git.util.join_path">join_path() (in module git.util)</a>
2432 </dt>
2433
2434 </dl></td>
2435 <td style="width: 33%" valign="top"><dl>
2436
2437 <dt><a href="reference.html#git.util.join_path_native">join_path_native() (in module git.util)</a>
2438 </dt>
2439
2440 </dl></td>
2441 </tr></table>
2442
2443 <h2 id="K">K</h2>
2444 <table style="width: 100%" class="indextable genindextable"><tr>
2445 <td style="width: 33%" valign="top"><dl>
2446
2447 <dt><a href="reference.html#git.refs.head.Head.k_config_remote">k_config_remote (git.refs.head.Head attribute)</a>
2448 </dt>
2449
2450
2451 <dt><a href="reference.html#git.refs.head.Head.k_config_remote_ref">k_config_remote_ref (git.refs.head.Head attribute)</a>
2452 </dt>
2453
2454
2455 <dt><a href="reference.html#git.objects.submodule.base.Submodule.k_default_mode">k_default_mode (git.objects.submodule.base.Submodule attribute)</a>
2456 </dt>
2457
2458
2459 <dt><a href="reference.html#git.objects.submodule.base.Submodule.k_head_default">k_head_default (git.objects.submodule.base.Submodule attribute)</a>
2460 </dt>
2461
2462 </dl></td>
2463 <td style="width: 33%" valign="top"><dl>
2464
2465 <dt><a href="reference.html#git.objects.submodule.base.Submodule.k_head_option">k_head_option (git.objects.submodule.base.Submodule attribute)</a>
2466 </dt>
2467
2468
2469 <dt><a href="reference.html#git.objects.submodule.base.Submodule.k_modules_file">k_modules_file (git.objects.submodule.base.Submodule attribute)</a>
2470 </dt>
2471
2472
2473 <dt><a href="reference.html#git.objects.submodule.root.RootModule.k_root_name">k_root_name (git.objects.submodule.root.RootModule attribute)</a>
2474 </dt>
2475
2476 </dl></td>
2477 </tr></table>
2478
2479 <h2 id="L">L</h2>
2480 <table style="width: 100%" class="indextable genindextable"><tr>
2481 <td style="width: 33%" valign="top"><dl>
2482
2483 <dt><a href="reference.html#git.remote.RemoteProgress.line_dropped">line_dropped() (git.remote.RemoteProgress method)</a>
2484 </dt>
2485
2486 <dd><dl>
2487
2488 <dt><a href="reference.html#git.util.RemoteProgress.line_dropped">(git.util.RemoteProgress method)</a>
2489 </dt>
2490
2491 </dl></dd>
2492
2493 <dt><a href="reference.html#git.objects.blob.Blob.link_mode">link_mode (git.objects.blob.Blob attribute)</a>
2494 </dt>
2495
2496
2497 <dt><a href="reference.html#git.util.Iterable.list_items">list_items() (git.util.Iterable class method)</a>
2498 </dt>
2499
2500
2501 <dt><a href="reference.html#git.objects.util.Traversable.list_traverse">list_traverse() (git.objects.util.Traversable method)</a>
2502 </dt>
2503
2504
2505 <dt><a href="reference.html#git.remote.PushInfo.local_ref">local_ref (git.remote.PushInfo attribute)</a>
2506 </dt>
2507
2508 </dl></td>
2509 <td style="width: 33%" valign="top"><dl>
2510
2511 <dt><a href="reference.html#git.util.LockFile">LockFile (class in git.util)</a>
2512 </dt>
2513
2514
2515 <dt><a href="reference.html#git.refs.symbolic.SymbolicReference.log">log() (git.refs.symbolic.SymbolicReference method)</a>
2516 </dt>
2517
2518
2519 <dt><a href="reference.html#git.refs.symbolic.SymbolicReference.log_append">log_append() (git.refs.symbolic.SymbolicReference method)</a>
2520 </dt>
2521
2522
2523 <dt><a href="reference.html#git.refs.symbolic.SymbolicReference.log_entry">log_entry() (git.refs.symbolic.SymbolicReference method)</a>
2524 </dt>
2525
2526 </dl></td>
2527 </tr></table>
2528
2529 <h2 id="M">M</h2>
2530 <table style="width: 100%" class="indextable genindextable"><tr>
2531 <td style="width: 33%" valign="top"><dl>
2532
2533 <dt><a href="reference.html#git.cmd.Git.max_chunk_size">max_chunk_size (git.cmd.Git attribute)</a>
2534 </dt>
2535
2536
2537 <dt><a href="reference.html#git.repo.base.Repo.merge_base">merge_base() (git.repo.base.Repo method)</a>
2538 </dt>
2539
2540
2541 <dt><a href="reference.html#git.index.base.IndexFile.merge_tree">merge_tree() (git.index.base.IndexFile method)</a>
2542 </dt>
2543
2544
2545 <dt><a href="reference.html#git.objects.commit.Commit.message">message (git.objects.commit.Commit attribute)</a>
2546 </dt>
2547
2548 <dd><dl>
2549
2550 <dt><a href="reference.html#git.objects.tag.TagObject.message">(git.objects.tag.TagObject attribute)</a>
2551 </dt>
2552
2553
2554 <dt><a href="reference.html#git.refs.log.RefLogEntry.message">(git.refs.log.RefLogEntry attribute)</a>
2555 </dt>
2556
2557 </dl></dd>
2558
2559 <dt><a href="reference.html#git.objects.blob.Blob.mime_type">mime_type (git.objects.blob.Blob attribute)</a>
2560 </dt>
2561
2562
2563 <dt><a href="reference.html#git.objects.submodule.util.mkhead">mkhead() (in module git.objects.submodule.util)</a>
2564 </dt>
2565
2566 </dl></td>
2567 <td style="width: 33%" valign="top"><dl>
2568
2569 <dt><a href="reference.html#git.index.typ.BaseIndexEntry.mode">mode (git.index.typ.BaseIndexEntry attribute)</a>
2570 </dt>
2571
2572 <dd><dl>
2573
2574 <dt><a href="reference.html#git.objects.base.IndexObject.mode">(git.objects.base.IndexObject attribute)</a>
2575 </dt>
2576
2577 </dl></dd>
2578
2579 <dt><a href="reference.html#git.objects.submodule.base.Submodule.module">module() (git.objects.submodule.base.Submodule method)</a>
2580 </dt>
2581
2582 <dd><dl>
2583
2584 <dt><a href="reference.html#git.objects.submodule.root.RootModule.module">(git.objects.submodule.root.RootModule method)</a>
2585 </dt>
2586
2587 </dl></dd>
2588
2589 <dt><a href="reference.html#git.objects.submodule.base.Submodule.module_exists">module_exists() (git.objects.submodule.base.Submodule method)</a>
2590 </dt>
2591
2592
2593 <dt><a href="reference.html#git.index.base.IndexFile.move">move() (git.index.base.IndexFile method)</a>
2594 </dt>
2595
2596 <dd><dl>
2597
2598 <dt><a href="reference.html#git.objects.submodule.base.Submodule.move">(git.objects.submodule.base.Submodule method)</a>
2599 </dt>
2600
2601 </dl></dd>
2602
2603 <dt><a href="reference.html#git.index.typ.IndexEntry.mtime">mtime (git.index.typ.IndexEntry attribute)</a>
2604 </dt>
2605
2606 </dl></td>
2607 </tr></table>
2608
2609 <h2 id="N">N</h2>
2610 <table style="width: 100%" class="indextable genindextable"><tr>
2611 <td style="width: 33%" valign="top"><dl>
2612
2613 <dt><a href="reference.html#git.objects.base.IndexObject.name">name (git.objects.base.IndexObject attribute)</a>
2614 </dt>
2615
2616 <dd><dl>
2617
2618 <dt><a href="reference.html#git.objects.submodule.base.Submodule.name">(git.objects.submodule.base.Submodule attribute)</a>
2619 </dt>
2620
2621
2622 <dt><a href="reference.html#git.objects.util.Actor.name">(git.objects.util.Actor attribute)</a>
2623 </dt>
2624
2625
2626 <dt><a href="reference.html#git.refs.reference.Reference.name">(git.refs.reference.Reference attribute)</a>
2627 </dt>
2628
2629
2630 <dt><a href="reference.html#git.refs.symbolic.SymbolicReference.name">(git.refs.symbolic.SymbolicReference attribute)</a>
2631 </dt>
2632
2633
2634 <dt><a href="reference.html#git.remote.FetchInfo.name">(git.remote.FetchInfo attribute)</a>
2635 </dt>
2636
2637
2638 <dt><a href="reference.html#git.remote.Remote.name">(git.remote.Remote attribute)</a>
2639 </dt>
2640
2641
2642 <dt><a href="reference.html#git.util.Actor.name">(git.util.Actor attribute)</a>
2643 </dt>
2644
2645 </dl></dd>
2646
2647 <dt><a href="reference.html#git.objects.util.Actor.name_email_regex">name_email_regex (git.objects.util.Actor attribute)</a>
2648 </dt>
2649
2650 <dd><dl>
2651
2652 <dt><a href="reference.html#git.util.Actor.name_email_regex">(git.util.Actor attribute)</a>
2653 </dt>
2654
2655 </dl></dd>
2656
2657 <dt><a href="reference.html#git.objects.util.Actor.name_only_regex">name_only_regex (git.objects.util.Actor attribute)</a>
2658 </dt>
2659
2660 <dd><dl>
2661
2662 <dt><a href="reference.html#git.util.Actor.name_only_regex">(git.util.Actor attribute)</a>
2663 </dt>
2664
2665 </dl></dd>
2666
2667 <dt><a href="reference.html#git.objects.commit.Commit.name_rev">name_rev (git.objects.commit.Commit attribute)</a>
2668 </dt>
2669
2670
2671 <dt><a href="reference.html#git.repo.fun.name_to_object">name_to_object() (in module git.repo.fun)</a>
2672 </dt>
2673
2674
2675 <dt><a href="reference.html#git.index.base.IndexFile.new">new() (git.index.base.IndexFile class method)</a>
2676 </dt>
2677
2678 <dd><dl>
2679
2680 <dt><a href="reference.html#git.objects.base.Object.new">(git.objects.base.Object class method)</a>
2681 </dt>
2682
2683
2684 <dt><a href="reference.html#git.refs.log.RefLogEntry.new">(git.refs.log.RefLogEntry class method)</a>
2685 </dt>
2686
2687 </dl></dd>
2688
2689 <dt><a href="reference.html#git.diff.Diff.new_file">new_file (git.diff.Diff attribute)</a>
2690 </dt>
2691
2692
2693 <dt><a href="reference.html#git.objects.base.Object.new_from_sha">new_from_sha() (git.objects.base.Object class method)</a>
2694 </dt>
2695
2696
2697 <dt><a href="reference.html#git.remote.FetchInfo.NEW_HEAD">NEW_HEAD (git.remote.FetchInfo attribute)</a>
2698 </dt>
2699
2700 <dd><dl>
2701
2702 <dt><a href="reference.html#git.remote.PushInfo.NEW_HEAD">(git.remote.PushInfo attribute)</a>
2703 </dt>
2704
2705 </dl></dd>
2706 </dl></td>
2707 <td style="width: 33%" valign="top"><dl>
2708
2709 <dt><a href="reference.html#git.remote.RemoteProgress.new_message_handler">new_message_handler() (git.remote.RemoteProgress method)</a>
2710 </dt>
2711
2712 <dd><dl>
2713
2714 <dt><a href="reference.html#git.util.RemoteProgress.new_message_handler">(git.util.RemoteProgress method)</a>
2715 </dt>
2716
2717 </dl></dd>
2718
2719 <dt><a href="reference.html#git.remote.FetchInfo.NEW_TAG">NEW_TAG (git.remote.FetchInfo attribute)</a>
2720 </dt>
2721
2722 <dd><dl>
2723
2724 <dt><a href="reference.html#git.remote.PushInfo.NEW_TAG">(git.remote.PushInfo attribute)</a>
2725 </dt>
2726
2727 </dl></dd>
2728
2729 <dt><a href="reference.html#git.refs.log.RefLogEntry.newhexsha">newhexsha (git.refs.log.RefLogEntry attribute)</a>
2730 </dt>
2731
2732
2733 <dt><a href="reference.html#git.cmd.Git.CatFileContentStream.next">next() (git.cmd.Git.CatFileContentStream method)</a>
2734 </dt>
2735
2736
2737 <dt><a href="reference.html#git.remote.PushInfo.NO_MATCH">NO_MATCH (git.remote.PushInfo attribute)</a>
2738 </dt>
2739
2740
2741 <dt><a href="reference.html#git.exc.NoSuchPathError">NoSuchPathError</a>
2742 </dt>
2743
2744
2745 <dt><a href="reference.html#git.remote.FetchInfo.note">note (git.remote.FetchInfo attribute)</a>
2746 </dt>
2747
2748
2749 <dt><a href="reference.html#git.diff.Diff.NULL_BIN_SHA">NULL_BIN_SHA (git.diff.Diff attribute)</a>
2750 </dt>
2751
2752 <dd><dl>
2753
2754 <dt><a href="reference.html#git.objects.base.Object.NULL_BIN_SHA">(git.objects.base.Object attribute)</a>
2755 </dt>
2756
2757 </dl></dd>
2758
2759 <dt><a href="reference.html#git.diff.Diff.NULL_HEX_SHA">NULL_HEX_SHA (git.diff.Diff attribute)</a>
2760 </dt>
2761
2762 <dd><dl>
2763
2764 <dt><a href="reference.html#git.objects.base.Object.NULL_HEX_SHA">(git.objects.base.Object attribute)</a>
2765 </dt>
2766
2767 </dl></dd>
2768 </dl></td>
2769 </tr></table>
2770
2771 <h2 id="O">O</h2>
2772 <table style="width: 100%" class="indextable genindextable"><tr>
2773 <td style="width: 33%" valign="top"><dl>
2774
2775 <dt><a href="reference.html#git.objects.base.Object">Object (class in git.objects.base)</a>
2776 </dt>
2777
2778
2779 <dt><a href="reference.html#git.objects.tag.TagObject.object">object (git.objects.tag.TagObject attribute)</a>
2780 </dt>
2781
2782 <dd><dl>
2783
2784 <dt><a href="reference.html#git.refs.symbolic.SymbolicReference.object">(git.refs.symbolic.SymbolicReference attribute)</a>
2785 </dt>
2786
2787
2788 <dt><a href="reference.html#git.refs.tag.TagReference.object">(git.refs.tag.TagReference attribute)</a>
2789 </dt>
2790
2791 </dl></dd>
2792
2793 <dt><a href="reference.html#git.remote.FetchInfo.old_commit">old_commit (git.remote.FetchInfo attribute)</a>
2794 </dt>
2795
2796 <dd><dl>
2797
2798 <dt><a href="reference.html#git.remote.PushInfo.old_commit">(git.remote.PushInfo attribute)</a>
2799 </dt>
2800
2801 </dl></dd>
2802 </dl></td>
2803 <td style="width: 33%" valign="top"><dl>
2804
2805 <dt><a href="reference.html#git.refs.log.RefLogEntry.oldhexsha">oldhexsha (git.refs.log.RefLogEntry attribute)</a>
2806 </dt>
2807
2808
2809 <dt><a href="reference.html#git.remote.RemoteProgress.OP_MASK">OP_MASK (git.remote.RemoteProgress attribute)</a>
2810 </dt>
2811
2812 <dd><dl>
2813
2814 <dt><a href="reference.html#git.util.RemoteProgress.OP_MASK">(git.util.RemoteProgress attribute)</a>
2815 </dt>
2816
2817 </dl></dd>
2818
2819 <dt><a href="reference.html#git.refs.head.HEAD.orig_head">orig_head() (git.refs.head.HEAD method)</a>
2820 </dt>
2821
2822 </dl></td>
2823 </tr></table>
2824
2825 <h2 id="P">P</h2>
2826 <table style="width: 100%" class="indextable genindextable"><tr>
2827 <td style="width: 33%" valign="top"><dl>
2828
2829 <dt><a href="reference.html#git.objects.submodule.base.Submodule.parent_commit">parent_commit (git.objects.submodule.base.Submodule attribute)</a>
2830 </dt>
2831
2832
2833 <dt><a href="reference.html#git.objects.commit.Commit.parents">parents (git.objects.commit.Commit attribute)</a>
2834 </dt>
2835
2836
2837 <dt><a href="reference.html#git.objects.util.parse_actor_and_date">parse_actor_and_date() (in module git.objects.util)</a>
2838 </dt>
2839
2840
2841 <dt><a href="reference.html#git.objects.util.parse_date">parse_date() (in module git.objects.util)</a>
2842 </dt>
2843
2844
2845 <dt><a href="reference.html#git.index.base.IndexFile.path">path (git.index.base.IndexFile attribute)</a>
2846 </dt>
2847
2848 <dd><dl>
2849
2850 <dt><a href="reference.html#git.index.typ.BaseIndexEntry.path">(git.index.typ.BaseIndexEntry attribute)</a>
2851 </dt>
2852
2853
2854 <dt><a href="reference.html#git.objects.base.IndexObject.path">(git.objects.base.IndexObject attribute)</a>
2855 </dt>
2856
2857
2858 <dt><a href="reference.html#git.refs.symbolic.SymbolicReference.path">(git.refs.symbolic.SymbolicReference attribute)</a>
2859 </dt>
2860
2861 </dl></dd>
2862
2863 <dt><a href="reference.html#git.refs.log.RefLog.path">path() (git.refs.log.RefLog class method)</a>
2864 </dt>
2865
2866
2867 <dt><a href="reference.html#git.objects.submodule.root.RootUpdateProgress.PATHCHANGE">PATHCHANGE (git.objects.submodule.root.RootUpdateProgress attribute)</a>
2868 </dt>
2869
2870 </dl></td>
2871 <td style="width: 33%" valign="top"><dl>
2872
2873 <dt><a href="reference.html#git.index.typ.BlobFilter.paths">paths (git.index.typ.BlobFilter attribute)</a>
2874 </dt>
2875
2876
2877 <dt><a href="reference.html#git.index.util.post_clear_cache">post_clear_cache() (in module git.index.util)</a>
2878 </dt>
2879
2880
2881 <dt><a href="reference.html#git.cmd.Git.AutoInterrupt.proc">proc (git.cmd.Git.AutoInterrupt attribute)</a>
2882 </dt>
2883
2884
2885 <dt><a href="reference.html#git.objects.util.ProcessStreamAdapter">ProcessStreamAdapter (class in git.objects.util)</a>
2886 </dt>
2887
2888
2889 <dt><a href="reference.html#git.remote.Remote.pull">pull() (git.remote.Remote method)</a>
2890 </dt>
2891
2892
2893 <dt><a href="reference.html#git.remote.Remote.push">push() (git.remote.Remote method)</a>
2894 </dt>
2895
2896
2897 <dt><a href="reference.html#git.remote.PushInfo">PushInfo (class in git.remote)</a>
2898 </dt>
2899
2900 </dl></td>
2901 </tr></table>
2902
2903 <h2 id="R">R</h2>
2904 <table style="width: 100%" class="indextable genindextable"><tr>
2905 <td style="width: 33%" valign="top"><dl>
2906
2907 <dt><a href="reference.html#git.diff.Diff.raw_rename_from">raw_rename_from (git.diff.Diff attribute)</a>
2908 </dt>
2909
2910
2911 <dt><a href="reference.html#git.diff.Diff.raw_rename_to">raw_rename_to (git.diff.Diff attribute)</a>
2912 </dt>
2913
2914
2915 <dt><a href="reference.html#git.repo.base.Repo.re_author_committer_start">re_author_committer_start (git.repo.base.Repo attribute)</a>
2916 </dt>
2917
2918
2919 <dt><a href="reference.html#git.remote.FetchInfo.re_fetch_result">re_fetch_result (git.remote.FetchInfo attribute)</a>
2920 </dt>
2921
2922
2923 <dt><a href="reference.html#git.diff.Diff.re_header">re_header (git.diff.Diff attribute)</a>
2924 </dt>
2925
2926
2927 <dt><a href="reference.html#git.repo.base.Repo.re_hexsha_only">re_hexsha_only (git.repo.base.Repo attribute)</a>
2928 </dt>
2929
2930
2931 <dt><a href="reference.html#git.repo.base.Repo.re_hexsha_shortened">re_hexsha_shortened (git.repo.base.Repo attribute)</a>
2932 </dt>
2933
2934
2935 <dt><a href="reference.html#git.remote.RemoteProgress.re_op_absolute">re_op_absolute (git.remote.RemoteProgress attribute)</a>
2936 </dt>
2937
2938 <dd><dl>
2939
2940 <dt><a href="reference.html#git.util.RemoteProgress.re_op_absolute">(git.util.RemoteProgress attribute)</a>
2941 </dt>
2942
2943 </dl></dd>
2944
2945 <dt><a href="reference.html#git.remote.RemoteProgress.re_op_relative">re_op_relative (git.remote.RemoteProgress attribute)</a>
2946 </dt>
2947
2948 <dd><dl>
2949
2950 <dt><a href="reference.html#git.util.RemoteProgress.re_op_relative">(git.util.RemoteProgress attribute)</a>
2951 </dt>
2952
2953 </dl></dd>
2954
2955 <dt><a href="reference.html#git.repo.base.Repo.re_tab_full_line">re_tab_full_line (git.repo.base.Repo attribute)</a>
2956 </dt>
2957
2958
2959 <dt><a href="reference.html#git.repo.base.Repo.re_whitespace">re_whitespace (git.repo.base.Repo attribute)</a>
2960 </dt>
2961
2962
2963 <dt><a href="reference.html#git.cmd.Git.CatFileContentStream.read">read() (git.cmd.Git.CatFileContentStream method)</a>
2964 </dt>
2965
2966
2967 <dt><a href="reference.html#git.index.fun.read_cache">read_cache() (in module git.index.fun)</a>
2968 </dt>
2969
2970
2971 <dt><a href="reference.html#git.cmd.Git.CatFileContentStream.readline">readline() (git.cmd.Git.CatFileContentStream method)</a>
2972 </dt>
2973
2974
2975 <dt><a href="reference.html#git.cmd.Git.CatFileContentStream.readlines">readlines() (git.cmd.Git.CatFileContentStream method)</a>
2976 </dt>
2977
2978
2979 <dt><a href="reference.html#git.remote.RemoteProgress.RECEIVING">RECEIVING (git.remote.RemoteProgress attribute)</a>
2980 </dt>
2981
2982 <dd><dl>
2983
2984 <dt><a href="reference.html#git.util.RemoteProgress.RECEIVING">(git.util.RemoteProgress attribute)</a>
2985 </dt>
2986
2987 </dl></dd>
2988
2989 <dt><a href="reference.html#git.refs.symbolic.SymbolicReference.ref">ref (git.refs.symbolic.SymbolicReference attribute)</a>
2990 </dt>
2991
2992 <dd><dl>
2993
2994 <dt><a href="reference.html#git.remote.FetchInfo.ref">(git.remote.FetchInfo attribute)</a>
2995 </dt>
2996
2997 </dl></dd>
2998
2999 <dt><a href="reference.html#git.refs.reference.Reference">Reference (class in git.refs.reference)</a>
3000 </dt>
3001
3002
3003 <dt><a href="reference.html#git.refs.symbolic.SymbolicReference.reference">reference (git.refs.symbolic.SymbolicReference attribute)</a>
3004 </dt>
3005
3006
3007 <dt><a href="reference.html#git.repo.base.Repo.references">references (git.repo.base.Repo attribute)</a>
3008 </dt>
3009
3010
3011 <dt><a href="reference.html#git.refs.log.RefLog">RefLog (class in git.refs.log)</a>
3012 </dt>
3013
3014
3015 <dt><a href="reference.html#git.refs.log.RefLogEntry">RefLogEntry (class in git.refs.log)</a>
3016 </dt>
3017
3018
3019 <dt><a href="reference.html#git.remote.Remote.refs">refs (git.remote.Remote attribute)</a>
3020 </dt>
3021
3022 <dd><dl>
3023
3024 <dt><a href="reference.html#git.repo.base.Repo.refs">(git.repo.base.Repo attribute)</a>
3025 </dt>
3026
3027 </dl></dd>
3028
3029 <dt><a href="reference.html#git.remote.FetchInfo.REJECTED">REJECTED (git.remote.FetchInfo attribute)</a>
3030 </dt>
3031
3032 <dd><dl>
3033
3034 <dt><a href="reference.html#git.remote.PushInfo.REJECTED">(git.remote.PushInfo attribute)</a>
3035 </dt>
3036
3037 </dl></dd>
3038
3039 <dt><a href="reference.html#git.config.SectionConstraint.release">release() (git.config.SectionConstraint method)</a>
3040 </dt>
3041
3042
3043 <dt><a href="reference.html#git.remote.Remote">Remote (class in git.remote)</a>
3044 </dt>
3045
3046
3047 <dt><a href="reference.html#git.repo.base.Repo.remote">remote() (git.repo.base.Repo method)</a>
3048 </dt>
3049
3050
3051 <dt><a href="reference.html#git.remote.PushInfo.REMOTE_FAILURE">REMOTE_FAILURE (git.remote.PushInfo attribute)</a>
3052 </dt>
3053
3054 </dl></td>
3055 <td style="width: 33%" valign="top"><dl>
3056
3057 <dt><a href="reference.html#git.refs.reference.Reference.remote_head">remote_head (git.refs.reference.Reference attribute)</a>
3058 </dt>
3059
3060
3061 <dt><a href="reference.html#git.refs.reference.Reference.remote_name">remote_name (git.refs.reference.Reference attribute)</a>
3062 </dt>
3063
3064
3065 <dt><a href="reference.html#git.remote.PushInfo.remote_ref">remote_ref (git.remote.PushInfo attribute)</a>
3066 </dt>
3067
3068
3069 <dt><a href="reference.html#git.remote.FetchInfo.remote_ref_path">remote_ref_path (git.remote.FetchInfo attribute)</a>
3070 </dt>
3071
3072
3073 <dt><a href="reference.html#git.remote.PushInfo.remote_ref_string">remote_ref_string (git.remote.PushInfo attribute)</a>
3074 </dt>
3075
3076
3077 <dt><a href="reference.html#git.remote.PushInfo.REMOTE_REJECTED">REMOTE_REJECTED (git.remote.PushInfo attribute)</a>
3078 </dt>
3079
3080
3081 <dt><a href="reference.html#git.remote.RemoteProgress">RemoteProgress (class in git.remote)</a>
3082 </dt>
3083
3084 <dd><dl>
3085
3086 <dt><a href="reference.html#git.util.RemoteProgress">(class in git.util)</a>
3087 </dt>
3088
3089 </dl></dd>
3090
3091 <dt><a href="reference.html#git.refs.remote.RemoteReference">RemoteReference (class in git.refs.remote)</a>
3092 </dt>
3093
3094
3095 <dt><a href="reference.html#git.repo.base.Repo.remotes">remotes (git.repo.base.Repo attribute)</a>
3096 </dt>
3097
3098
3099 <dt><a href="reference.html#git.objects.submodule.root.RootUpdateProgress.REMOVE">REMOVE (git.objects.submodule.root.RootUpdateProgress attribute)</a>
3100 </dt>
3101
3102
3103 <dt><a href="reference.html#git.index.base.IndexFile.remove">remove() (git.index.base.IndexFile method)</a>
3104 </dt>
3105
3106 <dd><dl>
3107
3108 <dt><a href="reference.html#git.objects.submodule.base.Submodule.remove">(git.objects.submodule.base.Submodule method)</a>
3109 </dt>
3110
3111
3112 <dt><a href="reference.html#git.remote.Remote.remove">(git.remote.Remote class method)</a>
3113 </dt>
3114
3115 </dl></dd>
3116
3117 <dt><a href="reference.html#git.objects.submodule.base.Submodule.rename">rename() (git.objects.submodule.base.Submodule method)</a>
3118 </dt>
3119
3120 <dd><dl>
3121
3122 <dt><a href="reference.html#git.refs.head.Head.rename">(git.refs.head.Head method)</a>
3123 </dt>
3124
3125
3126 <dt><a href="reference.html#git.refs.symbolic.SymbolicReference.rename">(git.refs.symbolic.SymbolicReference method)</a>
3127 </dt>
3128
3129
3130 <dt><a href="reference.html#git.remote.Remote.rename">(git.remote.Remote method)</a>
3131 </dt>
3132
3133 </dl></dd>
3134
3135 <dt><a href="reference.html#git.diff.Diff.rename_from">rename_from (git.diff.Diff attribute)</a>
3136 </dt>
3137
3138
3139 <dt><a href="reference.html#git.diff.Diff.rename_to">rename_to (git.diff.Diff attribute)</a>
3140 </dt>
3141
3142
3143 <dt><a href="reference.html#git.diff.Diff.renamed">renamed (git.diff.Diff attribute)</a>
3144 </dt>
3145
3146
3147 <dt><a href="reference.html#git.diff.Diff.renamed_file">renamed_file (git.diff.Diff attribute)</a>
3148 </dt>
3149
3150
3151 <dt><a href="reference.html#git.repo.base.Repo">Repo (class in git.repo.base)</a>
3152 </dt>
3153
3154
3155 <dt><a href="reference.html#git.index.base.IndexFile.repo">repo (git.index.base.IndexFile attribute)</a>
3156 </dt>
3157
3158 <dd><dl>
3159
3160 <dt><a href="reference.html#git.objects.base.Object.repo">(git.objects.base.Object attribute)</a>
3161 </dt>
3162
3163
3164 <dt><a href="reference.html#git.refs.symbolic.SymbolicReference.repo">(git.refs.symbolic.SymbolicReference attribute)</a>
3165 </dt>
3166
3167
3168 <dt><a href="reference.html#git.remote.Remote.repo">(git.remote.Remote attribute)</a>
3169 </dt>
3170
3171 </dl></dd>
3172
3173 <dt><a href="reference.html#git.exc.RepositoryDirtyError">RepositoryDirtyError</a>
3174 </dt>
3175
3176
3177 <dt><a href="reference.html#git.index.base.IndexFile.reset">reset() (git.index.base.IndexFile method)</a>
3178 </dt>
3179
3180 <dd><dl>
3181
3182 <dt><a href="reference.html#git.refs.head.HEAD.reset">(git.refs.head.HEAD method)</a>
3183 </dt>
3184
3185 </dl></dd>
3186
3187 <dt><a href="reference.html#git.index.base.IndexFile.resolve_blobs">resolve_blobs() (git.index.base.IndexFile method)</a>
3188 </dt>
3189
3190
3191 <dt><a href="reference.html#git.remote.RemoteProgress.RESOLVING">RESOLVING (git.remote.RemoteProgress attribute)</a>
3192 </dt>
3193
3194 <dd><dl>
3195
3196 <dt><a href="reference.html#git.util.RemoteProgress.RESOLVING">(git.util.RemoteProgress attribute)</a>
3197 </dt>
3198
3199 </dl></dd>
3200
3201 <dt><a href="reference.html#git.repo.base.Repo.rev_parse">rev_parse() (git.repo.base.Repo method)</a>
3202 </dt>
3203
3204 <dd><dl>
3205
3206 <dt><a href="reference.html#git.repo.fun.rev_parse">(in module git.repo.fun)</a>
3207 </dt>
3208
3209 </dl></dd>
3210
3211 <dt><a href="reference.html#git.remote.Remote.rm">rm() (git.remote.Remote class method)</a>
3212 </dt>
3213
3214
3215 <dt><a href="reference.html#git.util.rmtree">rmtree() (in module git.util)</a>
3216 </dt>
3217
3218
3219 <dt><a href="reference.html#git.objects.submodule.root.RootModule">RootModule (class in git.objects.submodule.root)</a>
3220 </dt>
3221
3222
3223 <dt><a href="reference.html#git.objects.submodule.root.RootUpdateProgress">RootUpdateProgress (class in git.objects.submodule.root)</a>
3224 </dt>
3225
3226
3227 <dt><a href="reference.html#git.index.fun.run_commit_hook">run_commit_hook() (in module git.index.fun)</a>
3228 </dt>
3229
3230 </dl></td>
3231 </tr></table>
3232
3233 <h2 id="S">S</h2>
3234 <table style="width: 100%" class="indextable genindextable"><tr>
3235 <td style="width: 33%" valign="top"><dl>
3236
3237 <dt><a href="reference.html#git.index.base.IndexFile.S_IFGITLINK">S_IFGITLINK (git.index.base.IndexFile attribute)</a>
3238 </dt>
3239
3240
3241 <dt><a href="reference.html#git.config.SectionConstraint">SectionConstraint (class in git.config)</a>
3242 </dt>
3243
3244
3245 <dt><a href="reference.html#git.refs.symbolic.SymbolicReference.set_commit">set_commit() (git.refs.symbolic.SymbolicReference method)</a>
3246 </dt>
3247
3248
3249 <dt><a href="reference.html#git.objects.tree.TreeModifier.set_done">set_done() (git.objects.tree.TreeModifier method)</a>
3250 </dt>
3251
3252
3253 <dt><a href="reference.html#git.refs.reference.Reference.set_object">set_object() (git.refs.reference.Reference method)</a>
3254 </dt>
3255
3256 <dd><dl>
3257
3258 <dt><a href="reference.html#git.refs.symbolic.SymbolicReference.set_object">(git.refs.symbolic.SymbolicReference method)</a>
3259 </dt>
3260
3261 </dl></dd>
3262
3263 <dt><a href="reference.html#git.objects.submodule.base.Submodule.set_parent_commit">set_parent_commit() (git.objects.submodule.base.Submodule method)</a>
3264 </dt>
3265
3266
3267 <dt><a href="reference.html#git.refs.symbolic.SymbolicReference.set_reference">set_reference() (git.refs.symbolic.SymbolicReference method)</a>
3268 </dt>
3269
3270
3271 <dt><a href="reference.html#git.objects.submodule.util.SubmoduleConfigParser.set_submodule">set_submodule() (git.objects.submodule.util.SubmoduleConfigParser method)</a>
3272 </dt>
3273
3274
3275 <dt><a href="reference.html#git.refs.head.Head.set_tracking_branch">set_tracking_branch() (git.refs.head.Head method)</a>
3276 </dt>
3277
3278
3279 <dt><a href="reference.html#git.remote.Remote.set_url">set_url() (git.remote.Remote method)</a>
3280 </dt>
3281
3282
3283 <dt><a href="reference.html#git.util.IndexFileSHA1Writer.sha1">sha1 (git.util.IndexFileSHA1Writer attribute)</a>
3284 </dt>
3285
3286
3287 <dt><a href="reference.html#git.repo.fun.short_to_long">short_to_long() (in module git.repo.fun)</a>
3288 </dt>
3289
3290
3291 <dt><a href="reference.html#git.index.typ.IndexEntry.size">size (git.index.typ.IndexEntry attribute)</a>
3292 </dt>
3293
3294 <dd><dl>
3295
3296 <dt><a href="reference.html#git.objects.base.Object.size">(git.objects.base.Object attribute)</a>
3297 </dt>
3298
3299 </dl></dd>
3300
3301 <dt><a href="reference.html#git.objects.submodule.util.sm_name">sm_name() (in module git.objects.submodule.util)</a>
3302 </dt>
3303
3304
3305 <dt><a href="reference.html#git.objects.submodule.util.sm_section">sm_section() (in module git.objects.submodule.util)</a>
3306 </dt>
3307
3308
3309 <dt><a href="reference.html#git.index.typ.BaseIndexEntry.stage">stage (git.index.typ.BaseIndexEntry attribute)</a>
3310 </dt>
3311
3312 </dl></td>
3313 <td style="width: 33%" valign="top"><dl>
3314
3315 <dt><a href="reference.html#git.remote.RemoteProgress.STAGE_MASK">STAGE_MASK (git.remote.RemoteProgress attribute)</a>
3316 </dt>
3317
3318 <dd><dl>
3319
3320 <dt><a href="reference.html#git.util.RemoteProgress.STAGE_MASK">(git.util.RemoteProgress attribute)</a>
3321 </dt>
3322
3323 </dl></dd>
3324
3325 <dt><a href="reference.html#git.remote.Remote.stale_refs">stale_refs (git.remote.Remote attribute)</a>
3326 </dt>
3327
3328
3329 <dt><a href="reference.html#git.index.fun.stat_mode_to_index_mode">stat_mode_to_index_mode() (in module git.index.fun)</a>
3330 </dt>
3331
3332
3333 <dt><a href="reference.html#git.util.Stats">Stats (class in git.util)</a>
3334 </dt>
3335
3336
3337 <dt><a href="reference.html#git.objects.commit.Commit.stats">stats (git.objects.commit.Commit attribute)</a>
3338 </dt>
3339
3340
3341 <dt><a href="reference.html#git.util.stream_copy">stream_copy() (in module git.util)</a>
3342 </dt>
3343
3344
3345 <dt><a href="reference.html#git.objects.base.Object.stream_data">stream_data() (git.objects.base.Object method)</a>
3346 </dt>
3347
3348
3349 <dt><a href="reference.html#git.cmd.Git.stream_object_data">stream_object_data() (git.cmd.Git method)</a>
3350 </dt>
3351
3352
3353 <dt><a href="reference.html#git.objects.submodule.base.Submodule">Submodule (class in git.objects.submodule.base)</a>
3354 </dt>
3355
3356
3357 <dt><a href="reference.html#git.repo.base.Repo.submodule">submodule() (git.repo.base.Repo method)</a>
3358 </dt>
3359
3360
3361 <dt><a href="reference.html#git.repo.base.Repo.submodule_update">submodule_update() (git.repo.base.Repo method)</a>
3362 </dt>
3363
3364
3365 <dt><a href="reference.html#git.objects.submodule.util.SubmoduleConfigParser">SubmoduleConfigParser (class in git.objects.submodule.util)</a>
3366 </dt>
3367
3368
3369 <dt><a href="reference.html#git.repo.base.Repo.submodules">submodules (git.repo.base.Repo attribute)</a>
3370 </dt>
3371
3372
3373 <dt><a href="reference.html#git.objects.commit.Commit.summary">summary (git.objects.commit.Commit attribute)</a>
3374 </dt>
3375
3376 <dd><dl>
3377
3378 <dt><a href="reference.html#git.remote.PushInfo.summary">(git.remote.PushInfo attribute)</a>
3379 </dt>
3380
3381 </dl></dd>
3382
3383 <dt><a href="reference.html#git.refs.symbolic.SymbolicReference">SymbolicReference (class in git.refs.symbolic)</a>
3384 </dt>
3385
3386
3387 <dt><a href="reference.html#git.objects.tree.Tree.symlink_id">symlink_id (git.objects.tree.Tree attribute)</a>
3388 </dt>
3389
3390 </dl></td>
3391 </tr></table>
3392
3393 <h2 id="T">T</h2>
3394 <table style="width: 100%" class="indextable genindextable"><tr>
3395 <td style="width: 33%" valign="top"><dl>
3396
3397 <dt><a href="reference.html#git.objects.tag.TagObject.tag">tag (git.objects.tag.TagObject attribute)</a>
3398 </dt>
3399
3400 <dd><dl>
3401
3402 <dt><a href="reference.html#git.refs.tag.TagReference.tag">(git.refs.tag.TagReference attribute)</a>
3403 </dt>
3404
3405 </dl></dd>
3406
3407 <dt><a href="reference.html#git.refs.tag.Tag">Tag (in module git.refs.tag)</a>
3408 </dt>
3409
3410
3411 <dt><a href="reference.html#git.repo.base.Repo.tag">tag() (git.repo.base.Repo method)</a>
3412 </dt>
3413
3414
3415 <dt><a href="reference.html#git.remote.FetchInfo.TAG_UPDATE">TAG_UPDATE (git.remote.FetchInfo attribute)</a>
3416 </dt>
3417
3418
3419 <dt><a href="reference.html#git.objects.tag.TagObject.tagged_date">tagged_date (git.objects.tag.TagObject attribute)</a>
3420 </dt>
3421
3422
3423 <dt><a href="reference.html#git.objects.tag.TagObject.tagger">tagger (git.objects.tag.TagObject attribute)</a>
3424 </dt>
3425
3426
3427 <dt><a href="reference.html#git.objects.tag.TagObject.tagger_tz_offset">tagger_tz_offset (git.objects.tag.TagObject attribute)</a>
3428 </dt>
3429
3430
3431 <dt><a href="reference.html#git.objects.tag.TagObject">TagObject (class in git.objects.tag)</a>
3432 </dt>
3433
3434
3435 <dt><a href="reference.html#git.refs.tag.TagReference">TagReference (class in git.refs.tag)</a>
3436 </dt>
3437
3438
3439 <dt><a href="reference.html#git.repo.base.Repo.tags">tags (git.repo.base.Repo attribute)</a>
3440 </dt>
3441
3442
3443 <dt><a href="reference.html#git.util.IndexFileSHA1Writer.tell">tell() (git.util.IndexFileSHA1Writer method)</a>
3444 </dt>
3445
3446
3447 <dt><a href="reference.html#git.index.util.TemporaryFileSwap">TemporaryFileSwap (class in git.index.util)</a>
3448 </dt>
3449
3450
3451 <dt><a href="reference.html#git.refs.log.RefLogEntry.time">time (git.refs.log.RefLogEntry attribute)</a>
3452 </dt>
3453
3454
3455 <dt><a href="reference.html#git.index.util.TemporaryFileSwap.tmp_file_path">tmp_file_path (git.index.util.TemporaryFileSwap attribute)</a>
3456 </dt>
3457
3458
3459 <dt><a href="reference.html#git.index.typ.BaseIndexEntry.to_blob">to_blob() (git.index.typ.BaseIndexEntry method)</a>
3460 </dt>
3461
3462
3463 <dt><a href="reference.html#git.repo.fun.to_commit">to_commit() (in module git.repo.fun)</a>
3464 </dt>
3465
3466
3467 <dt><a href="reference.html#git.refs.log.RefLog.to_file">to_file() (git.refs.log.RefLog method)</a>
3468 </dt>
3469
3470
3471 <dt><a href="reference.html#git.refs.symbolic.SymbolicReference.to_full_path">to_full_path() (git.refs.symbolic.SymbolicReference class method)</a>
3472 </dt>
3473
3474
3475 <dt><a href="reference.html#git.util.to_native_path_linux">to_native_path_linux() (in module git.util)</a>
3476 </dt>
3477
3478
3479 <dt><a href="reference.html#git.remote.RemoteProgress.TOKEN_SEPARATOR">TOKEN_SEPARATOR (git.remote.RemoteProgress attribute)</a>
3480 </dt>
3481
3482 <dd><dl>
3483
3484 <dt><a href="reference.html#git.util.RemoteProgress.TOKEN_SEPARATOR">(git.util.RemoteProgress attribute)</a>
3485 </dt>
3486
3487 </dl></dd>
3488
3489 <dt><a href="reference.html#git.util.Stats.total">total (git.util.Stats attribute)</a>
3490 </dt>
3491
3492 </dl></td>
3493 <td style="width: 33%" valign="top"><dl>
3494
3495 <dt><a href="reference.html#git.repo.fun.touch">touch() (in module git.repo.fun)</a>
3496 </dt>
3497
3498
3499 <dt><a href="reference.html#git.refs.head.Head.tracking_branch">tracking_branch() (git.refs.head.Head method)</a>
3500 </dt>
3501
3502
3503 <dt><a href="reference.html#git.cmd.Git.transform_kwarg">transform_kwarg() (git.cmd.Git method)</a>
3504 </dt>
3505
3506
3507 <dt><a href="reference.html#git.cmd.Git.transform_kwargs">transform_kwargs() (git.cmd.Git method)</a>
3508 </dt>
3509
3510
3511 <dt><a href="reference.html#git.objects.util.Traversable">Traversable (class in git.objects.util)</a>
3512 </dt>
3513
3514
3515 <dt><a href="reference.html#git.objects.tree.Tree.traverse">traverse() (git.objects.tree.Tree method)</a>
3516 </dt>
3517
3518 <dd><dl>
3519
3520 <dt><a href="reference.html#git.objects.util.Traversable.traverse">(git.objects.util.Traversable method)</a>
3521 </dt>
3522
3523 </dl></dd>
3524
3525 <dt><a href="reference.html#git.objects.fun.traverse_tree_recursive">traverse_tree_recursive() (in module git.objects.fun)</a>
3526 </dt>
3527
3528
3529 <dt><a href="reference.html#git.objects.fun.traverse_trees_recursive">traverse_trees_recursive() (in module git.objects.fun)</a>
3530 </dt>
3531
3532
3533 <dt><a href="reference.html#git.objects.tree.Tree">Tree (class in git.objects.tree)</a>
3534 </dt>
3535
3536
3537 <dt><a href="reference.html#git.objects.commit.Commit.tree">tree (git.objects.commit.Commit attribute)</a>
3538 </dt>
3539
3540
3541 <dt><a href="reference.html#git.repo.base.Repo.tree">tree() (git.repo.base.Repo method)</a>
3542 </dt>
3543
3544
3545 <dt><a href="reference.html#git.objects.fun.tree_entries_from_data">tree_entries_from_data() (in module git.objects.fun)</a>
3546 </dt>
3547
3548
3549 <dt><a href="reference.html#git.objects.tree.Tree.tree_id">tree_id (git.objects.tree.Tree attribute)</a>
3550 </dt>
3551
3552
3553 <dt><a href="reference.html#git.objects.fun.tree_to_stream">tree_to_stream() (in module git.objects.fun)</a>
3554 </dt>
3555
3556
3557 <dt><a href="reference.html#git.objects.tree.TreeModifier">TreeModifier (class in git.objects.tree)</a>
3558 </dt>
3559
3560
3561 <dt><a href="reference.html#git.objects.tree.Tree.trees">trees (git.objects.tree.Tree attribute)</a>
3562 </dt>
3563
3564
3565 <dt><a href="reference.html#git.objects.base.Object.type">type (git.objects.base.Object attribute)</a>
3566 </dt>
3567
3568 <dd><dl>
3569
3570 <dt><a href="reference.html#git.objects.blob.Blob.type">(git.objects.blob.Blob attribute)</a>
3571 </dt>
3572
3573
3574 <dt><a href="reference.html#git.objects.commit.Commit.type">(git.objects.commit.Commit attribute)</a>
3575 </dt>
3576
3577
3578 <dt><a href="reference.html#git.objects.submodule.base.Submodule.type">(git.objects.submodule.base.Submodule attribute)</a>
3579 </dt>
3580
3581
3582 <dt><a href="reference.html#git.objects.tag.TagObject.type">(git.objects.tag.TagObject attribute)</a>
3583 </dt>
3584
3585
3586 <dt><a href="reference.html#git.objects.tree.Tree.type">(git.objects.tree.Tree attribute)</a>
3587 </dt>
3588
3589 </dl></dd>
3590
3591 <dt><a href="reference.html#git.objects.base.Object.TYPES">TYPES (git.objects.base.Object attribute)</a>
3592 </dt>
3593
3594
3595 <dt><a href="reference.html#git.objects.util.tzoffset.tzname">tzname() (git.objects.util.tzoffset method)</a>
3596 </dt>
3597
3598
3599 <dt><a href="reference.html#git.objects.util.tzoffset">tzoffset (class in git.objects.util)</a>
3600 </dt>
3601
3602 </dl></td>
3603 </tr></table>
3604
3605 <h2 id="U">U</h2>
3606 <table style="width: 100%" class="indextable genindextable"><tr>
3607 <td style="width: 33%" valign="top"><dl>
3608
3609 <dt><a href="reference.html#git.index.typ.IndexEntry.uid">uid (git.index.typ.IndexEntry attribute)</a>
3610 </dt>
3611
3612
3613 <dt><a href="reference.html#git.util.unbare_repo">unbare_repo() (in module git.util)</a>
3614 </dt>
3615
3616
3617 <dt><a href="reference.html#git.index.base.IndexFile.unmerged_blobs">unmerged_blobs() (git.index.base.IndexFile method)</a>
3618 </dt>
3619
3620
3621 <dt><a href="reference.html#git.exc.UnmergedEntriesError">UnmergedEntriesError</a>
3622 </dt>
3623
3624
3625 <dt><a href="reference.html#git.repo.base.Repo.untracked_files">untracked_files (git.repo.base.Repo attribute)</a>
3626 </dt>
3627
3628
3629 <dt><a href="reference.html#git.remote.PushInfo.UP_TO_DATE">UP_TO_DATE (git.remote.PushInfo attribute)</a>
3630 </dt>
3631
3632
3633 <dt><a href="reference.html#git.index.base.IndexFile.update">update() (git.index.base.IndexFile method)</a>
3634 </dt>
3635
3636 <dd><dl>
3637
3638 <dt><a href="reference.html#git.objects.submodule.base.Submodule.update">(git.objects.submodule.base.Submodule method)</a>
3639 </dt>
3640
3641
3642 <dt><a href="reference.html#git.objects.submodule.root.RootModule.update">(git.objects.submodule.root.RootModule method)</a>
3643 </dt>
3644
3645
3646 <dt><a href="reference.html#git.remote.Remote.update">(git.remote.Remote method)</a>
3647 </dt>
3648
3649
3650 <dt><a href="reference.html#git.remote.RemoteProgress.update">(git.remote.RemoteProgress method)</a>
3651 </dt>
3652
3653
3654 <dt><a href="reference.html#git.util.CallableRemoteProgress.update">(git.util.CallableRemoteProgress method)</a>
3655 </dt>
3656
3657
3658 <dt><a href="reference.html#git.util.RemoteProgress.update">(git.util.RemoteProgress method)</a>
3659 </dt>
3660
3661 </dl></dd>
3662
3663 <dt><a href="reference.html#git.cmd.Git.update_environment">update_environment() (git.cmd.Git method)</a>
3664 </dt>
3665
3666 </dl></td>
3667 <td style="width: 33%" valign="top"><dl>
3668
3669 <dt><a href="reference.html#git.objects.submodule.base.UpdateProgress">UpdateProgress (class in git.objects.submodule.base)</a>
3670 </dt>
3671
3672
3673 <dt><a href="reference.html#git.objects.submodule.base.UpdateProgress.UPDWKTREE">UPDWKTREE (git.objects.submodule.base.UpdateProgress attribute)</a>
3674 </dt>
3675
3676
3677 <dt><a href="reference.html#git.objects.submodule.base.Submodule.url">url (git.objects.submodule.base.Submodule attribute)</a>
3678 </dt>
3679
3680
3681 <dt><a href="reference.html#git.objects.submodule.root.RootUpdateProgress.URLCHANGE">URLCHANGE (git.objects.submodule.root.RootUpdateProgress attribute)</a>
3682 </dt>
3683
3684
3685 <dt><a href="reference.html#git.remote.Remote.urls">urls (git.remote.Remote attribute)</a>
3686 </dt>
3687
3688
3689 <dt><a href="reference.html#git.cmd.Git.USE_SHELL">USE_SHELL (git.cmd.Git attribute)</a>
3690 </dt>
3691
3692
3693 <dt><a href="reference.html#git.objects.util.tzoffset.utcoffset">utcoffset() (git.objects.util.tzoffset method)</a>
3694 </dt>
3695
3696
3697 <dt><a href="reference.html#git.objects.util.utctz_to_altz">utctz_to_altz() (in module git.objects.util)</a>
3698 </dt>
3699
3700 </dl></td>
3701 </tr></table>
3702
3703 <h2 id="V">V</h2>
3704 <table style="width: 100%" class="indextable genindextable"><tr>
3705 <td style="width: 33%" valign="top"><dl>
3706
3707 <dt><a href="reference.html#git.objects.util.verify_utctz">verify_utctz() (in module git.objects.util)</a>
3708 </dt>
3709
3710
3711 <dt><a href="reference.html#git.index.base.IndexFile.version">version (git.index.base.IndexFile attribute)</a>
3712 </dt>
3713
3714 </dl></td>
3715 <td style="width: 33%" valign="top"><dl>
3716
3717 <dt><a href="reference.html#git.cmd.Git.version_info">version_info (git.cmd.Git attribute)</a>
3718 </dt>
3719
3720 </dl></td>
3721 </tr></table>
3722
3723 <h2 id="W">W</h2>
3724 <table style="width: 100%" class="indextable genindextable"><tr>
3725 <td style="width: 33%" valign="top"><dl>
3726
3727 <dt><a href="reference.html#git.cmd.Git.AutoInterrupt.wait">wait() (git.cmd.Git.AutoInterrupt method)</a>
3728 </dt>
3729
3730 <dd><dl>
3731
3732 <dt><a href="reference.html#git.util.WaitGroup.wait">(git.util.WaitGroup method)</a>
3733 </dt>
3734
3735 </dl></dd>
3736
3737 <dt><a href="reference.html#git.util.WaitGroup">WaitGroup (class in git.util)</a>
3738 </dt>
3739
3740
3741 <dt><a href="reference.html#git.cmd.Git.working_dir">working_dir (git.cmd.Git attribute)</a>
3742 </dt>
3743
3744
3745 <dt><a href="reference.html#git.repo.base.Repo.working_tree_dir">working_tree_dir (git.repo.base.Repo attribute)</a>
3746 </dt>
3747
3748
3749 <dt><a href="reference.html#git.exc.WorkTreeRepositoryUnsupported">WorkTreeRepositoryUnsupported</a>
3750 </dt>
3751
3752
3753 <dt><a href="reference.html#git.index.base.IndexFile.write">write() (git.index.base.IndexFile method)</a>
3754 </dt>
3755
3756 <dd><dl>
3757
3758 <dt><a href="reference.html#git.objects.submodule.util.SubmoduleConfigParser.write">(git.objects.submodule.util.SubmoduleConfigParser method)</a>
3759 </dt>
3760
3761
3762 <dt><a href="reference.html#git.refs.log.RefLog.write">(git.refs.log.RefLog method)</a>
3763 </dt>
3764
3765
3766 <dt><a href="reference.html#git.util.IndexFileSHA1Writer.write">(git.util.IndexFileSHA1Writer method)</a>
3767 </dt>
3768
3769 </dl></dd>
3770 </dl></td>
3771 <td style="width: 33%" valign="top"><dl>
3772
3773 <dt><a href="reference.html#git.index.fun.write_cache">write_cache() (in module git.index.fun)</a>
3774 </dt>
3775
3776
3777 <dt><a href="reference.html#git.util.IndexFileSHA1Writer.write_sha">write_sha() (git.util.IndexFileSHA1Writer method)</a>
3778 </dt>
3779
3780
3781 <dt><a href="reference.html#git.index.base.IndexFile.write_tree">write_tree() (git.index.base.IndexFile method)</a>
3782 </dt>
3783
3784
3785 <dt><a href="reference.html#git.index.fun.write_tree_from_cache">write_tree_from_cache() (in module git.index.fun)</a>
3786 </dt>
3787
3788
3789 <dt><a href="reference.html#git.remote.RemoteProgress.WRITING">WRITING (git.remote.RemoteProgress attribute)</a>
3790 </dt>
3791
3792 <dd><dl>
3793
3794 <dt><a href="reference.html#git.util.RemoteProgress.WRITING">(git.util.RemoteProgress attribute)</a>
3795 </dt>
3796
3797 </dl></dd>
3798 </dl></td>
3799 </tr></table>
3800
3801 <h2 id="X">X</h2>
3802 <table style="width: 100%" class="indextable genindextable"><tr>
3803 <td style="width: 33%" valign="top"><dl>
3804
3805 <dt><a href="reference.html#git.objects.submodule.base.UpdateProgress.x">x (git.objects.submodule.base.UpdateProgress attribute)</a>
3806 </dt>
3807
3808 <dd><dl>
3809
3810 <dt><a href="reference.html#git.objects.submodule.root.RootUpdateProgress.x">(git.objects.submodule.root.RootUpdateProgress attribute)</a>
3811 </dt>
3812
3813
3814 <dt><a href="reference.html#git.remote.FetchInfo.x">(git.remote.FetchInfo attribute)</a>
3815 </dt>
3816
3817
3818 <dt><a href="reference.html#git.remote.PushInfo.x">(git.remote.PushInfo attribute)</a>
3819 </dt>
3820
3821
3822 <dt><a href="reference.html#git.remote.RemoteProgress.x">(git.remote.RemoteProgress attribute)</a>
3823 </dt>
3824
3825
3826 <dt><a href="reference.html#git.util.RemoteProgress.x">(git.util.RemoteProgress attribute)</a>
3827 </dt>
3828
3829 </dl></dd>
3830 </dl></td>
3831 </tr></table>
3832
3833
3834
3835 </div>
3836 </div>
3837 </div>
3838 <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
3839 <div class="sphinxsidebarwrapper">
3840
3841 <div class="relations">
3842 <h3>Related Topics</h3>
3843 <ul>
3844 <li><a href="index.html">Documentation overview</a><ul>
3845 </ul></li>
3846 </ul>
3847 </div>
3848
3849 <div id="searchbox" style="display: none" role="search">
3850 <h3>Quick search</h3>
3851 <form class="search" action="search.html" method="get">
3852 <input type="text" name="q" />
3853 <input type="submit" value="Go" />
3854 <input type="hidden" name="check_keywords" value="yes" />
3855 <input type="hidden" name="area" value="default" />
3856 </form>
3857 </div>
3858 <script type="text/javascript">$('#searchbox').show(0);</script>
3859 </div>
3860 </div>
3861 <div class="clearer"></div>
3862 </div>
3863 <div class="footer">
3864 &copy;Copyright (C) 2008, 2009 Michael Trier and contributors, 2010-2015 Sebastian Thiel.
3865
3866 |
3867 Powered by <a href="http://sphinx-doc.org/">Sphinx 1.4.1</a>
3868 &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.7</a>
3869
3870 </div>
3871
3872
3873
3874
3875 </body>
3876 </html>
+0
-212
doc/build/html/index.html less more
0 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
1 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
3
4 <html xmlns="http://www.w3.org/1999/xhtml">
5 <head>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
8 <title>GitPython Documentation &mdash; GitPython 2.0.9dev0 documentation</title>
9
10 <link rel="stylesheet" href="_static/default.css" type="text/css" />
11 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
12
13 <script type="text/javascript">
14 var DOCUMENTATION_OPTIONS = {
15 URL_ROOT: './',
16 VERSION: '2.0.9dev0',
17 COLLAPSE_INDEX: false,
18 FILE_SUFFIX: '.html',
19 HAS_SOURCE: true
20 };
21 </script>
22 <script type="text/javascript" src="_static/jquery.js"></script>
23 <script type="text/javascript" src="_static/underscore.js"></script>
24 <script type="text/javascript" src="_static/doctools.js"></script>
25 <link rel="top" title="GitPython 2.0.9dev0 documentation" href="#" />
26 <link rel="next" title="Overview / Install" href="intro.html" />
27
28
29 <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
30
31 </head>
32 <body role="document">
33
34 <div class="document">
35 <div class="documentwrapper">
36 <div class="bodywrapper">
37 <div class="body" role="main">
38
39 <div class="section" id="gitpython-documentation">
40 <h1>GitPython Documentation<a class="headerlink" href="#gitpython-documentation" title="Permalink to this headline">¶</a></h1>
41 <div class="toctree-wrapper compound">
42 <ul>
43 <li class="toctree-l1"><a class="reference internal" href="intro.html">Overview / Install</a><ul>
44 <li class="toctree-l2"><a class="reference internal" href="intro.html#requirements">Requirements</a></li>
45 <li class="toctree-l2"><a class="reference internal" href="intro.html#installing-gitpython">Installing GitPython</a></li>
46 <li class="toctree-l2"><a class="reference internal" href="intro.html#limitations">Limitations</a></li>
47 <li class="toctree-l2"><a class="reference internal" href="intro.html#getting-started">Getting Started</a></li>
48 <li class="toctree-l2"><a class="reference internal" href="intro.html#api-reference">API Reference</a></li>
49 <li class="toctree-l2"><a class="reference internal" href="intro.html#source-code">Source Code</a></li>
50 <li class="toctree-l2"><a class="reference internal" href="intro.html#questions-and-answers">Questions and Answers</a></li>
51 <li class="toctree-l2"><a class="reference internal" href="intro.html#issue-tracker">Issue Tracker</a></li>
52 <li class="toctree-l2"><a class="reference internal" href="intro.html#license-information">License Information</a></li>
53 </ul>
54 </li>
55 <li class="toctree-l1"><a class="reference internal" href="tutorial.html">GitPython Tutorial</a><ul>
56 <li class="toctree-l2"><a class="reference internal" href="tutorial.html#meet-the-repo-type">Meet the Repo type</a></li>
57 <li class="toctree-l2"><a class="reference internal" href="tutorial.html#examining-references">Examining References</a></li>
58 <li class="toctree-l2"><a class="reference internal" href="tutorial.html#modifying-references">Modifying References</a></li>
59 <li class="toctree-l2"><a class="reference internal" href="tutorial.html#understanding-objects">Understanding Objects</a></li>
60 <li class="toctree-l2"><a class="reference internal" href="tutorial.html#the-commit-object">The Commit object</a></li>
61 <li class="toctree-l2"><a class="reference internal" href="tutorial.html#the-tree-object">The Tree object</a></li>
62 <li class="toctree-l2"><a class="reference internal" href="tutorial.html#the-index-object">The Index Object</a></li>
63 <li class="toctree-l2"><a class="reference internal" href="tutorial.html#handling-remotes">Handling Remotes</a></li>
64 <li class="toctree-l2"><a class="reference internal" href="tutorial.html#submodule-handling">Submodule Handling</a></li>
65 <li class="toctree-l2"><a class="reference internal" href="tutorial.html#obtaining-diff-information">Obtaining Diff Information</a></li>
66 <li class="toctree-l2"><a class="reference internal" href="tutorial.html#switching-branches">Switching Branches</a></li>
67 <li class="toctree-l2"><a class="reference internal" href="tutorial.html#initializing-a-repository">Initializing a repository</a></li>
68 <li class="toctree-l2"><a class="reference internal" href="tutorial.html#using-git-directly">Using git directly</a></li>
69 <li class="toctree-l2"><a class="reference internal" href="tutorial.html#object-databases">Object Databases</a></li>
70 <li class="toctree-l2"><a class="reference internal" href="tutorial.html#git-command-debugging-and-customization">Git Command Debugging and Customization</a></li>
71 <li class="toctree-l2"><a class="reference internal" href="tutorial.html#and-even-more">And even more ...</a></li>
72 </ul>
73 </li>
74 <li class="toctree-l1"><a class="reference internal" href="reference.html">API Reference</a><ul>
75 <li class="toctree-l2"><a class="reference internal" href="reference.html#module-git.objects.base">Objects.Base</a></li>
76 <li class="toctree-l2"><a class="reference internal" href="reference.html#module-git.objects.blob">Objects.Blob</a></li>
77 <li class="toctree-l2"><a class="reference internal" href="reference.html#module-git.objects.commit">Objects.Commit</a></li>
78 <li class="toctree-l2"><a class="reference internal" href="reference.html#module-git.objects.tag">Objects.Tag</a></li>
79 <li class="toctree-l2"><a class="reference internal" href="reference.html#module-git.objects.tree">Objects.Tree</a></li>
80 <li class="toctree-l2"><a class="reference internal" href="reference.html#module-git.objects.fun">Objects.Functions</a></li>
81 <li class="toctree-l2"><a class="reference internal" href="reference.html#module-git.objects.submodule.base">Objects.Submodule.base</a></li>
82 <li class="toctree-l2"><a class="reference internal" href="reference.html#module-git.objects.submodule.root">Objects.Submodule.root</a></li>
83 <li class="toctree-l2"><a class="reference internal" href="reference.html#module-git.objects.submodule.util">Objects.Submodule.util</a></li>
84 <li class="toctree-l2"><a class="reference internal" href="reference.html#module-git.objects.util">Objects.Util</a></li>
85 <li class="toctree-l2"><a class="reference internal" href="reference.html#module-git.index.base">Index.Base</a></li>
86 <li class="toctree-l2"><a class="reference internal" href="reference.html#module-git.index.fun">Index.Functions</a></li>
87 <li class="toctree-l2"><a class="reference internal" href="reference.html#module-git.index.typ">Index.Types</a></li>
88 <li class="toctree-l2"><a class="reference internal" href="reference.html#module-git.index.util">Index.Util</a></li>
89 <li class="toctree-l2"><a class="reference internal" href="reference.html#module-git.cmd">GitCmd</a></li>
90 <li class="toctree-l2"><a class="reference internal" href="reference.html#module-git.config">Config</a></li>
91 <li class="toctree-l2"><a class="reference internal" href="reference.html#module-git.diff">Diff</a></li>
92 <li class="toctree-l2"><a class="reference internal" href="reference.html#module-git.exc">Exceptions</a></li>
93 <li class="toctree-l2"><a class="reference internal" href="reference.html#module-git.refs.symbolic">Refs.symbolic</a></li>
94 <li class="toctree-l2"><a class="reference internal" href="reference.html#module-git.refs.reference">Refs.reference</a></li>
95 <li class="toctree-l2"><a class="reference internal" href="reference.html#module-git.refs.head">Refs.head</a></li>
96 <li class="toctree-l2"><a class="reference internal" href="reference.html#module-git.refs.tag">Refs.tag</a></li>
97 <li class="toctree-l2"><a class="reference internal" href="reference.html#module-git.refs.remote">Refs.remote</a></li>
98 <li class="toctree-l2"><a class="reference internal" href="reference.html#module-git.refs.log">Refs.log</a></li>
99 <li class="toctree-l2"><a class="reference internal" href="reference.html#module-git.remote">Remote</a></li>
100 <li class="toctree-l2"><a class="reference internal" href="reference.html#module-git.repo.base">Repo.Base</a></li>
101 <li class="toctree-l2"><a class="reference internal" href="reference.html#module-git.repo.fun">Repo.Functions</a></li>
102 <li class="toctree-l2"><a class="reference internal" href="reference.html#util">Util</a></li>
103 </ul>
104 </li>
105 <li class="toctree-l1"><a class="reference internal" href="roadmap.html">Roadmap</a></li>
106 <li class="toctree-l1"><a class="reference internal" href="changes.html">Changelog</a><ul>
107 <li class="toctree-l2"><a class="reference internal" href="changes.html#bugfixes">2.0.9 - Bugfixes</a></li>
108 <li class="toctree-l2"><a class="reference internal" href="changes.html#features-and-bugfixes">2.0.8 - Features and Bugfixes</a></li>
109 <li class="toctree-l2"><a class="reference internal" href="changes.html#new-features">2.0.7 - New Features</a></li>
110 <li class="toctree-l2"><a class="reference internal" href="changes.html#fixes-and-features">2.0.6 - Fixes and Features</a></li>
111 <li class="toctree-l2"><a class="reference internal" href="changes.html#fixes">2.0.5 - Fixes</a></li>
112 <li class="toctree-l2"><a class="reference internal" href="changes.html#id1">2.0.4 - Fixes</a></li>
113 <li class="toctree-l2"><a class="reference internal" href="changes.html#id2">2.0.3 - Fixes</a></li>
114 <li class="toctree-l2"><a class="reference internal" href="changes.html#id3">2.0.2 - Fixes</a></li>
115 <li class="toctree-l2"><a class="reference internal" href="changes.html#id4">2.0.1 - Fixes</a></li>
116 <li class="toctree-l2"><a class="reference internal" href="changes.html#features">2.0.0 - Features</a></li>
117 <li class="toctree-l2"><a class="reference internal" href="changes.html#id5">1.0.2 - Fixes</a></li>
118 <li class="toctree-l2"><a class="reference internal" href="changes.html#id6">1.0.1 - Fixes</a></li>
119 <li class="toctree-l2"><a class="reference internal" href="changes.html#notes">1.0.0 - Notes</a></li>
120 <li class="toctree-l2"><a class="reference internal" href="changes.html#id8">0.3.7 - Fixes</a></li>
121 <li class="toctree-l2"><a class="reference internal" href="changes.html#id10">0.3.6 - Features</a></li>
122 <li class="toctree-l2"><a class="reference internal" href="changes.html#id12">0.3.5 - Bugfixes</a></li>
123 <li class="toctree-l2"><a class="reference internal" href="changes.html#python-3-support">0.3.4 - Python 3 Support</a></li>
124 <li class="toctree-l2"><a class="reference internal" href="changes.html#id13">0.3.3</a></li>
125 <li class="toctree-l2"><a class="reference internal" href="changes.html#id14">0.3.2.1</a></li>
126 <li class="toctree-l2"><a class="reference internal" href="changes.html#id15">0.3.2</a></li>
127 <li class="toctree-l2"><a class="reference internal" href="changes.html#rc1">0.3.2 RC1</a></li>
128 <li class="toctree-l2"><a class="reference internal" href="changes.html#beta-2">0.3.1 Beta 2</a></li>
129 <li class="toctree-l2"><a class="reference internal" href="changes.html#beta-1">0.3.1 Beta 1</a></li>
130 <li class="toctree-l2"><a class="reference internal" href="changes.html#id16">0.3.0 Beta 2</a></li>
131 <li class="toctree-l2"><a class="reference internal" href="changes.html#id17">0.3.0 Beta 1</a></li>
132 <li class="toctree-l2"><a class="reference internal" href="changes.html#id18">0.2 Beta 2</a></li>
133 <li class="toctree-l2"><a class="reference internal" href="changes.html#id19">0.2</a></li>
134 <li class="toctree-l2"><a class="reference internal" href="changes.html#id21">0.1.6</a></li>
135 <li class="toctree-l2"><a class="reference internal" href="changes.html#id26">0.1.5</a></li>
136 <li class="toctree-l2"><a class="reference internal" href="changes.html#id32">0.1.4.1</a></li>
137 <li class="toctree-l2"><a class="reference internal" href="changes.html#id33">0.1.4</a></li>
138 <li class="toctree-l2"><a class="reference internal" href="changes.html#id37">0.1.2</a></li>
139 <li class="toctree-l2"><a class="reference internal" href="changes.html#id39">0.1.1</a></li>
140 <li class="toctree-l2"><a class="reference internal" href="changes.html#id40">0.1.0</a></li>
141 </ul>
142 </li>
143 </ul>
144 </div>
145 </div>
146 <div class="section" id="indices-and-tables">
147 <h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline">¶</a></h1>
148 <ul class="simple">
149 <li><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></li>
150 <li><a class="reference internal" href="py-modindex.html"><span class="std std-ref">Module Index</span></a></li>
151 <li><a class="reference internal" href="search.html"><span class="std std-ref">Search Page</span></a></li>
152 </ul>
153 </div>
154
155
156 </div>
157 </div>
158 </div>
159 <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
160 <div class="sphinxsidebarwrapper">
161 <h3><a href="#">Table Of Contents</a></h3>
162 <ul>
163 <li><a class="reference internal" href="#">GitPython Documentation</a></li>
164 <li><a class="reference internal" href="#indices-and-tables">Indices and tables</a></li>
165 </ul>
166 <div class="relations">
167 <h3>Related Topics</h3>
168 <ul>
169 <li><a href="#">Documentation overview</a><ul>
170 <li>Next: <a href="intro.html" title="next chapter">Overview / Install</a></li>
171 </ul></li>
172 </ul>
173 </div>
174 <div role="note" aria-label="source link">
175 <h3>This Page</h3>
176 <ul class="this-page-menu">
177 <li><a href="_sources/index.txt"
178 rel="nofollow">Show Source</a></li>
179 </ul>
180 </div>
181 <div id="searchbox" style="display: none" role="search">
182 <h3>Quick search</h3>
183 <form class="search" action="search.html" method="get">
184 <input type="text" name="q" />
185 <input type="submit" value="Go" />
186 <input type="hidden" name="check_keywords" value="yes" />
187 <input type="hidden" name="area" value="default" />
188 </form>
189 </div>
190 <script type="text/javascript">$('#searchbox').show(0);</script>
191 </div>
192 </div>
193 <div class="clearer"></div>
194 </div>
195 <div class="footer">
196 &copy;Copyright (C) 2008, 2009 Michael Trier and contributors, 2010-2015 Sebastian Thiel.
197
198 |
199 Powered by <a href="http://sphinx-doc.org/">Sphinx 1.4.1</a>
200 &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.7</a>
201
202 |
203 <a href="_sources/index.txt"
204 rel="nofollow">Page source</a>
205 </div>
206
207
208
209
210 </body>
211 </html>
+0
-238
doc/build/html/intro.html less more
0 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
1 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
3
4 <html xmlns="http://www.w3.org/1999/xhtml">
5 <head>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
8 <title>Overview / Install &mdash; GitPython 2.0.9dev0 documentation</title>
9
10 <link rel="stylesheet" href="_static/default.css" type="text/css" />
11 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
12
13 <script type="text/javascript">
14 var DOCUMENTATION_OPTIONS = {
15 URL_ROOT: './',
16 VERSION: '2.0.9dev0',
17 COLLAPSE_INDEX: false,
18 FILE_SUFFIX: '.html',
19 HAS_SOURCE: true
20 };
21 </script>
22 <script type="text/javascript" src="_static/jquery.js"></script>
23 <script type="text/javascript" src="_static/underscore.js"></script>
24 <script type="text/javascript" src="_static/doctools.js"></script>
25 <link rel="top" title="GitPython 2.0.9dev0 documentation" href="index.html" />
26 <link rel="next" title="GitPython Tutorial" href="tutorial.html" />
27 <link rel="prev" title="GitPython Documentation" href="index.html" />
28
29
30 <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
31
32 </head>
33 <body role="document">
34
35 <div class="document">
36 <div class="documentwrapper">
37 <div class="bodywrapper">
38 <div class="body" role="main">
39
40 <div class="section" id="overview-install">
41 <span id="intro-toplevel"></span><h1>Overview / Install<a class="headerlink" href="#overview-install" title="Permalink to this headline">¶</a></h1>
42 <p>GitPython is a python library used to interact with git repositories, high-level like git-porcelain, or low-level like git-plumbing.</p>
43 <p>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.</p>
44 <p>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.</p>
45 <div class="section" id="requirements">
46 <h2>Requirements<a class="headerlink" href="#requirements" title="Permalink to this headline">¶</a></h2>
47 <ul>
48 <li><dl class="first docutils">
49 <dt><a class="reference external" href="https://www.python.org">Python</a> 2.7 or newer</dt>
50 <dd><p class="first last">Since GitPython 2.0.0. Please note that python 2.6 is still reasonably well supported, but might
51 deteriorate over time. Support is provided on a best-effort basis only.</p>
52 </dd>
53 </dl>
54 </li>
55 <li><dl class="first docutils">
56 <dt><a class="reference external" href="https://git-scm.com/">Git</a> 1.7.0 or newer</dt>
57 <dd><p class="first last">It should also work with older versions, but it may be that some operations
58 involving remotes will not work as expected.</p>
59 </dd>
60 </dl>
61 </li>
62 <li><p class="first"><a class="reference external" href="https://pypi.python.org/pypi/gitdb">GitDB</a> - a pure python git database implementation</p>
63 </li>
64 <li><p class="first"><a class="reference external" href="https://nose.readthedocs.io/en/latest/">Python Nose</a> - used for running the tests</p>
65 </li>
66 <li><p class="first"><a class="reference external" href="http://www.voidspace.org.uk/python/mock.html">Mock by Michael Foord</a> used for tests. Requires version 0.5</p>
67 </li>
68 </ul>
69 </div>
70 <div class="section" id="installing-gitpython">
71 <h2>Installing GitPython<a class="headerlink" href="#installing-gitpython" title="Permalink to this headline">¶</a></h2>
72 <p>Installing GitPython is easily done using
73 <a class="reference external" href="https://pip.pypa.io/en/latest/installing.html">pip</a>. Assuming it is
74 installed, just run the following from the command-line:</p>
75 <div class="highlight-none"><div class="highlight"><pre><span></span># pip install gitpython
76 </pre></div>
77 </div>
78 <p>This command will download the latest version of GitPython from the
79 <a class="reference external" href="http://pypi.python.org/pypi/GitPython">Python Package Index</a> and install it
80 to your system. More information about <code class="docutils literal"><span class="pre">pip</span></code> and pypi can be found
81 here:</p>
82 <ul class="simple">
83 <li><a class="reference external" href="https://pip.pypa.io/en/latest/installing.html">install pip</a></li>
84 <li><a class="reference external" href="https://pypi.python.org/pypi/GitPython">pypi</a></li>
85 </ul>
86 <p>Alternatively, you can install from the distribution using the <code class="docutils literal"><span class="pre">setup.py</span></code>
87 script:</p>
88 <div class="highlight-none"><div class="highlight"><pre><span></span># python setup.py install
89 </pre></div>
90 </div>
91 <div class="admonition note">
92 <p class="first admonition-title">Note</p>
93 <p class="last">In this case, you have to manually install <a class="reference external" href="https://pypi.python.org/pypi/gitdb">GitDB</a> as well. It would be recommended to use the <a class="reference internal" href="#source-code-label"><span class="std std-ref">git source repository</span></a> in that case.</p>
94 </div>
95 </div>
96 <div class="section" id="limitations">
97 <h2>Limitations<a class="headerlink" href="#limitations" title="Permalink to this headline">¶</a></h2>
98 <div class="section" id="leakage-of-system-resources">
99 <h3>Leakage of System Resources<a class="headerlink" href="#leakage-of-system-resources" title="Permalink to this headline">¶</a></h3>
100 <p>GitPython is not suited for long-running processes (like daemons) as it tends to
101 leak system resources. It was written in a time where destructors (as implemented
102 in the <cite>__del__</cite> method) still ran deterministically.</p>
103 <p>In case you still want to use it in such a context, you will want to search the
104 codebase for <cite>__del__</cite> implementations and call these yourself when you see fit.</p>
105 <p>Another way assure proper cleanup of resources is to factor out GitPython into a
106 separate process which can be dropped periodically.</p>
107 </div>
108 <div class="section" id="best-effort-for-python-2-6-and-windows-support">
109 <h3>Best-effort for Python 2.6 and Windows support<a class="headerlink" href="#best-effort-for-python-2-6-and-windows-support" title="Permalink to this headline">¶</a></h3>
110 <p>This means that support for these platforms is likely to worsen over time
111 as they are kept alive solely by their users, or not.</p>
112 </div>
113 </div>
114 <div class="section" id="getting-started">
115 <h2>Getting Started<a class="headerlink" href="#getting-started" title="Permalink to this headline">¶</a></h2>
116 <ul class="simple">
117 <li><a class="reference internal" href="tutorial.html#tutorial-label"><span class="std std-ref">GitPython Tutorial</span></a> - This tutorial provides a walk-through of some of
118 the basic functionality and concepts used in GitPython. It, however, is not
119 exhaustive so you are encouraged to spend some time in the
120 <a class="reference internal" href="reference.html#api-reference-toplevel"><span class="std std-ref">API Reference</span></a>.</li>
121 </ul>
122 </div>
123 <div class="section" id="api-reference">
124 <h2>API Reference<a class="headerlink" href="#api-reference" title="Permalink to this headline">¶</a></h2>
125 <p>An organized section of the GitPthon API is at <a class="reference internal" href="reference.html#api-reference-toplevel"><span class="std std-ref">API Reference</span></a>.</p>
126 </div>
127 <div class="section" id="source-code">
128 <span id="source-code-label"></span><h2>Source Code<a class="headerlink" href="#source-code" title="Permalink to this headline">¶</a></h2>
129 <p>GitPython&#8217;s git repo is available on GitHub, which can be browsed at:</p>
130 <blockquote>
131 <div><ul class="simple">
132 <li><a class="reference external" href="https://github.com/gitpython-developers/GitPython">https://github.com/gitpython-developers/GitPython</a></li>
133 </ul>
134 </div></blockquote>
135 <p>and cloned using:</p>
136 <div class="highlight-default"><div class="highlight"><pre><span></span>$ git clone https://github.com/gitpython-developers/GitPython git-python
137 </pre></div>
138 </div>
139 <p>Initialize all submodules to obtain the required dependencies with:</p>
140 <div class="highlight-default"><div class="highlight"><pre><span></span>$ cd git-python
141 $ git submodule update --init --recursive
142 </pre></div>
143 </div>
144 <p>Finally verify the installation by running the <a class="reference external" href="http://code.google.com/p/python-nose/">nose powered</a> unit tests:</p>
145 <div class="highlight-default"><div class="highlight"><pre><span></span>$ nosetests
146 </pre></div>
147 </div>
148 </div>
149 <div class="section" id="questions-and-answers">
150 <h2>Questions and Answers<a class="headerlink" href="#questions-and-answers" title="Permalink to this headline">¶</a></h2>
151 <p>Please use stackoverflow for questions, and don&#8217;t forget to tag it with <cite>gitpython</cite> to assure the right people see the question in a timely manner.</p>
152 <p><a class="reference external" href="http://stackoverflow.com/questions/tagged/gitpython">http://stackoverflow.com/questions/tagged/gitpython</a></p>
153 </div>
154 <div class="section" id="issue-tracker">
155 <h2>Issue Tracker<a class="headerlink" href="#issue-tracker" title="Permalink to this headline">¶</a></h2>
156 <p>The issue tracker is hosted by github:</p>
157 <p><a class="reference external" href="https://github.com/gitpython-developers/GitPython/issues">https://github.com/gitpython-developers/GitPython/issues</a></p>
158 </div>
159 <div class="section" id="license-information">
160 <h2>License Information<a class="headerlink" href="#license-information" title="Permalink to this headline">¶</a></h2>
161 <p>GitPython is licensed under the New BSD License. See the LICENSE file for
162 more information.</p>
163 </div>
164 </div>
165
166
167 </div>
168 </div>
169 </div>
170 <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
171 <div class="sphinxsidebarwrapper">
172 <h3><a href="index.html">Table Of Contents</a></h3>
173 <ul>
174 <li><a class="reference internal" href="#">Overview / Install</a><ul>
175 <li><a class="reference internal" href="#requirements">Requirements</a></li>
176 <li><a class="reference internal" href="#installing-gitpython">Installing GitPython</a></li>
177 <li><a class="reference internal" href="#limitations">Limitations</a><ul>
178 <li><a class="reference internal" href="#leakage-of-system-resources">Leakage of System Resources</a></li>
179 <li><a class="reference internal" href="#best-effort-for-python-2-6-and-windows-support">Best-effort for Python 2.6 and Windows support</a></li>
180 </ul>
181 </li>
182 <li><a class="reference internal" href="#getting-started">Getting Started</a></li>
183 <li><a class="reference internal" href="#api-reference">API Reference</a></li>
184 <li><a class="reference internal" href="#source-code">Source Code</a></li>
185 <li><a class="reference internal" href="#questions-and-answers">Questions and Answers</a></li>
186 <li><a class="reference internal" href="#issue-tracker">Issue Tracker</a></li>
187 <li><a class="reference internal" href="#license-information">License Information</a></li>
188 </ul>
189 </li>
190 </ul>
191 <div class="relations">
192 <h3>Related Topics</h3>
193 <ul>
194 <li><a href="index.html">Documentation overview</a><ul>
195 <li>Previous: <a href="index.html" title="previous chapter">GitPython Documentation</a></li>
196 <li>Next: <a href="tutorial.html" title="next chapter">GitPython Tutorial</a></li>
197 </ul></li>
198 </ul>
199 </div>
200 <div role="note" aria-label="source link">
201 <h3>This Page</h3>
202 <ul class="this-page-menu">
203 <li><a href="_sources/intro.txt"
204 rel="nofollow">Show Source</a></li>
205 </ul>
206 </div>
207 <div id="searchbox" style="display: none" role="search">
208 <h3>Quick search</h3>
209 <form class="search" action="search.html" method="get">
210 <input type="text" name="q" />
211 <input type="submit" value="Go" />
212 <input type="hidden" name="check_keywords" value="yes" />
213 <input type="hidden" name="area" value="default" />
214 </form>
215 </div>
216 <script type="text/javascript">$('#searchbox').show(0);</script>
217 </div>
218 </div>
219 <div class="clearer"></div>
220 </div>
221 <div class="footer">
222 &copy;Copyright (C) 2008, 2009 Michael Trier and contributors, 2010-2015 Sebastian Thiel.
223
224 |
225 Powered by <a href="http://sphinx-doc.org/">Sphinx 1.4.1</a>
226 &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.7</a>
227
228 |
229 <a href="_sources/intro.txt"
230 rel="nofollow">Page source</a>
231 </div>
232
233
234
235
236 </body>
237 </html>
doc/build/html/objects.inv less more
Binary diff not shown
+0
-240
doc/build/html/py-modindex.html less more
0 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
1 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
3
4 <html xmlns="http://www.w3.org/1999/xhtml">
5 <head>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
8 <title>Python Module Index &mdash; GitPython 2.0.9dev0 documentation</title>
9
10 <link rel="stylesheet" href="_static/default.css" type="text/css" />
11 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
12
13 <script type="text/javascript">
14 var DOCUMENTATION_OPTIONS = {
15 URL_ROOT: './',
16 VERSION: '2.0.9dev0',
17 COLLAPSE_INDEX: false,
18 FILE_SUFFIX: '.html',
19 HAS_SOURCE: true
20 };
21 </script>
22 <script type="text/javascript" src="_static/jquery.js"></script>
23 <script type="text/javascript" src="_static/underscore.js"></script>
24 <script type="text/javascript" src="_static/doctools.js"></script>
25 <link rel="top" title="GitPython 2.0.9dev0 documentation" href="index.html" />
26
27
28
29 <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
30
31
32
33 </head>
34 <body role="document">
35
36 <div class="document">
37 <div class="documentwrapper">
38 <div class="bodywrapper">
39 <div class="body" role="main">
40
41
42 <h1>Python Module Index</h1>
43
44 <div class="modindex-jumpbox">
45 <a href="#cap-g"><strong>g</strong></a>
46 </div>
47
48 <table class="indextable modindextable" cellspacing="0" cellpadding="2">
49 <tr class="pcap"><td></td><td>&nbsp;</td><td></td></tr>
50 <tr class="cap" id="cap-g"><td></td><td>
51 <strong>g</strong></td><td></td></tr>
52 <tr>
53 <td><img src="_static/minus.png" class="toggler"
54 id="toggle-1" style="display: none" alt="-" /></td>
55 <td>
56 <code class="xref">git</code></td><td>
57 <em></em></td></tr>
58 <tr class="cg-1">
59 <td></td>
60 <td>&nbsp;&nbsp;&nbsp;
61 <a href="reference.html#module-git.cmd"><code class="xref">git.cmd</code></a></td><td>
62 <em></em></td></tr>
63 <tr class="cg-1">
64 <td></td>
65 <td>&nbsp;&nbsp;&nbsp;
66 <a href="reference.html#module-git.config"><code class="xref">git.config</code></a></td><td>
67 <em></em></td></tr>
68 <tr class="cg-1">
69 <td></td>
70 <td>&nbsp;&nbsp;&nbsp;
71 <a href="reference.html#module-git.diff"><code class="xref">git.diff</code></a></td><td>
72 <em></em></td></tr>
73 <tr class="cg-1">
74 <td></td>
75 <td>&nbsp;&nbsp;&nbsp;
76 <a href="reference.html#module-git.exc"><code class="xref">git.exc</code></a></td><td>
77 <em></em></td></tr>
78 <tr class="cg-1">
79 <td></td>
80 <td>&nbsp;&nbsp;&nbsp;
81 <a href="reference.html#module-git.index.base"><code class="xref">git.index.base</code></a></td><td>
82 <em></em></td></tr>
83 <tr class="cg-1">
84 <td></td>
85 <td>&nbsp;&nbsp;&nbsp;
86 <a href="reference.html#module-git.index.fun"><code class="xref">git.index.fun</code></a></td><td>
87 <em></em></td></tr>
88 <tr class="cg-1">
89 <td></td>
90 <td>&nbsp;&nbsp;&nbsp;
91 <a href="reference.html#module-git.index.typ"><code class="xref">git.index.typ</code></a></td><td>
92 <em></em></td></tr>
93 <tr class="cg-1">
94 <td></td>
95 <td>&nbsp;&nbsp;&nbsp;
96 <a href="reference.html#module-git.index.util"><code class="xref">git.index.util</code></a></td><td>
97 <em></em></td></tr>
98 <tr class="cg-1">
99 <td></td>
100 <td>&nbsp;&nbsp;&nbsp;
101 <a href="reference.html#module-git.objects.base"><code class="xref">git.objects.base</code></a></td><td>
102 <em></em></td></tr>
103 <tr class="cg-1">
104 <td></td>
105 <td>&nbsp;&nbsp;&nbsp;
106 <a href="reference.html#module-git.objects.blob"><code class="xref">git.objects.blob</code></a></td><td>
107 <em></em></td></tr>
108 <tr class="cg-1">
109 <td></td>
110 <td>&nbsp;&nbsp;&nbsp;
111 <a href="reference.html#module-git.objects.commit"><code class="xref">git.objects.commit</code></a></td><td>
112 <em></em></td></tr>
113 <tr class="cg-1">
114 <td></td>
115 <td>&nbsp;&nbsp;&nbsp;
116 <a href="reference.html#module-git.objects.fun"><code class="xref">git.objects.fun</code></a></td><td>
117 <em></em></td></tr>
118 <tr class="cg-1">
119 <td></td>
120 <td>&nbsp;&nbsp;&nbsp;
121 <a href="reference.html#module-git.objects.submodule.base"><code class="xref">git.objects.submodule.base</code></a></td><td>
122 <em></em></td></tr>
123 <tr class="cg-1">
124 <td></td>
125 <td>&nbsp;&nbsp;&nbsp;
126 <a href="reference.html#module-git.objects.submodule.root"><code class="xref">git.objects.submodule.root</code></a></td><td>
127 <em></em></td></tr>
128 <tr class="cg-1">
129 <td></td>
130 <td>&nbsp;&nbsp;&nbsp;
131 <a href="reference.html#module-git.objects.submodule.util"><code class="xref">git.objects.submodule.util</code></a></td><td>
132 <em></em></td></tr>
133 <tr class="cg-1">
134 <td></td>
135 <td>&nbsp;&nbsp;&nbsp;
136 <a href="reference.html#module-git.objects.tag"><code class="xref">git.objects.tag</code></a></td><td>
137 <em></em></td></tr>
138 <tr class="cg-1">
139 <td></td>
140 <td>&nbsp;&nbsp;&nbsp;
141 <a href="reference.html#module-git.objects.tree"><code class="xref">git.objects.tree</code></a></td><td>
142 <em></em></td></tr>
143 <tr class="cg-1">
144 <td></td>
145 <td>&nbsp;&nbsp;&nbsp;
146 <a href="reference.html#module-git.objects.util"><code class="xref">git.objects.util</code></a></td><td>
147 <em></em></td></tr>
148 <tr class="cg-1">
149 <td></td>
150 <td>&nbsp;&nbsp;&nbsp;
151 <a href="reference.html#module-git.refs.head"><code class="xref">git.refs.head</code></a></td><td>
152 <em></em></td></tr>
153 <tr class="cg-1">
154 <td></td>
155 <td>&nbsp;&nbsp;&nbsp;
156 <a href="reference.html#module-git.refs.log"><code class="xref">git.refs.log</code></a></td><td>
157 <em></em></td></tr>
158 <tr class="cg-1">
159 <td></td>
160 <td>&nbsp;&nbsp;&nbsp;
161 <a href="reference.html#module-git.refs.reference"><code class="xref">git.refs.reference</code></a></td><td>
162 <em></em></td></tr>
163 <tr class="cg-1">
164 <td></td>
165 <td>&nbsp;&nbsp;&nbsp;
166 <a href="reference.html#module-git.refs.remote"><code class="xref">git.refs.remote</code></a></td><td>
167 <em></em></td></tr>
168 <tr class="cg-1">
169 <td></td>
170 <td>&nbsp;&nbsp;&nbsp;
171 <a href="reference.html#module-git.refs.symbolic"><code class="xref">git.refs.symbolic</code></a></td><td>
172 <em></em></td></tr>
173 <tr class="cg-1">
174 <td></td>
175 <td>&nbsp;&nbsp;&nbsp;
176 <a href="reference.html#module-git.refs.tag"><code class="xref">git.refs.tag</code></a></td><td>
177 <em></em></td></tr>
178 <tr class="cg-1">
179 <td></td>
180 <td>&nbsp;&nbsp;&nbsp;
181 <a href="reference.html#module-git.remote"><code class="xref">git.remote</code></a></td><td>
182 <em></em></td></tr>
183 <tr class="cg-1">
184 <td></td>
185 <td>&nbsp;&nbsp;&nbsp;
186 <a href="reference.html#module-git.repo.base"><code class="xref">git.repo.base</code></a></td><td>
187 <em></em></td></tr>
188 <tr class="cg-1">
189 <td></td>
190 <td>&nbsp;&nbsp;&nbsp;
191 <a href="reference.html#module-git.repo.fun"><code class="xref">git.repo.fun</code></a></td><td>
192 <em></em></td></tr>
193 <tr class="cg-1">
194 <td></td>
195 <td>&nbsp;&nbsp;&nbsp;
196 <a href="reference.html#module-git.util"><code class="xref">git.util</code></a></td><td>
197 <em></em></td></tr>
198 </table>
199
200
201 </div>
202 </div>
203 </div>
204 <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
205 <div class="sphinxsidebarwrapper"><div class="relations">
206 <h3>Related Topics</h3>
207 <ul>
208 <li><a href="index.html">Documentation overview</a><ul>
209 </ul></li>
210 </ul>
211 </div>
212 <div id="searchbox" style="display: none" role="search">
213 <h3>Quick search</h3>
214 <form class="search" action="search.html" method="get">
215 <input type="text" name="q" />
216 <input type="submit" value="Go" />
217 <input type="hidden" name="check_keywords" value="yes" />
218 <input type="hidden" name="area" value="default" />
219 </form>
220 </div>
221 <script type="text/javascript">$('#searchbox').show(0);</script>
222 </div>
223 </div>
224 <div class="clearer"></div>
225 </div>
226 <div class="footer">
227 &copy;Copyright (C) 2008, 2009 Michael Trier and contributors, 2010-2015 Sebastian Thiel.
228
229 |
230 Powered by <a href="http://sphinx-doc.org/">Sphinx 1.4.1</a>
231 &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.7</a>
232
233 </div>
234
235
236
237
238 </body>
239 </html>
+0
-7988
doc/build/html/reference.html less more
0 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
1 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
3
4 <html xmlns="http://www.w3.org/1999/xhtml">
5 <head>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
8 <title>API Reference &mdash; GitPython 2.0.9dev0 documentation</title>
9
10 <link rel="stylesheet" href="_static/default.css" type="text/css" />
11 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
12
13 <script type="text/javascript">
14 var DOCUMENTATION_OPTIONS = {
15 URL_ROOT: './',
16 VERSION: '2.0.9dev0',
17 COLLAPSE_INDEX: false,
18 FILE_SUFFIX: '.html',
19 HAS_SOURCE: true
20 };
21 </script>
22 <script type="text/javascript" src="_static/jquery.js"></script>
23 <script type="text/javascript" src="_static/underscore.js"></script>
24 <script type="text/javascript" src="_static/doctools.js"></script>
25 <link rel="top" title="GitPython 2.0.9dev0 documentation" href="index.html" />
26 <link rel="next" title="Roadmap" href="roadmap.html" />
27 <link rel="prev" title="GitPython Tutorial" href="tutorial.html" />
28
29
30 <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
31
32 </head>
33 <body role="document">
34
35 <div class="document">
36 <div class="documentwrapper">
37 <div class="bodywrapper">
38 <div class="body" role="main">
39
40 <div class="section" id="api-reference">
41 <span id="api-reference-toplevel"></span><h1>API Reference<a class="headerlink" href="#api-reference" title="Permalink to this headline">¶</a></h1>
42 <div class="section" id="module-git.objects.base">
43 <span id="objects-base"></span><h2>Objects.Base<a class="headerlink" href="#module-git.objects.base" title="Permalink to this headline">¶</a></h2>
44 <dl class="class">
45 <dt id="git.objects.base.Object">
46 <em class="property">class </em><code class="descclassname">git.objects.base.</code><code class="descname">Object</code><span class="sig-paren">(</span><em>repo</em>, <em>binsha</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.base.Object" title="Permalink to this definition">¶</a></dt>
47 <dd><p>Implements an Object which may be Blobs, Trees, Commits and Tags</p>
48 <dl class="attribute">
49 <dt id="git.objects.base.Object.NULL_BIN_SHA">
50 <code class="descname">NULL_BIN_SHA</code><em class="property"> = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'</em><a class="headerlink" href="#git.objects.base.Object.NULL_BIN_SHA" title="Permalink to this definition">¶</a></dt>
51 <dd></dd></dl>
52
53 <dl class="attribute">
54 <dt id="git.objects.base.Object.NULL_HEX_SHA">
55 <code class="descname">NULL_HEX_SHA</code><em class="property"> = '0000000000000000000000000000000000000000'</em><a class="headerlink" href="#git.objects.base.Object.NULL_HEX_SHA" title="Permalink to this definition">¶</a></dt>
56 <dd></dd></dl>
57
58 <dl class="attribute">
59 <dt id="git.objects.base.Object.TYPES">
60 <code class="descname">TYPES</code><em class="property"> = ('blob', 'tree', 'commit', 'tag')</em><a class="headerlink" href="#git.objects.base.Object.TYPES" title="Permalink to this definition">¶</a></dt>
61 <dd></dd></dl>
62
63 <dl class="method">
64 <dt id="git.objects.base.Object.__eq__">
65 <code class="descname">__eq__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.base.Object.__eq__" title="Permalink to this definition">¶</a></dt>
66 <dd><table class="docutils field-list" frame="void" rules="none">
67 <col class="field-name" />
68 <col class="field-body" />
69 <tbody valign="top">
70 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True if the objects have the same SHA1</td>
71 </tr>
72 </tbody>
73 </table>
74 </dd></dl>
75
76 <dl class="method">
77 <dt id="git.objects.base.Object.__hash__">
78 <code class="descname">__hash__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.base.Object.__hash__" title="Permalink to this definition">¶</a></dt>
79 <dd><table class="docutils field-list" frame="void" rules="none">
80 <col class="field-name" />
81 <col class="field-body" />
82 <tbody valign="top">
83 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Hash of our id allowing objects to be used in dicts and sets</td>
84 </tr>
85 </tbody>
86 </table>
87 </dd></dl>
88
89 <dl class="method">
90 <dt id="git.objects.base.Object.__init__">
91 <code class="descname">__init__</code><span class="sig-paren">(</span><em>repo</em>, <em>binsha</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.base.Object.__init__" title="Permalink to this definition">¶</a></dt>
92 <dd><p>Initialize an object by identifying it by its binary sha.
93 All keyword arguments will be set on demand if None.</p>
94 <table class="docutils field-list" frame="void" rules="none">
95 <col class="field-name" />
96 <col class="field-body" />
97 <tbody valign="top">
98 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
99 <li><strong>repo</strong> &#8211; repository this object is located in</li>
100 <li><strong>binsha</strong> &#8211; 20 byte SHA1</li>
101 </ul>
102 </td>
103 </tr>
104 </tbody>
105 </table>
106 </dd></dl>
107
108 <dl class="attribute">
109 <dt id="git.objects.base.Object.__module__">
110 <code class="descname">__module__</code><em class="property"> = 'git.objects.base'</em><a class="headerlink" href="#git.objects.base.Object.__module__" title="Permalink to this definition">¶</a></dt>
111 <dd></dd></dl>
112
113 <dl class="method">
114 <dt id="git.objects.base.Object.__ne__">
115 <code class="descname">__ne__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.base.Object.__ne__" title="Permalink to this definition">¶</a></dt>
116 <dd><table class="docutils field-list" frame="void" rules="none">
117 <col class="field-name" />
118 <col class="field-body" />
119 <tbody valign="top">
120 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True if the objects do not have the same SHA1</td>
121 </tr>
122 </tbody>
123 </table>
124 </dd></dl>
125
126 <dl class="method">
127 <dt id="git.objects.base.Object.__repr__">
128 <code class="descname">__repr__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.base.Object.__repr__" title="Permalink to this definition">¶</a></dt>
129 <dd><table class="docutils field-list" frame="void" rules="none">
130 <col class="field-name" />
131 <col class="field-body" />
132 <tbody valign="top">
133 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">string with pythonic representation of our object</td>
134 </tr>
135 </tbody>
136 </table>
137 </dd></dl>
138
139 <dl class="attribute">
140 <dt id="git.objects.base.Object.__slots__">
141 <code class="descname">__slots__</code><em class="property"> = ('repo', 'binsha', 'size')</em><a class="headerlink" href="#git.objects.base.Object.__slots__" title="Permalink to this definition">¶</a></dt>
142 <dd></dd></dl>
143
144 <dl class="method">
145 <dt id="git.objects.base.Object.__str__">
146 <code class="descname">__str__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.base.Object.__str__" title="Permalink to this definition">¶</a></dt>
147 <dd><table class="docutils field-list" frame="void" rules="none">
148 <col class="field-name" />
149 <col class="field-body" />
150 <tbody valign="top">
151 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">string of our SHA1 as understood by all git commands</td>
152 </tr>
153 </tbody>
154 </table>
155 </dd></dl>
156
157 <dl class="attribute">
158 <dt id="git.objects.base.Object.binsha">
159 <code class="descname">binsha</code><a class="headerlink" href="#git.objects.base.Object.binsha" title="Permalink to this definition">¶</a></dt>
160 <dd></dd></dl>
161
162 <dl class="attribute">
163 <dt id="git.objects.base.Object.data_stream">
164 <code class="descname">data_stream</code><a class="headerlink" href="#git.objects.base.Object.data_stream" title="Permalink to this definition">¶</a></dt>
165 <dd><table class="docutils field-list" frame="void" rules="none">
166 <col class="field-name" />
167 <col class="field-body" />
168 <tbody valign="top">
169 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">File Object compatible stream to the uncompressed raw data of the object</td>
170 </tr>
171 <tr class="field-even field"><th class="field-name">Note:</th><td class="field-body">returned streams must be read in order</td>
172 </tr>
173 </tbody>
174 </table>
175 </dd></dl>
176
177 <dl class="attribute">
178 <dt id="git.objects.base.Object.hexsha">
179 <code class="descname">hexsha</code><a class="headerlink" href="#git.objects.base.Object.hexsha" title="Permalink to this definition">¶</a></dt>
180 <dd><table class="docutils field-list" frame="void" rules="none">
181 <col class="field-name" />
182 <col class="field-body" />
183 <tbody valign="top">
184 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">40 byte hex version of our 20 byte binary sha</td>
185 </tr>
186 </tbody>
187 </table>
188 </dd></dl>
189
190 <dl class="classmethod">
191 <dt id="git.objects.base.Object.new">
192 <em class="property">classmethod </em><code class="descname">new</code><span class="sig-paren">(</span><em>repo</em>, <em>id</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.base.Object.new" title="Permalink to this definition">¶</a></dt>
193 <dd><table class="docutils field-list" frame="void" rules="none">
194 <col class="field-name" />
195 <col class="field-body" />
196 <tbody valign="top">
197 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">New Object instance of a type appropriate to the object type behind
198 id. The id of the newly created object will be a binsha even though
199 the input id may have been a Reference or Rev-Spec</td>
200 </tr>
201 <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>id</strong> &#8211; reference, rev-spec, or hexsha</td>
202 </tr>
203 <tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">This cannot be a __new__ method as it would always call __init__
204 with the input id which is not necessarily a binsha.</td>
205 </tr>
206 </tbody>
207 </table>
208 </dd></dl>
209
210 <dl class="classmethod">
211 <dt id="git.objects.base.Object.new_from_sha">
212 <em class="property">classmethod </em><code class="descname">new_from_sha</code><span class="sig-paren">(</span><em>repo</em>, <em>sha1</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.base.Object.new_from_sha" title="Permalink to this definition">¶</a></dt>
213 <dd><table class="docutils field-list" frame="void" rules="none">
214 <col class="field-name" />
215 <col class="field-body" />
216 <tbody valign="top">
217 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">new object instance of a type appropriate to represent the given
218 binary sha1</td>
219 </tr>
220 <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>sha1</strong> &#8211; 20 byte binary sha1</td>
221 </tr>
222 </tbody>
223 </table>
224 </dd></dl>
225
226 <dl class="attribute">
227 <dt id="git.objects.base.Object.repo">
228 <code class="descname">repo</code><a class="headerlink" href="#git.objects.base.Object.repo" title="Permalink to this definition">¶</a></dt>
229 <dd></dd></dl>
230
231 <dl class="attribute">
232 <dt id="git.objects.base.Object.size">
233 <code class="descname">size</code><a class="headerlink" href="#git.objects.base.Object.size" title="Permalink to this definition">¶</a></dt>
234 <dd></dd></dl>
235
236 <dl class="method">
237 <dt id="git.objects.base.Object.stream_data">
238 <code class="descname">stream_data</code><span class="sig-paren">(</span><em>ostream</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.base.Object.stream_data" title="Permalink to this definition">¶</a></dt>
239 <dd><p>Writes our data directly to the given output stream
240 :param ostream: File object compatible stream object.
241 :return: self</p>
242 </dd></dl>
243
244 <dl class="attribute">
245 <dt id="git.objects.base.Object.type">
246 <code class="descname">type</code><em class="property"> = None</em><a class="headerlink" href="#git.objects.base.Object.type" title="Permalink to this definition">¶</a></dt>
247 <dd></dd></dl>
248
249 </dd></dl>
250
251 <dl class="class">
252 <dt id="git.objects.base.IndexObject">
253 <em class="property">class </em><code class="descclassname">git.objects.base.</code><code class="descname">IndexObject</code><span class="sig-paren">(</span><em>repo</em>, <em>binsha</em>, <em>mode=None</em>, <em>path=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.base.IndexObject" title="Permalink to this definition">¶</a></dt>
254 <dd><p>Base for all objects that can be part of the index file , namely Tree, Blob and
255 SubModule objects</p>
256 <dl class="method">
257 <dt id="git.objects.base.IndexObject.__hash__">
258 <code class="descname">__hash__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.base.IndexObject.__hash__" title="Permalink to this definition">¶</a></dt>
259 <dd><table class="docutils field-list" frame="void" rules="none">
260 <col class="field-name" />
261 <col class="field-body" />
262 <tbody valign="top">
263 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Hash of our path as index items are uniquely identifyable by path, not
264 by their data !</td>
265 </tr>
266 </tbody>
267 </table>
268 </dd></dl>
269
270 <dl class="method">
271 <dt id="git.objects.base.IndexObject.__init__">
272 <code class="descname">__init__</code><span class="sig-paren">(</span><em>repo</em>, <em>binsha</em>, <em>mode=None</em>, <em>path=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.base.IndexObject.__init__" title="Permalink to this definition">¶</a></dt>
273 <dd><p>Initialize a newly instanced IndexObject</p>
274 <table class="docutils field-list" frame="void" rules="none">
275 <col class="field-name" />
276 <col class="field-body" />
277 <tbody valign="top">
278 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
279 <li><strong>repo</strong> &#8211; is the Repo we are located in</li>
280 <li><strong>binsha</strong> &#8211; 20 byte sha1</li>
281 <li><strong>mode</strong> &#8211; is the stat compatible file mode as int, use the stat module
282 to evaluate the infomration</li>
283 <li><strong>path</strong> &#8211; is the path to the file in the file system, relative to the git repository root, i.e.
284 file.ext or folder/other.ext</li>
285 </ul>
286 </td>
287 </tr>
288 <tr class="field-even field"><th class="field-name">Note:</th><td class="field-body"><p class="first last">Path may not be set of the index object has been created directly as it cannot
289 be retrieved without knowing the parent tree.</p>
290 </td>
291 </tr>
292 </tbody>
293 </table>
294 </dd></dl>
295
296 <dl class="attribute">
297 <dt id="git.objects.base.IndexObject.__module__">
298 <code class="descname">__module__</code><em class="property"> = 'git.objects.base'</em><a class="headerlink" href="#git.objects.base.IndexObject.__module__" title="Permalink to this definition">¶</a></dt>
299 <dd></dd></dl>
300
301 <dl class="attribute">
302 <dt id="git.objects.base.IndexObject.__slots__">
303 <code class="descname">__slots__</code><em class="property"> = ('path', 'mode')</em><a class="headerlink" href="#git.objects.base.IndexObject.__slots__" title="Permalink to this definition">¶</a></dt>
304 <dd></dd></dl>
305
306 <dl class="attribute">
307 <dt id="git.objects.base.IndexObject.abspath">
308 <code class="descname">abspath</code><a class="headerlink" href="#git.objects.base.IndexObject.abspath" title="Permalink to this definition">¶</a></dt>
309 <dd><table class="docutils field-list" frame="void" rules="none">
310 <col class="field-name" />
311 <col class="field-body" />
312 <tbody valign="top">
313 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Absolute path to this index object in the file system ( as opposed to the
314 .path field which is a path relative to the git repository ).<p>The returned path will be native to the system and contains &#8216;&#8217; on windows.</p>
315 </td>
316 </tr>
317 </tbody>
318 </table>
319 </dd></dl>
320
321 <dl class="attribute">
322 <dt id="git.objects.base.IndexObject.mode">
323 <code class="descname">mode</code><a class="headerlink" href="#git.objects.base.IndexObject.mode" title="Permalink to this definition">¶</a></dt>
324 <dd></dd></dl>
325
326 <dl class="attribute">
327 <dt id="git.objects.base.IndexObject.name">
328 <code class="descname">name</code><a class="headerlink" href="#git.objects.base.IndexObject.name" title="Permalink to this definition">¶</a></dt>
329 <dd><table class="docutils field-list" frame="void" rules="none">
330 <col class="field-name" />
331 <col class="field-body" />
332 <tbody valign="top">
333 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Name portion of the path, effectively being the basename</td>
334 </tr>
335 </tbody>
336 </table>
337 </dd></dl>
338
339 <dl class="attribute">
340 <dt id="git.objects.base.IndexObject.path">
341 <code class="descname">path</code><a class="headerlink" href="#git.objects.base.IndexObject.path" title="Permalink to this definition">¶</a></dt>
342 <dd></dd></dl>
343
344 </dd></dl>
345
346 </div>
347 <div class="section" id="module-git.objects.blob">
348 <span id="objects-blob"></span><h2>Objects.Blob<a class="headerlink" href="#module-git.objects.blob" title="Permalink to this headline">¶</a></h2>
349 <dl class="class">
350 <dt id="git.objects.blob.Blob">
351 <em class="property">class </em><code class="descclassname">git.objects.blob.</code><code class="descname">Blob</code><span class="sig-paren">(</span><em>repo</em>, <em>binsha</em>, <em>mode=None</em>, <em>path=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.blob.Blob" title="Permalink to this definition">¶</a></dt>
352 <dd><p>A Blob encapsulates a git blob object</p>
353 <dl class="attribute">
354 <dt id="git.objects.blob.Blob.DEFAULT_MIME_TYPE">
355 <code class="descname">DEFAULT_MIME_TYPE</code><em class="property"> = 'text/plain'</em><a class="headerlink" href="#git.objects.blob.Blob.DEFAULT_MIME_TYPE" title="Permalink to this definition">¶</a></dt>
356 <dd></dd></dl>
357
358 <dl class="attribute">
359 <dt id="git.objects.blob.Blob.__module__">
360 <code class="descname">__module__</code><em class="property"> = 'git.objects.blob'</em><a class="headerlink" href="#git.objects.blob.Blob.__module__" title="Permalink to this definition">¶</a></dt>
361 <dd></dd></dl>
362
363 <dl class="attribute">
364 <dt id="git.objects.blob.Blob.__slots__">
365 <code class="descname">__slots__</code><em class="property"> = ()</em><a class="headerlink" href="#git.objects.blob.Blob.__slots__" title="Permalink to this definition">¶</a></dt>
366 <dd></dd></dl>
367
368 <dl class="attribute">
369 <dt id="git.objects.blob.Blob.executable_mode">
370 <code class="descname">executable_mode</code><em class="property"> = 33261</em><a class="headerlink" href="#git.objects.blob.Blob.executable_mode" title="Permalink to this definition">¶</a></dt>
371 <dd></dd></dl>
372
373 <dl class="attribute">
374 <dt id="git.objects.blob.Blob.file_mode">
375 <code class="descname">file_mode</code><em class="property"> = 33188</em><a class="headerlink" href="#git.objects.blob.Blob.file_mode" title="Permalink to this definition">¶</a></dt>
376 <dd></dd></dl>
377
378 <dl class="attribute">
379 <dt id="git.objects.blob.Blob.link_mode">
380 <code class="descname">link_mode</code><em class="property"> = 40960</em><a class="headerlink" href="#git.objects.blob.Blob.link_mode" title="Permalink to this definition">¶</a></dt>
381 <dd></dd></dl>
382
383 <dl class="attribute">
384 <dt id="git.objects.blob.Blob.mime_type">
385 <code class="descname">mime_type</code><a class="headerlink" href="#git.objects.blob.Blob.mime_type" title="Permalink to this definition">¶</a></dt>
386 <dd><table class="docutils field-list" frame="void" rules="none">
387 <col class="field-name" />
388 <col class="field-body" />
389 <tbody valign="top">
390 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">String describing the mime type of this file (based on the filename)</td>
391 </tr>
392 <tr class="field-even field"><th class="field-name">Note:</th><td class="field-body">Defaults to &#8216;text/plain&#8217; in case the actual file type is unknown.</td>
393 </tr>
394 </tbody>
395 </table>
396 </dd></dl>
397
398 <dl class="attribute">
399 <dt id="git.objects.blob.Blob.type">
400 <code class="descname">type</code><em class="property"> = 'blob'</em><a class="headerlink" href="#git.objects.blob.Blob.type" title="Permalink to this definition">¶</a></dt>
401 <dd></dd></dl>
402
403 </dd></dl>
404
405 </div>
406 <div class="section" id="module-git.objects.commit">
407 <span id="objects-commit"></span><h2>Objects.Commit<a class="headerlink" href="#module-git.objects.commit" title="Permalink to this headline">¶</a></h2>
408 <dl class="class">
409 <dt id="git.objects.commit.Commit">
410 <em class="property">class </em><code class="descclassname">git.objects.commit.</code><code class="descname">Commit</code><span class="sig-paren">(</span><em>repo</em>, <em>binsha</em>, <em>tree=None</em>, <em>author=None</em>, <em>authored_date=None</em>, <em>author_tz_offset=None</em>, <em>committer=None</em>, <em>committed_date=None</em>, <em>committer_tz_offset=None</em>, <em>message=None</em>, <em>parents=None</em>, <em>encoding=None</em>, <em>gpgsig=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.commit.Commit" title="Permalink to this definition">¶</a></dt>
411 <dd><p>Wraps a git Commit object.</p>
412 <p>This class will act lazily on some of its attributes and will query the
413 value on demand only if it involves calling the git binary.</p>
414 <dl class="method">
415 <dt id="git.objects.commit.Commit.__init__">
416 <code class="descname">__init__</code><span class="sig-paren">(</span><em>repo</em>, <em>binsha</em>, <em>tree=None</em>, <em>author=None</em>, <em>authored_date=None</em>, <em>author_tz_offset=None</em>, <em>committer=None</em>, <em>committed_date=None</em>, <em>committer_tz_offset=None</em>, <em>message=None</em>, <em>parents=None</em>, <em>encoding=None</em>, <em>gpgsig=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.commit.Commit.__init__" title="Permalink to this definition">¶</a></dt>
417 <dd><p>Instantiate a new Commit. All keyword arguments taking None as default will
418 be implicitly set on first query.</p>
419 <table class="docutils field-list" frame="void" rules="none">
420 <col class="field-name" />
421 <col class="field-body" />
422 <tbody valign="top">
423 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
424 <li><strong>binsha</strong> &#8211; 20 byte sha1</li>
425 <li><strong>parents</strong> &#8211; tuple( Commit, ... )
426 is a tuple of commit ids or actual Commits</li>
427 <li><strong>tree</strong> &#8211; Tree
428 Tree object</li>
429 <li><strong>author</strong> &#8211; Actor
430 is the author string ( will be implicitly converted into an Actor object )</li>
431 <li><strong>authored_date</strong> &#8211; int_seconds_since_epoch
432 is the authored DateTime - use time.gmtime() to convert it into a
433 different format</li>
434 <li><strong>author_tz_offset</strong> &#8211; int_seconds_west_of_utc
435 is the timezone that the authored_date is in</li>
436 <li><strong>committer</strong> &#8211; Actor
437 is the committer string</li>
438 <li><strong>committed_date</strong> &#8211; int_seconds_since_epoch
439 is the committed DateTime - use time.gmtime() to convert it into a
440 different format</li>
441 <li><strong>committer_tz_offset</strong> &#8211; int_seconds_west_of_utc
442 is the timezone that the authored_date is in</li>
443 <li><strong>message</strong> &#8211; string
444 is the commit message</li>
445 <li><strong>encoding</strong> &#8211; string
446 encoding of the message, defaults to UTF-8</li>
447 <li><strong>parents</strong> &#8211; List or tuple of Commit objects which are our parent(s) in the commit
448 dependency graph</li>
449 </ul>
450 </td>
451 </tr>
452 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">git.Commit</p>
453 </td>
454 </tr>
455 <tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body"><p class="first last">Timezone information is in the same format and in the same sign
456 as what time.altzone returns. The sign is inverted compared to git&#8217;s
457 UTC timezone.</p>
458 </td>
459 </tr>
460 </tbody>
461 </table>
462 </dd></dl>
463
464 <dl class="attribute">
465 <dt id="git.objects.commit.Commit.__module__">
466 <code class="descname">__module__</code><em class="property"> = 'git.objects.commit'</em><a class="headerlink" href="#git.objects.commit.Commit.__module__" title="Permalink to this definition">¶</a></dt>
467 <dd></dd></dl>
468
469 <dl class="attribute">
470 <dt id="git.objects.commit.Commit.__slots__">
471 <code class="descname">__slots__</code><em class="property"> = ('tree', 'author', 'authored_date', 'author_tz_offset', 'committer', 'committed_date', 'committer_tz_offset', 'message', 'parents', 'encoding', 'gpgsig')</em><a class="headerlink" href="#git.objects.commit.Commit.__slots__" title="Permalink to this definition">¶</a></dt>
472 <dd></dd></dl>
473
474 <dl class="attribute">
475 <dt id="git.objects.commit.Commit.author">
476 <code class="descname">author</code><a class="headerlink" href="#git.objects.commit.Commit.author" title="Permalink to this definition">¶</a></dt>
477 <dd></dd></dl>
478
479 <dl class="attribute">
480 <dt id="git.objects.commit.Commit.author_tz_offset">
481 <code class="descname">author_tz_offset</code><a class="headerlink" href="#git.objects.commit.Commit.author_tz_offset" title="Permalink to this definition">¶</a></dt>
482 <dd></dd></dl>
483
484 <dl class="attribute">
485 <dt id="git.objects.commit.Commit.authored_date">
486 <code class="descname">authored_date</code><a class="headerlink" href="#git.objects.commit.Commit.authored_date" title="Permalink to this definition">¶</a></dt>
487 <dd></dd></dl>
488
489 <dl class="attribute">
490 <dt id="git.objects.commit.Commit.authored_datetime">
491 <code class="descname">authored_datetime</code><a class="headerlink" href="#git.objects.commit.Commit.authored_datetime" title="Permalink to this definition">¶</a></dt>
492 <dd></dd></dl>
493
494 <dl class="attribute">
495 <dt id="git.objects.commit.Commit.committed_date">
496 <code class="descname">committed_date</code><a class="headerlink" href="#git.objects.commit.Commit.committed_date" title="Permalink to this definition">¶</a></dt>
497 <dd></dd></dl>
498
499 <dl class="attribute">
500 <dt id="git.objects.commit.Commit.committed_datetime">
501 <code class="descname">committed_datetime</code><a class="headerlink" href="#git.objects.commit.Commit.committed_datetime" title="Permalink to this definition">¶</a></dt>
502 <dd></dd></dl>
503
504 <dl class="attribute">
505 <dt id="git.objects.commit.Commit.committer">
506 <code class="descname">committer</code><a class="headerlink" href="#git.objects.commit.Commit.committer" title="Permalink to this definition">¶</a></dt>
507 <dd></dd></dl>
508
509 <dl class="attribute">
510 <dt id="git.objects.commit.Commit.committer_tz_offset">
511 <code class="descname">committer_tz_offset</code><a class="headerlink" href="#git.objects.commit.Commit.committer_tz_offset" title="Permalink to this definition">¶</a></dt>
512 <dd></dd></dl>
513
514 <dl class="attribute">
515 <dt id="git.objects.commit.Commit.conf_encoding">
516 <code class="descname">conf_encoding</code><em class="property"> = 'i18n.commitencoding'</em><a class="headerlink" href="#git.objects.commit.Commit.conf_encoding" title="Permalink to this definition">¶</a></dt>
517 <dd></dd></dl>
518
519 <dl class="method">
520 <dt id="git.objects.commit.Commit.count">
521 <code class="descname">count</code><span class="sig-paren">(</span><em>paths=''</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.commit.Commit.count" title="Permalink to this definition">¶</a></dt>
522 <dd><p>Count the number of commits reachable from this commit</p>
523 <table class="docutils field-list" frame="void" rules="none">
524 <col class="field-name" />
525 <col class="field-body" />
526 <tbody valign="top">
527 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
528 <li><strong>paths</strong> &#8211; is an optinal path or a list of paths restricting the return value
529 to commits actually containing the paths</li>
530 <li><strong>kwargs</strong> &#8211; Additional options to be passed to git-rev-list. They must not alter
531 the ouput style of the command, or parsing will yield incorrect results</li>
532 </ul>
533 </td>
534 </tr>
535 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">int defining the number of reachable commits</p>
536 </td>
537 </tr>
538 </tbody>
539 </table>
540 </dd></dl>
541
542 <dl class="classmethod">
543 <dt id="git.objects.commit.Commit.create_from_tree">
544 <em class="property">classmethod </em><code class="descname">create_from_tree</code><span class="sig-paren">(</span><em>repo</em>, <em>tree</em>, <em>message</em>, <em>parent_commits=None</em>, <em>head=False</em>, <em>author=None</em>, <em>committer=None</em>, <em>author_date=None</em>, <em>commit_date=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.commit.Commit.create_from_tree" title="Permalink to this definition">¶</a></dt>
545 <dd><p>Commit the given tree, creating a commit object.</p>
546 <table class="docutils field-list" frame="void" rules="none">
547 <col class="field-name" />
548 <col class="field-body" />
549 <tbody valign="top">
550 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
551 <li><strong>repo</strong> &#8211; Repo object the commit should be part of</li>
552 <li><strong>tree</strong> &#8211; Tree object or hex or bin sha
553 the tree of the new commit</li>
554 <li><strong>message</strong> &#8211; Commit message. It may be an empty string if no message is provided.
555 It will be converted to a string in any case.</li>
556 <li><strong>parent_commits</strong> &#8211; Optional Commit objects to use as parents for the new commit.
557 If empty list, the commit will have no parents at all and become
558 a root commit.
559 If None , the current head commit will be the parent of the
560 new commit object</li>
561 <li><strong>head</strong> &#8211; If True, the HEAD will be advanced to the new commit automatically.
562 Else the HEAD will remain pointing on the previous commit. This could
563 lead to undesired results when diffing files.</li>
564 <li><strong>author</strong> &#8211; The name of the author, optional. If unset, the repository
565 configuration is used to obtain this value.</li>
566 <li><strong>committer</strong> &#8211; The name of the committer, optional. If unset, the
567 repository configuration is used to obtain this value.</li>
568 <li><strong>author_date</strong> &#8211; The timestamp for the author field</li>
569 <li><strong>commit_date</strong> &#8211; The timestamp for the committer field</li>
570 </ul>
571 </td>
572 </tr>
573 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Commit object representing the new commit</p>
574 </td>
575 </tr>
576 <tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body"><p class="first last">Additional information about the committer and Author are taken from the
577 environment or from the git configuration, see git-commit-tree for
578 more information</p>
579 </td>
580 </tr>
581 </tbody>
582 </table>
583 </dd></dl>
584
585 <dl class="attribute">
586 <dt id="git.objects.commit.Commit.default_encoding">
587 <code class="descname">default_encoding</code><em class="property"> = 'UTF-8'</em><a class="headerlink" href="#git.objects.commit.Commit.default_encoding" title="Permalink to this definition">¶</a></dt>
588 <dd></dd></dl>
589
590 <dl class="attribute">
591 <dt id="git.objects.commit.Commit.encoding">
592 <code class="descname">encoding</code><a class="headerlink" href="#git.objects.commit.Commit.encoding" title="Permalink to this definition">¶</a></dt>
593 <dd></dd></dl>
594
595 <dl class="attribute">
596 <dt id="git.objects.commit.Commit.env_author_date">
597 <code class="descname">env_author_date</code><em class="property"> = 'GIT_AUTHOR_DATE'</em><a class="headerlink" href="#git.objects.commit.Commit.env_author_date" title="Permalink to this definition">¶</a></dt>
598 <dd></dd></dl>
599
600 <dl class="attribute">
601 <dt id="git.objects.commit.Commit.env_committer_date">
602 <code class="descname">env_committer_date</code><em class="property"> = 'GIT_COMMITTER_DATE'</em><a class="headerlink" href="#git.objects.commit.Commit.env_committer_date" title="Permalink to this definition">¶</a></dt>
603 <dd></dd></dl>
604
605 <dl class="attribute">
606 <dt id="git.objects.commit.Commit.gpgsig">
607 <code class="descname">gpgsig</code><a class="headerlink" href="#git.objects.commit.Commit.gpgsig" title="Permalink to this definition">¶</a></dt>
608 <dd></dd></dl>
609
610 <dl class="classmethod">
611 <dt id="git.objects.commit.Commit.iter_items">
612 <em class="property">classmethod </em><code class="descname">iter_items</code><span class="sig-paren">(</span><em>repo</em>, <em>rev</em>, <em>paths=''</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.commit.Commit.iter_items" title="Permalink to this definition">¶</a></dt>
613 <dd><p>Find all commits matching the given criteria.</p>
614 <table class="docutils field-list" frame="void" rules="none">
615 <col class="field-name" />
616 <col class="field-body" />
617 <tbody valign="top">
618 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
619 <li><strong>repo</strong> &#8211; is the Repo</li>
620 <li><strong>rev</strong> &#8211; revision specifier, see git-rev-parse for viable options</li>
621 <li><strong>paths</strong> &#8211; is an optinal path or list of paths, if set only Commits that include the path
622 or paths will be considered</li>
623 <li><strong>kwargs</strong> &#8211; optional keyword arguments to git rev-list where
624 <code class="docutils literal"><span class="pre">max_count</span></code> is the maximum number of commits to fetch
625 <code class="docutils literal"><span class="pre">skip</span></code> is the number of commits to skip
626 <code class="docutils literal"><span class="pre">since</span></code> all commits since i.e. &#8216;1970-01-01&#8217;</li>
627 </ul>
628 </td>
629 </tr>
630 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">iterator yielding Commit items</p>
631 </td>
632 </tr>
633 </tbody>
634 </table>
635 </dd></dl>
636
637 <dl class="method">
638 <dt id="git.objects.commit.Commit.iter_parents">
639 <code class="descname">iter_parents</code><span class="sig-paren">(</span><em>paths=''</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.commit.Commit.iter_parents" title="Permalink to this definition">¶</a></dt>
640 <dd><p>Iterate _all_ parents of this commit.</p>
641 <table class="docutils field-list" frame="void" rules="none">
642 <col class="field-name" />
643 <col class="field-body" />
644 <tbody valign="top">
645 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
646 <li><strong>paths</strong> &#8211; Optional path or list of paths limiting the Commits to those that
647 contain at least one of the paths</li>
648 <li><strong>kwargs</strong> &#8211; All arguments allowed by git-rev-list</li>
649 </ul>
650 </td>
651 </tr>
652 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Iterator yielding Commit objects which are parents of self</p>
653 </td>
654 </tr>
655 </tbody>
656 </table>
657 </dd></dl>
658
659 <dl class="attribute">
660 <dt id="git.objects.commit.Commit.message">
661 <code class="descname">message</code><a class="headerlink" href="#git.objects.commit.Commit.message" title="Permalink to this definition">¶</a></dt>
662 <dd></dd></dl>
663
664 <dl class="attribute">
665 <dt id="git.objects.commit.Commit.name_rev">
666 <code class="descname">name_rev</code><a class="headerlink" href="#git.objects.commit.Commit.name_rev" title="Permalink to this definition">¶</a></dt>
667 <dd><table class="docutils field-list" frame="void" rules="none">
668 <col class="field-name" />
669 <col class="field-body" />
670 <tbody valign="top">
671 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">String describing the commits hex sha based on the closest Reference.
672 Mostly useful for UI purposes</td>
673 </tr>
674 </tbody>
675 </table>
676 </dd></dl>
677
678 <dl class="attribute">
679 <dt id="git.objects.commit.Commit.parents">
680 <code class="descname">parents</code><a class="headerlink" href="#git.objects.commit.Commit.parents" title="Permalink to this definition">¶</a></dt>
681 <dd></dd></dl>
682
683 <dl class="attribute">
684 <dt id="git.objects.commit.Commit.stats">
685 <code class="descname">stats</code><a class="headerlink" href="#git.objects.commit.Commit.stats" title="Permalink to this definition">¶</a></dt>
686 <dd><p>Create a git stat from changes between this commit and its first parent
687 or from all changes done if this is the very first commit.</p>
688 <table class="docutils field-list" frame="void" rules="none">
689 <col class="field-name" />
690 <col class="field-body" />
691 <tbody valign="top">
692 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">git.Stats</td>
693 </tr>
694 </tbody>
695 </table>
696 </dd></dl>
697
698 <dl class="attribute">
699 <dt id="git.objects.commit.Commit.summary">
700 <code class="descname">summary</code><a class="headerlink" href="#git.objects.commit.Commit.summary" title="Permalink to this definition">¶</a></dt>
701 <dd><table class="docutils field-list" frame="void" rules="none">
702 <col class="field-name" />
703 <col class="field-body" />
704 <tbody valign="top">
705 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">First line of the commit message</td>
706 </tr>
707 </tbody>
708 </table>
709 </dd></dl>
710
711 <dl class="attribute">
712 <dt id="git.objects.commit.Commit.tree">
713 <code class="descname">tree</code><a class="headerlink" href="#git.objects.commit.Commit.tree" title="Permalink to this definition">¶</a></dt>
714 <dd></dd></dl>
715
716 <dl class="attribute">
717 <dt id="git.objects.commit.Commit.type">
718 <code class="descname">type</code><em class="property"> = 'commit'</em><a class="headerlink" href="#git.objects.commit.Commit.type" title="Permalink to this definition">¶</a></dt>
719 <dd></dd></dl>
720
721 </dd></dl>
722
723 </div>
724 <div class="section" id="module-git.objects.tag">
725 <span id="objects-tag"></span><h2>Objects.Tag<a class="headerlink" href="#module-git.objects.tag" title="Permalink to this headline">¶</a></h2>
726 <p>Module containing all object based types.</p>
727 <dl class="class">
728 <dt id="git.objects.tag.TagObject">
729 <em class="property">class </em><code class="descclassname">git.objects.tag.</code><code class="descname">TagObject</code><span class="sig-paren">(</span><em>repo</em>, <em>binsha</em>, <em>object=None</em>, <em>tag=None</em>, <em>tagger=None</em>, <em>tagged_date=None</em>, <em>tagger_tz_offset=None</em>, <em>message=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tag.TagObject" title="Permalink to this definition">¶</a></dt>
730 <dd><p>Non-Lightweight tag carrying additional information about an object we are pointing to.</p>
731 <dl class="method">
732 <dt id="git.objects.tag.TagObject.__init__">
733 <code class="descname">__init__</code><span class="sig-paren">(</span><em>repo</em>, <em>binsha</em>, <em>object=None</em>, <em>tag=None</em>, <em>tagger=None</em>, <em>tagged_date=None</em>, <em>tagger_tz_offset=None</em>, <em>message=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tag.TagObject.__init__" title="Permalink to this definition">¶</a></dt>
734 <dd><p>Initialize a tag object with additional data</p>
735 <table class="docutils field-list" frame="void" rules="none">
736 <col class="field-name" />
737 <col class="field-body" />
738 <tbody valign="top">
739 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
740 <li><strong>repo</strong> &#8211; repository this object is located in</li>
741 <li><strong>binsha</strong> &#8211; 20 byte SHA1</li>
742 <li><strong>object</strong> &#8211; Object instance of object we are pointing to</li>
743 <li><strong>tag</strong> &#8211; name of this tag</li>
744 <li><strong>tagger</strong> &#8211; Actor identifying the tagger</li>
745 <li><strong>tagged_date</strong> &#8211; int_seconds_since_epoch
746 is the DateTime of the tag creation - use time.gmtime to convert
747 it into a different format</li>
748 <li><strong>tagged_tz_offset</strong> &#8211; int_seconds_west_of_utc is the timezone that the
749 authored_date is in, in a format similar to time.altzone</li>
750 </ul>
751 </td>
752 </tr>
753 </tbody>
754 </table>
755 </dd></dl>
756
757 <dl class="attribute">
758 <dt id="git.objects.tag.TagObject.__module__">
759 <code class="descname">__module__</code><em class="property"> = 'git.objects.tag'</em><a class="headerlink" href="#git.objects.tag.TagObject.__module__" title="Permalink to this definition">¶</a></dt>
760 <dd></dd></dl>
761
762 <dl class="attribute">
763 <dt id="git.objects.tag.TagObject.__slots__">
764 <code class="descname">__slots__</code><em class="property"> = ('object', 'tag', 'tagger', 'tagged_date', 'tagger_tz_offset', 'message')</em><a class="headerlink" href="#git.objects.tag.TagObject.__slots__" title="Permalink to this definition">¶</a></dt>
765 <dd></dd></dl>
766
767 <dl class="attribute">
768 <dt id="git.objects.tag.TagObject.message">
769 <code class="descname">message</code><a class="headerlink" href="#git.objects.tag.TagObject.message" title="Permalink to this definition">¶</a></dt>
770 <dd></dd></dl>
771
772 <dl class="attribute">
773 <dt id="git.objects.tag.TagObject.object">
774 <code class="descname">object</code><a class="headerlink" href="#git.objects.tag.TagObject.object" title="Permalink to this definition">¶</a></dt>
775 <dd></dd></dl>
776
777 <dl class="attribute">
778 <dt id="git.objects.tag.TagObject.tag">
779 <code class="descname">tag</code><a class="headerlink" href="#git.objects.tag.TagObject.tag" title="Permalink to this definition">¶</a></dt>
780 <dd></dd></dl>
781
782 <dl class="attribute">
783 <dt id="git.objects.tag.TagObject.tagged_date">
784 <code class="descname">tagged_date</code><a class="headerlink" href="#git.objects.tag.TagObject.tagged_date" title="Permalink to this definition">¶</a></dt>
785 <dd></dd></dl>
786
787 <dl class="attribute">
788 <dt id="git.objects.tag.TagObject.tagger">
789 <code class="descname">tagger</code><a class="headerlink" href="#git.objects.tag.TagObject.tagger" title="Permalink to this definition">¶</a></dt>
790 <dd></dd></dl>
791
792 <dl class="attribute">
793 <dt id="git.objects.tag.TagObject.tagger_tz_offset">
794 <code class="descname">tagger_tz_offset</code><a class="headerlink" href="#git.objects.tag.TagObject.tagger_tz_offset" title="Permalink to this definition">¶</a></dt>
795 <dd></dd></dl>
796
797 <dl class="attribute">
798 <dt id="git.objects.tag.TagObject.type">
799 <code class="descname">type</code><em class="property"> = 'tag'</em><a class="headerlink" href="#git.objects.tag.TagObject.type" title="Permalink to this definition">¶</a></dt>
800 <dd></dd></dl>
801
802 </dd></dl>
803
804 </div>
805 <div class="section" id="module-git.objects.tree">
806 <span id="objects-tree"></span><h2>Objects.Tree<a class="headerlink" href="#module-git.objects.tree" title="Permalink to this headline">¶</a></h2>
807 <dl class="class">
808 <dt id="git.objects.tree.TreeModifier">
809 <em class="property">class </em><code class="descclassname">git.objects.tree.</code><code class="descname">TreeModifier</code><span class="sig-paren">(</span><em>cache</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tree.TreeModifier" title="Permalink to this definition">¶</a></dt>
810 <dd><p>A utility class providing methods to alter the underlying cache in a list-like fashion.</p>
811 <p>Once all adjustments are complete, the _cache, which really is a refernce to
812 the cache of a tree, will be sorted. Assuring it will be in a serializable state</p>
813 <dl class="method">
814 <dt id="git.objects.tree.TreeModifier.__delitem__">
815 <code class="descname">__delitem__</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tree.TreeModifier.__delitem__" title="Permalink to this definition">¶</a></dt>
816 <dd><p>Deletes an item with the given name if it exists</p>
817 </dd></dl>
818
819 <dl class="method">
820 <dt id="git.objects.tree.TreeModifier.__init__">
821 <code class="descname">__init__</code><span class="sig-paren">(</span><em>cache</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tree.TreeModifier.__init__" title="Permalink to this definition">¶</a></dt>
822 <dd></dd></dl>
823
824 <dl class="attribute">
825 <dt id="git.objects.tree.TreeModifier.__module__">
826 <code class="descname">__module__</code><em class="property"> = 'git.objects.tree'</em><a class="headerlink" href="#git.objects.tree.TreeModifier.__module__" title="Permalink to this definition">¶</a></dt>
827 <dd></dd></dl>
828
829 <dl class="attribute">
830 <dt id="git.objects.tree.TreeModifier.__slots__">
831 <code class="descname">__slots__</code><em class="property"> = '_cache'</em><a class="headerlink" href="#git.objects.tree.TreeModifier.__slots__" title="Permalink to this definition">¶</a></dt>
832 <dd></dd></dl>
833
834 <dl class="method">
835 <dt id="git.objects.tree.TreeModifier.add">
836 <code class="descname">add</code><span class="sig-paren">(</span><em>sha</em>, <em>mode</em>, <em>name</em>, <em>force=False</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tree.TreeModifier.add" title="Permalink to this definition">¶</a></dt>
837 <dd><p>Add the given item to the tree. If an item with the given name already
838 exists, nothing will be done, but a ValueError will be raised if the
839 sha and mode of the existing item do not match the one you add, unless
840 force is True</p>
841 <table class="docutils field-list" frame="void" rules="none">
842 <col class="field-name" />
843 <col class="field-body" />
844 <tbody valign="top">
845 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
846 <li><strong>sha</strong> &#8211; The 20 or 40 byte sha of the item to add</li>
847 <li><strong>mode</strong> &#8211; int representing the stat compatible mode of the item</li>
848 <li><strong>force</strong> &#8211; If True, an item with your name and information will overwrite
849 any existing item with the same name, no matter which information it has</li>
850 </ul>
851 </td>
852 </tr>
853 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">self</p>
854 </td>
855 </tr>
856 </tbody>
857 </table>
858 </dd></dl>
859
860 <dl class="method">
861 <dt id="git.objects.tree.TreeModifier.add_unchecked">
862 <code class="descname">add_unchecked</code><span class="sig-paren">(</span><em>binsha</em>, <em>mode</em>, <em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tree.TreeModifier.add_unchecked" title="Permalink to this definition">¶</a></dt>
863 <dd><p>Add the given item to the tree, its correctness is assumed, which
864 puts the caller into responsibility to assure the input is correct.
865 For more information on the parameters, see <code class="docutils literal"><span class="pre">add</span></code>
866 :param binsha: 20 byte binary sha</p>
867 </dd></dl>
868
869 <dl class="method">
870 <dt id="git.objects.tree.TreeModifier.set_done">
871 <code class="descname">set_done</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tree.TreeModifier.set_done" title="Permalink to this definition">¶</a></dt>
872 <dd><p>Call this method once you are done modifying the tree information.
873 It may be called several times, but be aware that each call will cause
874 a sort operation
875 :return self:</p>
876 </dd></dl>
877
878 </dd></dl>
879
880 <dl class="class">
881 <dt id="git.objects.tree.Tree">
882 <em class="property">class </em><code class="descclassname">git.objects.tree.</code><code class="descname">Tree</code><span class="sig-paren">(</span><em>repo</em>, <em>binsha</em>, <em>mode=16384</em>, <em>path=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tree.Tree" title="Permalink to this definition">¶</a></dt>
883 <dd><p>Tree objects represent an ordered list of Blobs and other Trees.</p>
884 <p><code class="docutils literal"><span class="pre">Tree</span> <span class="pre">as</span> <span class="pre">a</span> <span class="pre">list</span></code>:</p>
885 <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Access</span> <span class="n">a</span> <span class="n">specific</span> <span class="n">blob</span> <span class="n">using</span> <span class="n">the</span>
886 <span class="n">tree</span><span class="p">[</span><span class="s1">&#39;filename&#39;</span><span class="p">]</span> <span class="n">notation</span><span class="o">.</span>
887
888 <span class="n">You</span> <span class="n">may</span> <span class="k">as</span> <span class="n">well</span> <span class="n">access</span> <span class="n">by</span> <span class="n">index</span>
889 <span class="n">blob</span> <span class="o">=</span> <span class="n">tree</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
890 </pre></div>
891 </div>
892 <dl class="method">
893 <dt id="git.objects.tree.Tree.__contains__">
894 <code class="descname">__contains__</code><span class="sig-paren">(</span><em>item</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tree.Tree.__contains__" title="Permalink to this definition">¶</a></dt>
895 <dd></dd></dl>
896
897 <dl class="method">
898 <dt id="git.objects.tree.Tree.__div__">
899 <code class="descname">__div__</code><span class="sig-paren">(</span><em>file</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tree.Tree.__div__" title="Permalink to this definition">¶</a></dt>
900 <dd><p>For PY2 only</p>
901 </dd></dl>
902
903 <dl class="method">
904 <dt id="git.objects.tree.Tree.__getitem__">
905 <code class="descname">__getitem__</code><span class="sig-paren">(</span><em>item</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tree.Tree.__getitem__" title="Permalink to this definition">¶</a></dt>
906 <dd></dd></dl>
907
908 <dl class="method">
909 <dt id="git.objects.tree.Tree.__getslice__">
910 <code class="descname">__getslice__</code><span class="sig-paren">(</span><em>i</em>, <em>j</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tree.Tree.__getslice__" title="Permalink to this definition">¶</a></dt>
911 <dd></dd></dl>
912
913 <dl class="method">
914 <dt id="git.objects.tree.Tree.__init__">
915 <code class="descname">__init__</code><span class="sig-paren">(</span><em>repo</em>, <em>binsha</em>, <em>mode=16384</em>, <em>path=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tree.Tree.__init__" title="Permalink to this definition">¶</a></dt>
916 <dd></dd></dl>
917
918 <dl class="method">
919 <dt id="git.objects.tree.Tree.__iter__">
920 <code class="descname">__iter__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tree.Tree.__iter__" title="Permalink to this definition">¶</a></dt>
921 <dd></dd></dl>
922
923 <dl class="method">
924 <dt id="git.objects.tree.Tree.__len__">
925 <code class="descname">__len__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tree.Tree.__len__" title="Permalink to this definition">¶</a></dt>
926 <dd></dd></dl>
927
928 <dl class="attribute">
929 <dt id="git.objects.tree.Tree.__module__">
930 <code class="descname">__module__</code><em class="property"> = 'git.objects.tree'</em><a class="headerlink" href="#git.objects.tree.Tree.__module__" title="Permalink to this definition">¶</a></dt>
931 <dd></dd></dl>
932
933 <dl class="method">
934 <dt id="git.objects.tree.Tree.__reversed__">
935 <code class="descname">__reversed__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tree.Tree.__reversed__" title="Permalink to this definition">¶</a></dt>
936 <dd></dd></dl>
937
938 <dl class="attribute">
939 <dt id="git.objects.tree.Tree.__slots__">
940 <code class="descname">__slots__</code><em class="property"> = '_cache'</em><a class="headerlink" href="#git.objects.tree.Tree.__slots__" title="Permalink to this definition">¶</a></dt>
941 <dd></dd></dl>
942
943 <dl class="method">
944 <dt id="git.objects.tree.Tree.__truediv__">
945 <code class="descname">__truediv__</code><span class="sig-paren">(</span><em>file</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tree.Tree.__truediv__" title="Permalink to this definition">¶</a></dt>
946 <dd><p>For PY3 only</p>
947 </dd></dl>
948
949 <dl class="attribute">
950 <dt id="git.objects.tree.Tree.blob_id">
951 <code class="descname">blob_id</code><em class="property"> = 8</em><a class="headerlink" href="#git.objects.tree.Tree.blob_id" title="Permalink to this definition">¶</a></dt>
952 <dd></dd></dl>
953
954 <dl class="attribute">
955 <dt id="git.objects.tree.Tree.blobs">
956 <code class="descname">blobs</code><a class="headerlink" href="#git.objects.tree.Tree.blobs" title="Permalink to this definition">¶</a></dt>
957 <dd><table class="docutils field-list" frame="void" rules="none">
958 <col class="field-name" />
959 <col class="field-body" />
960 <tbody valign="top">
961 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">list(Blob, ...) list of blobs directly below this tree</td>
962 </tr>
963 </tbody>
964 </table>
965 </dd></dl>
966
967 <dl class="attribute">
968 <dt id="git.objects.tree.Tree.cache">
969 <code class="descname">cache</code><a class="headerlink" href="#git.objects.tree.Tree.cache" title="Permalink to this definition">¶</a></dt>
970 <dd><table class="docutils field-list" frame="void" rules="none">
971 <col class="field-name" />
972 <col class="field-body" />
973 <tbody valign="top">
974 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">An object allowing to modify the internal cache. This can be used
975 to change the tree&#8217;s contents. When done, make sure you call <code class="docutils literal"><span class="pre">set_done</span></code>
976 on the tree modifier, or serialization behaviour will be incorrect.
977 See the <code class="docutils literal"><span class="pre">TreeModifier</span></code> for more information on how to alter the cache</td>
978 </tr>
979 </tbody>
980 </table>
981 </dd></dl>
982
983 <dl class="attribute">
984 <dt id="git.objects.tree.Tree.commit_id">
985 <code class="descname">commit_id</code><em class="property"> = 14</em><a class="headerlink" href="#git.objects.tree.Tree.commit_id" title="Permalink to this definition">¶</a></dt>
986 <dd></dd></dl>
987
988 <dl class="method">
989 <dt id="git.objects.tree.Tree.join">
990 <code class="descname">join</code><span class="sig-paren">(</span><em>file</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tree.Tree.join" title="Permalink to this definition">¶</a></dt>
991 <dd><p>Find the named object in this tree&#8217;s contents
992 :return: <code class="docutils literal"><span class="pre">git.Blob</span></code> or <code class="docutils literal"><span class="pre">git.Tree</span></code> or <code class="docutils literal"><span class="pre">git.Submodule</span></code></p>
993 <table class="docutils field-list" frame="void" rules="none">
994 <col class="field-name" />
995 <col class="field-body" />
996 <tbody valign="top">
997 <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><strong>KeyError</strong> &#8211; if given file or tree does not exist in tree</td>
998 </tr>
999 </tbody>
1000 </table>
1001 </dd></dl>
1002
1003 <dl class="attribute">
1004 <dt id="git.objects.tree.Tree.symlink_id">
1005 <code class="descname">symlink_id</code><em class="property"> = 10</em><a class="headerlink" href="#git.objects.tree.Tree.symlink_id" title="Permalink to this definition">¶</a></dt>
1006 <dd></dd></dl>
1007
1008 <dl class="method">
1009 <dt id="git.objects.tree.Tree.traverse">
1010 <code class="descname">traverse</code><span class="sig-paren">(</span><em>predicate=&lt;function &lt;lambda&gt;&gt;</em>, <em>prune=&lt;function &lt;lambda&gt;&gt;</em>, <em>depth=-1</em>, <em>branch_first=True</em>, <em>visit_once=False</em>, <em>ignore_self=1</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.tree.Tree.traverse" title="Permalink to this definition">¶</a></dt>
1011 <dd><p>For documentation, see util.Traversable.traverse
1012 Trees are set to visit_once = False to gain more performance in the traversal</p>
1013 </dd></dl>
1014
1015 <dl class="attribute">
1016 <dt id="git.objects.tree.Tree.tree_id">
1017 <code class="descname">tree_id</code><em class="property"> = 4</em><a class="headerlink" href="#git.objects.tree.Tree.tree_id" title="Permalink to this definition">¶</a></dt>
1018 <dd></dd></dl>
1019
1020 <dl class="attribute">
1021 <dt id="git.objects.tree.Tree.trees">
1022 <code class="descname">trees</code><a class="headerlink" href="#git.objects.tree.Tree.trees" title="Permalink to this definition">¶</a></dt>
1023 <dd><table class="docutils field-list" frame="void" rules="none">
1024 <col class="field-name" />
1025 <col class="field-body" />
1026 <tbody valign="top">
1027 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">list(Tree, ...) list of trees directly below this tree</td>
1028 </tr>
1029 </tbody>
1030 </table>
1031 </dd></dl>
1032
1033 <dl class="attribute">
1034 <dt id="git.objects.tree.Tree.type">
1035 <code class="descname">type</code><em class="property"> = 'tree'</em><a class="headerlink" href="#git.objects.tree.Tree.type" title="Permalink to this definition">¶</a></dt>
1036 <dd></dd></dl>
1037
1038 </dd></dl>
1039
1040 </div>
1041 <div class="section" id="module-git.objects.fun">
1042 <span id="objects-functions"></span><h2>Objects.Functions<a class="headerlink" href="#module-git.objects.fun" title="Permalink to this headline">¶</a></h2>
1043 <p>Module with functions which are supposed to be as fast as possible</p>
1044 <dl class="function">
1045 <dt id="git.objects.fun.tree_to_stream">
1046 <code class="descclassname">git.objects.fun.</code><code class="descname">tree_to_stream</code><span class="sig-paren">(</span><em>entries</em>, <em>write</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.fun.tree_to_stream" title="Permalink to this definition">¶</a></dt>
1047 <dd><p>Write the give list of entries into a stream using its write method
1048 :param entries: <strong>sorted</strong> list of tuples with (binsha, mode, name)
1049 :param write: write method which takes a data string</p>
1050 </dd></dl>
1051
1052 <dl class="function">
1053 <dt id="git.objects.fun.tree_entries_from_data">
1054 <code class="descclassname">git.objects.fun.</code><code class="descname">tree_entries_from_data</code><span class="sig-paren">(</span><em>data</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.fun.tree_entries_from_data" title="Permalink to this definition">¶</a></dt>
1055 <dd><p>Reads the binary representation of a tree and returns tuples of Tree items
1056 :param data: data block with tree data (as bytes)
1057 :return: list(tuple(binsha, mode, tree_relative_path), ...)</p>
1058 </dd></dl>
1059
1060 <dl class="function">
1061 <dt id="git.objects.fun.traverse_trees_recursive">
1062 <code class="descclassname">git.objects.fun.</code><code class="descname">traverse_trees_recursive</code><span class="sig-paren">(</span><em>odb</em>, <em>tree_shas</em>, <em>path_prefix</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.fun.traverse_trees_recursive" title="Permalink to this definition">¶</a></dt>
1063 <dd><table class="docutils field-list" frame="void" rules="none">
1064 <col class="field-name" />
1065 <col class="field-body" />
1066 <tbody valign="top">
1067 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">list with entries according to the given binary tree-shas.
1068 The result is encoded in a list
1069 of n tuple|None per blob/commit, (n == len(tree_shas)), where
1070 * [0] == 20 byte sha
1071 * [1] == mode as int
1072 * [2] == path relative to working tree root
1073 The entry tuple is None if the respective blob/commit did not
1074 exist in the given tree.</p>
1075 </td>
1076 </tr>
1077 <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
1078 <li><strong>tree_shas</strong> &#8211; iterable of shas pointing to trees. All trees must
1079 be on the same level. A tree-sha may be None in which case None</li>
1080 <li><strong>path_prefix</strong> &#8211; a prefix to be added to the returned paths on this level,
1081 set it &#8216;&#8217; for the first iteration</li>
1082 </ul>
1083 </td>
1084 </tr>
1085 <tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body"><p class="first last">The ordering of the returned items will be partially lost</p>
1086 </td>
1087 </tr>
1088 </tbody>
1089 </table>
1090 </dd></dl>
1091
1092 <dl class="function">
1093 <dt id="git.objects.fun.traverse_tree_recursive">
1094 <code class="descclassname">git.objects.fun.</code><code class="descname">traverse_tree_recursive</code><span class="sig-paren">(</span><em>odb</em>, <em>tree_sha</em>, <em>path_prefix</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.fun.traverse_tree_recursive" title="Permalink to this definition">¶</a></dt>
1095 <dd><table class="docutils field-list" frame="void" rules="none">
1096 <col class="field-name" />
1097 <col class="field-body" />
1098 <tbody valign="top">
1099 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">list of entries of the tree pointed to by the binary tree_sha. An entry
1100 has the following format:
1101 * [0] 20 byte sha
1102 * [1] mode as int
1103 * [2] path relative to the repository</td>
1104 </tr>
1105 <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>path_prefix</strong> &#8211; prefix to prepend to the front of all returned paths</td>
1106 </tr>
1107 </tbody>
1108 </table>
1109 </dd></dl>
1110
1111 </div>
1112 <div class="section" id="module-git.objects.submodule.base">
1113 <span id="objects-submodule-base"></span><h2>Objects.Submodule.base<a class="headerlink" href="#module-git.objects.submodule.base" title="Permalink to this headline">¶</a></h2>
1114 <dl class="class">
1115 <dt id="git.objects.submodule.base.Submodule">
1116 <em class="property">class </em><code class="descclassname">git.objects.submodule.base.</code><code class="descname">Submodule</code><span class="sig-paren">(</span><em>repo</em>, <em>binsha</em>, <em>mode=None</em>, <em>path=None</em>, <em>name=None</em>, <em>parent_commit=None</em>, <em>url=None</em>, <em>branch_path=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule" title="Permalink to this definition">¶</a></dt>
1117 <dd><p>Implements access to a git submodule. They are special in that their sha
1118 represents a commit in the submodule&#8217;s repository which is to be checked out
1119 at the path of this instance.
1120 The submodule type does not have a string type associated with it, as it exists
1121 solely as a marker in the tree and index.</p>
1122 <p>All methods work in bare and non-bare repositories.</p>
1123 <dl class="method">
1124 <dt id="git.objects.submodule.base.Submodule.__eq__">
1125 <code class="descname">__eq__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.__eq__" title="Permalink to this definition">¶</a></dt>
1126 <dd><p>Compare with another submodule</p>
1127 </dd></dl>
1128
1129 <dl class="method">
1130 <dt id="git.objects.submodule.base.Submodule.__hash__">
1131 <code class="descname">__hash__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.__hash__" title="Permalink to this definition">¶</a></dt>
1132 <dd><p>Hash this instance using its logical id, not the sha</p>
1133 </dd></dl>
1134
1135 <dl class="method">
1136 <dt id="git.objects.submodule.base.Submodule.__init__">
1137 <code class="descname">__init__</code><span class="sig-paren">(</span><em>repo</em>, <em>binsha</em>, <em>mode=None</em>, <em>path=None</em>, <em>name=None</em>, <em>parent_commit=None</em>, <em>url=None</em>, <em>branch_path=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.__init__" title="Permalink to this definition">¶</a></dt>
1138 <dd><p>Initialize this instance with its attributes. We only document the ones
1139 that differ from <code class="docutils literal"><span class="pre">IndexObject</span></code></p>
1140 <table class="docutils field-list" frame="void" rules="none">
1141 <col class="field-name" />
1142 <col class="field-body" />
1143 <tbody valign="top">
1144 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
1145 <li><strong>repo</strong> &#8211; Our parent repository</li>
1146 <li><strong>binsha</strong> &#8211; binary sha referring to a commit in the remote repository, see url parameter</li>
1147 <li><strong>parent_commit</strong> &#8211; see set_parent_commit()</li>
1148 <li><strong>url</strong> &#8211; The url to the remote repository which is the submodule</li>
1149 <li><strong>branch_path</strong> &#8211; full (relative) path to ref to checkout when cloning the remote repository</li>
1150 </ul>
1151 </td>
1152 </tr>
1153 </tbody>
1154 </table>
1155 </dd></dl>
1156
1157 <dl class="attribute">
1158 <dt id="git.objects.submodule.base.Submodule.__module__">
1159 <code class="descname">__module__</code><em class="property"> = 'git.objects.submodule.base'</em><a class="headerlink" href="#git.objects.submodule.base.Submodule.__module__" title="Permalink to this definition">¶</a></dt>
1160 <dd></dd></dl>
1161
1162 <dl class="method">
1163 <dt id="git.objects.submodule.base.Submodule.__ne__">
1164 <code class="descname">__ne__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.__ne__" title="Permalink to this definition">¶</a></dt>
1165 <dd><p>Compare with another submodule for inequality</p>
1166 </dd></dl>
1167
1168 <dl class="method">
1169 <dt id="git.objects.submodule.base.Submodule.__repr__">
1170 <code class="descname">__repr__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.__repr__" title="Permalink to this definition">¶</a></dt>
1171 <dd></dd></dl>
1172
1173 <dl class="attribute">
1174 <dt id="git.objects.submodule.base.Submodule.__slots__">
1175 <code class="descname">__slots__</code><em class="property"> = ('_parent_commit', '_url', '_branch_path', '_name', '__weakref__')</em><a class="headerlink" href="#git.objects.submodule.base.Submodule.__slots__" title="Permalink to this definition">¶</a></dt>
1176 <dd></dd></dl>
1177
1178 <dl class="method">
1179 <dt id="git.objects.submodule.base.Submodule.__str__">
1180 <code class="descname">__str__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.__str__" title="Permalink to this definition">¶</a></dt>
1181 <dd></dd></dl>
1182
1183 <dl class="attribute">
1184 <dt id="git.objects.submodule.base.Submodule.__weakref__">
1185 <code class="descname">__weakref__</code><a class="headerlink" href="#git.objects.submodule.base.Submodule.__weakref__" title="Permalink to this definition">¶</a></dt>
1186 <dd><p>list of weak references to the object (if defined)</p>
1187 </dd></dl>
1188
1189 <dl class="classmethod">
1190 <dt id="git.objects.submodule.base.Submodule.add">
1191 <em class="property">classmethod </em><code class="descname">add</code><span class="sig-paren">(</span><em>repo</em>, <em>name</em>, <em>path</em>, <em>url=None</em>, <em>branch=None</em>, <em>no_checkout=False</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.add" title="Permalink to this definition">¶</a></dt>
1192 <dd><p>Add a new submodule to the given repository. This will alter the index
1193 as well as the .gitmodules file, but will not create a new commit.
1194 If the submodule already exists, no matter if the configuration differs
1195 from the one provided, the existing submodule will be returned.</p>
1196 <table class="docutils field-list" frame="void" rules="none">
1197 <col class="field-name" />
1198 <col class="field-body" />
1199 <tbody valign="top">
1200 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
1201 <li><strong>repo</strong> &#8211; Repository instance which should receive the submodule</li>
1202 <li><strong>name</strong> &#8211; The name/identifier for the submodule</li>
1203 <li><strong>path</strong> &#8211; repository-relative or absolute path at which the submodule
1204 should be located
1205 It will be created as required during the repository initialization.</li>
1206 <li><strong>url</strong> &#8211; git-clone compatible URL, see git-clone reference for more information
1207 If None, the repository is assumed to exist, and the url of the first
1208 remote is taken instead. This is useful if you want to make an existing
1209 repository a submodule of anotherone.</li>
1210 <li><strong>branch</strong> &#8211; name of branch at which the submodule should (later) be checked out.
1211 The given branch must exist in the remote repository, and will be checked
1212 out locally as a tracking branch.
1213 It will only be written into the configuration if it not None, which is
1214 when the checked out branch will be the one the remote HEAD pointed to.
1215 The result you get in these situation is somewhat fuzzy, and it is recommended
1216 to specify at least &#8216;master&#8217; here.
1217 Examples are &#8216;master&#8217; or &#8216;feature/new&#8217;</li>
1218 <li><strong>no_checkout</strong> &#8211; if True, and if the repository has to be cloned manually,
1219 no checkout will be performed</li>
1220 </ul>
1221 </td>
1222 </tr>
1223 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The newly created submodule instance</p>
1224 </td>
1225 </tr>
1226 <tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body"><p class="first last">works atomically, such that no change will be done if the repository
1227 update fails for instance</p>
1228 </td>
1229 </tr>
1230 </tbody>
1231 </table>
1232 </dd></dl>
1233
1234 <dl class="attribute">
1235 <dt id="git.objects.submodule.base.Submodule.branch">
1236 <code class="descname">branch</code><a class="headerlink" href="#git.objects.submodule.base.Submodule.branch" title="Permalink to this definition">¶</a></dt>
1237 <dd><table class="docutils field-list" frame="void" rules="none">
1238 <col class="field-name" />
1239 <col class="field-body" />
1240 <tbody valign="top">
1241 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The branch instance that we are to checkout</td>
1242 </tr>
1243 <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><strong>InvalidGitRepositoryError</strong> &#8211; if our module is not yet checked out</td>
1244 </tr>
1245 </tbody>
1246 </table>
1247 </dd></dl>
1248
1249 <dl class="attribute">
1250 <dt id="git.objects.submodule.base.Submodule.branch_name">
1251 <code class="descname">branch_name</code><a class="headerlink" href="#git.objects.submodule.base.Submodule.branch_name" title="Permalink to this definition">¶</a></dt>
1252 <dd><table class="docutils field-list" frame="void" rules="none">
1253 <col class="field-name" />
1254 <col class="field-body" />
1255 <tbody valign="top">
1256 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">the name of the branch, which is the shortest possible branch name</td>
1257 </tr>
1258 </tbody>
1259 </table>
1260 </dd></dl>
1261
1262 <dl class="attribute">
1263 <dt id="git.objects.submodule.base.Submodule.branch_path">
1264 <code class="descname">branch_path</code><a class="headerlink" href="#git.objects.submodule.base.Submodule.branch_path" title="Permalink to this definition">¶</a></dt>
1265 <dd><table class="docutils field-list" frame="void" rules="none">
1266 <col class="field-name" />
1267 <col class="field-body" />
1268 <tbody valign="top">
1269 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">full (relative) path as string to the branch we would checkout
1270 from the remote and track</td>
1271 </tr>
1272 </tbody>
1273 </table>
1274 </dd></dl>
1275
1276 <dl class="method">
1277 <dt id="git.objects.submodule.base.Submodule.children">
1278 <code class="descname">children</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.children" title="Permalink to this definition">¶</a></dt>
1279 <dd><table class="docutils field-list" frame="void" rules="none">
1280 <col class="field-name" />
1281 <col class="field-body" />
1282 <tbody valign="top">
1283 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">IterableList(Submodule, ...) an iterable list of submodules instances
1284 which are children of this submodule or 0 if the submodule is not checked out</td>
1285 </tr>
1286 </tbody>
1287 </table>
1288 </dd></dl>
1289
1290 <dl class="method">
1291 <dt id="git.objects.submodule.base.Submodule.config_reader">
1292 <code class="descname">config_reader</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.config_reader" title="Permalink to this definition">¶</a></dt>
1293 <dd><table class="docutils field-list" frame="void" rules="none">
1294 <col class="field-name" />
1295 <col class="field-body" />
1296 <tbody valign="top">
1297 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">ConfigReader instance which allows you to qurey the configuration values
1298 of this submodule, as provided by the .gitmodules file</td>
1299 </tr>
1300 <tr class="field-even field"><th class="field-name">Note:</th><td class="field-body">The config reader will actually read the data directly from the repository
1301 and thus does not need nor care about your working tree.</td>
1302 </tr>
1303 <tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">Should be cached by the caller and only kept as long as needed</td>
1304 </tr>
1305 <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><strong>IOError</strong> &#8211; If the .gitmodules file/blob could not be read</td>
1306 </tr>
1307 </tbody>
1308 </table>
1309 </dd></dl>
1310
1311 <dl class="method">
1312 <dt id="git.objects.submodule.base.Submodule.config_writer">
1313 <code class="descname">config_writer</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.config_writer" title="Permalink to this definition">¶</a></dt>
1314 <dd></dd></dl>
1315
1316 <dl class="method">
1317 <dt id="git.objects.submodule.base.Submodule.exists">
1318 <code class="descname">exists</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.exists" title="Permalink to this definition">¶</a></dt>
1319 <dd><table class="docutils field-list" frame="void" rules="none">
1320 <col class="field-name" />
1321 <col class="field-body" />
1322 <tbody valign="top">
1323 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True if the submodule exists, False otherwise. Please note that
1324 a submodule may exist (in the .gitmodules file) even though its module
1325 doesn&#8217;t exist on disk</td>
1326 </tr>
1327 </tbody>
1328 </table>
1329 </dd></dl>
1330
1331 <dl class="classmethod">
1332 <dt id="git.objects.submodule.base.Submodule.iter_items">
1333 <em class="property">classmethod </em><code class="descname">iter_items</code><span class="sig-paren">(</span><em>repo</em>, <em>parent_commit='HEAD'</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.iter_items" title="Permalink to this definition">¶</a></dt>
1334 <dd><table class="docutils field-list" frame="void" rules="none">
1335 <col class="field-name" />
1336 <col class="field-body" />
1337 <tbody valign="top">
1338 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">iterator yielding Submodule instances available in the given repository</td>
1339 </tr>
1340 </tbody>
1341 </table>
1342 </dd></dl>
1343
1344 <dl class="attribute">
1345 <dt id="git.objects.submodule.base.Submodule.k_default_mode">
1346 <code class="descname">k_default_mode</code><em class="property"> = 57344</em><a class="headerlink" href="#git.objects.submodule.base.Submodule.k_default_mode" title="Permalink to this definition">¶</a></dt>
1347 <dd></dd></dl>
1348
1349 <dl class="attribute">
1350 <dt id="git.objects.submodule.base.Submodule.k_head_default">
1351 <code class="descname">k_head_default</code><em class="property"> = 'master'</em><a class="headerlink" href="#git.objects.submodule.base.Submodule.k_head_default" title="Permalink to this definition">¶</a></dt>
1352 <dd></dd></dl>
1353
1354 <dl class="attribute">
1355 <dt id="git.objects.submodule.base.Submodule.k_head_option">
1356 <code class="descname">k_head_option</code><em class="property"> = 'branch'</em><a class="headerlink" href="#git.objects.submodule.base.Submodule.k_head_option" title="Permalink to this definition">¶</a></dt>
1357 <dd></dd></dl>
1358
1359 <dl class="attribute">
1360 <dt id="git.objects.submodule.base.Submodule.k_modules_file">
1361 <code class="descname">k_modules_file</code><em class="property"> = '.gitmodules'</em><a class="headerlink" href="#git.objects.submodule.base.Submodule.k_modules_file" title="Permalink to this definition">¶</a></dt>
1362 <dd></dd></dl>
1363
1364 <dl class="method">
1365 <dt id="git.objects.submodule.base.Submodule.module">
1366 <code class="descname">module</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.module" title="Permalink to this definition">¶</a></dt>
1367 <dd></dd></dl>
1368
1369 <dl class="method">
1370 <dt id="git.objects.submodule.base.Submodule.module_exists">
1371 <code class="descname">module_exists</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.module_exists" title="Permalink to this definition">¶</a></dt>
1372 <dd><table class="docutils field-list" frame="void" rules="none">
1373 <col class="field-name" />
1374 <col class="field-body" />
1375 <tbody valign="top">
1376 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True if our module exists and is a valid git repository. See module() method</td>
1377 </tr>
1378 </tbody>
1379 </table>
1380 </dd></dl>
1381
1382 <dl class="method">
1383 <dt id="git.objects.submodule.base.Submodule.move">
1384 <code class="descname">move</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.move" title="Permalink to this definition">¶</a></dt>
1385 <dd></dd></dl>
1386
1387 <dl class="attribute">
1388 <dt id="git.objects.submodule.base.Submodule.name">
1389 <code class="descname">name</code><a class="headerlink" href="#git.objects.submodule.base.Submodule.name" title="Permalink to this definition">¶</a></dt>
1390 <dd><table class="docutils field-list" frame="void" rules="none">
1391 <col class="field-name" />
1392 <col class="field-body" />
1393 <tbody valign="top">
1394 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The name of this submodule. It is used to identify it within the
1395 .gitmodules file.</td>
1396 </tr>
1397 <tr class="field-even field"><th class="field-name">Note:</th><td class="field-body">by default, the name is the path at which to find the submodule, but
1398 in git-python it should be a unique identifier similar to the identifiers
1399 used for remotes, which allows to change the path of the submodule
1400 easily</td>
1401 </tr>
1402 </tbody>
1403 </table>
1404 </dd></dl>
1405
1406 <dl class="attribute">
1407 <dt id="git.objects.submodule.base.Submodule.parent_commit">
1408 <code class="descname">parent_commit</code><a class="headerlink" href="#git.objects.submodule.base.Submodule.parent_commit" title="Permalink to this definition">¶</a></dt>
1409 <dd><table class="docutils field-list" frame="void" rules="none">
1410 <col class="field-name" />
1411 <col class="field-body" />
1412 <tbody valign="top">
1413 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Commit instance with the tree containing the .gitmodules file</td>
1414 </tr>
1415 <tr class="field-even field"><th class="field-name">Note:</th><td class="field-body">will always point to the current head&#8217;s commit if it was not set explicitly</td>
1416 </tr>
1417 </tbody>
1418 </table>
1419 </dd></dl>
1420
1421 <dl class="method">
1422 <dt id="git.objects.submodule.base.Submodule.remove">
1423 <code class="descname">remove</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.remove" title="Permalink to this definition">¶</a></dt>
1424 <dd></dd></dl>
1425
1426 <dl class="method">
1427 <dt id="git.objects.submodule.base.Submodule.rename">
1428 <code class="descname">rename</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.rename" title="Permalink to this definition">¶</a></dt>
1429 <dd></dd></dl>
1430
1431 <dl class="method">
1432 <dt id="git.objects.submodule.base.Submodule.set_parent_commit">
1433 <code class="descname">set_parent_commit</code><span class="sig-paren">(</span><em>commit</em>, <em>check=True</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.set_parent_commit" title="Permalink to this definition">¶</a></dt>
1434 <dd><p>Set this instance to use the given commit whose tree is supposed to
1435 contain the .gitmodules blob.</p>
1436 <table class="docutils field-list" frame="void" rules="none">
1437 <col class="field-name" />
1438 <col class="field-body" />
1439 <tbody valign="top">
1440 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
1441 <li><strong>commit</strong> &#8211; Commit&#8217;ish reference pointing at the root_tree, or None to always point to the
1442 most recent commit</li>
1443 <li><strong>check</strong> &#8211; if True, relatively expensive checks will be performed to verify
1444 validity of the submodule.</li>
1445 </ul>
1446 </td>
1447 </tr>
1448 <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first simple">
1449 <li><strong>ValueError</strong> &#8211; if the commit&#8217;s tree didn&#8217;t contain the .gitmodules blob.</li>
1450 <li><strong>ValueError</strong> &#8211; if the parent commit didn&#8217;t store this submodule under the current path</li>
1451 </ul>
1452 </td>
1453 </tr>
1454 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">self</p>
1455 </td>
1456 </tr>
1457 </tbody>
1458 </table>
1459 </dd></dl>
1460
1461 <dl class="attribute">
1462 <dt id="git.objects.submodule.base.Submodule.type">
1463 <code class="descname">type</code><em class="property"> = 'submodule'</em><a class="headerlink" href="#git.objects.submodule.base.Submodule.type" title="Permalink to this definition">¶</a></dt>
1464 <dd></dd></dl>
1465
1466 <dl class="method">
1467 <dt id="git.objects.submodule.base.Submodule.update">
1468 <code class="descname">update</code><span class="sig-paren">(</span><em>recursive=False</em>, <em>init=True</em>, <em>to_latest_revision=False</em>, <em>progress=None</em>, <em>dry_run=False</em>, <em>force=False</em>, <em>keep_going=False</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.base.Submodule.update" title="Permalink to this definition">¶</a></dt>
1469 <dd><p>Update the repository of this submodule to point to the checkout
1470 we point at with the binsha of this instance.</p>
1471 <table class="docutils field-list" frame="void" rules="none">
1472 <col class="field-name" />
1473 <col class="field-body" />
1474 <tbody valign="top">
1475 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
1476 <li><strong>recursive</strong> &#8211; if True, we will operate recursively and update child-
1477 modules as well.</li>
1478 <li><strong>init</strong> &#8211; if True, the module repository will be cloned into place if necessary</li>
1479 <li><strong>to_latest_revision</strong> &#8211; if True, the submodule&#8217;s sha will be ignored during checkout.
1480 Instead, the remote will be fetched, and the local tracking branch updated.
1481 This only works if we have a local tracking branch, which is the case
1482 if the remote repository had a master branch, or of the &#8216;branch&#8217; option
1483 was specified for this submodule and the branch existed remotely</li>
1484 <li><strong>progress</strong> &#8211; UpdateProgress instance or None if no progress should be shown</li>
1485 <li><strong>dry_run</strong> &#8211; if True, the operation will only be simulated, but not performed.
1486 All performed operations are read-only</li>
1487 <li><strong>force</strong> &#8211; If True, we may reset heads even if the repository in question is dirty. Additinoally we will be allowed
1488 to set a tracking branch which is ahead of its remote branch back into the past or the location of the
1489 remote branch. This will essentially &#8216;forget&#8217; commits.
1490 If False, local tracking branches that are in the future of their respective remote branches will simply
1491 not be moved.</li>
1492 <li><strong>keep_going</strong> &#8211; if True, we will ignore but log all errors, and keep going recursively.
1493 Unless dry_run is set as well, keep_going could cause subsequent/inherited errors you wouldn&#8217;t see
1494 otherwise.
1495 In conjunction with dry_run, it can be useful to anticipate all errors when updating submodules</li>
1496 </ul>
1497 </td>
1498 </tr>
1499 <tr class="field-even field"><th class="field-name">Note:</th><td class="field-body"><p class="first">does nothing in bare repositories</p>
1500 </td>
1501 </tr>
1502 <tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body"><p class="first">method is definitely not atomic if recurisve is True</p>
1503 </td>
1504 </tr>
1505 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">self</p>
1506 </td>
1507 </tr>
1508 </tbody>
1509 </table>
1510 </dd></dl>
1511
1512 <dl class="attribute">
1513 <dt id="git.objects.submodule.base.Submodule.url">
1514 <code class="descname">url</code><a class="headerlink" href="#git.objects.submodule.base.Submodule.url" title="Permalink to this definition">¶</a></dt>
1515 <dd><table class="docutils field-list" frame="void" rules="none">
1516 <col class="field-name" />
1517 <col class="field-body" />
1518 <tbody valign="top">
1519 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The url to the repository which our module-repository refers to</td>
1520 </tr>
1521 </tbody>
1522 </table>
1523 </dd></dl>
1524
1525 </dd></dl>
1526
1527 <dl class="class">
1528 <dt id="git.objects.submodule.base.UpdateProgress">
1529 <em class="property">class </em><code class="descclassname">git.objects.submodule.base.</code><code class="descname">UpdateProgress</code><a class="headerlink" href="#git.objects.submodule.base.UpdateProgress" title="Permalink to this definition">¶</a></dt>
1530 <dd><p>Class providing detailed progress information to the caller who should
1531 derive from it and implement the <code class="docutils literal"><span class="pre">update(...)</span></code> message</p>
1532 <dl class="attribute">
1533 <dt id="git.objects.submodule.base.UpdateProgress.CLONE">
1534 <code class="descname">CLONE</code><em class="property"> = 512</em><a class="headerlink" href="#git.objects.submodule.base.UpdateProgress.CLONE" title="Permalink to this definition">¶</a></dt>
1535 <dd></dd></dl>
1536
1537 <dl class="attribute">
1538 <dt id="git.objects.submodule.base.UpdateProgress.FETCH">
1539 <code class="descname">FETCH</code><em class="property"> = 1024</em><a class="headerlink" href="#git.objects.submodule.base.UpdateProgress.FETCH" title="Permalink to this definition">¶</a></dt>
1540 <dd></dd></dl>
1541
1542 <dl class="attribute">
1543 <dt id="git.objects.submodule.base.UpdateProgress.UPDWKTREE">
1544 <code class="descname">UPDWKTREE</code><em class="property"> = 2048</em><a class="headerlink" href="#git.objects.submodule.base.UpdateProgress.UPDWKTREE" title="Permalink to this definition">¶</a></dt>
1545 <dd></dd></dl>
1546
1547 <dl class="attribute">
1548 <dt id="git.objects.submodule.base.UpdateProgress.__module__">
1549 <code class="descname">__module__</code><em class="property"> = 'git.objects.submodule.base'</em><a class="headerlink" href="#git.objects.submodule.base.UpdateProgress.__module__" title="Permalink to this definition">¶</a></dt>
1550 <dd></dd></dl>
1551
1552 <dl class="attribute">
1553 <dt id="git.objects.submodule.base.UpdateProgress.__slots__">
1554 <code class="descname">__slots__</code><em class="property"> = ()</em><a class="headerlink" href="#git.objects.submodule.base.UpdateProgress.__slots__" title="Permalink to this definition">¶</a></dt>
1555 <dd></dd></dl>
1556
1557 <dl class="attribute">
1558 <dt id="git.objects.submodule.base.UpdateProgress.x">
1559 <code class="descname">x</code><em class="property"> = 11</em><a class="headerlink" href="#git.objects.submodule.base.UpdateProgress.x" title="Permalink to this definition">¶</a></dt>
1560 <dd></dd></dl>
1561
1562 </dd></dl>
1563
1564 </div>
1565 <div class="section" id="module-git.objects.submodule.root">
1566 <span id="objects-submodule-root"></span><h2>Objects.Submodule.root<a class="headerlink" href="#module-git.objects.submodule.root" title="Permalink to this headline">¶</a></h2>
1567 <dl class="class">
1568 <dt id="git.objects.submodule.root.RootModule">
1569 <em class="property">class </em><code class="descclassname">git.objects.submodule.root.</code><code class="descname">RootModule</code><span class="sig-paren">(</span><em>repo</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.root.RootModule" title="Permalink to this definition">¶</a></dt>
1570 <dd><p>A (virtual) Root of all submodules in the given repository. It can be used
1571 to more easily traverse all submodules of the master repository</p>
1572 <dl class="method">
1573 <dt id="git.objects.submodule.root.RootModule.__init__">
1574 <code class="descname">__init__</code><span class="sig-paren">(</span><em>repo</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.root.RootModule.__init__" title="Permalink to this definition">¶</a></dt>
1575 <dd></dd></dl>
1576
1577 <dl class="attribute">
1578 <dt id="git.objects.submodule.root.RootModule.__module__">
1579 <code class="descname">__module__</code><em class="property"> = 'git.objects.submodule.root'</em><a class="headerlink" href="#git.objects.submodule.root.RootModule.__module__" title="Permalink to this definition">¶</a></dt>
1580 <dd></dd></dl>
1581
1582 <dl class="attribute">
1583 <dt id="git.objects.submodule.root.RootModule.__slots__">
1584 <code class="descname">__slots__</code><em class="property"> = ()</em><a class="headerlink" href="#git.objects.submodule.root.RootModule.__slots__" title="Permalink to this definition">¶</a></dt>
1585 <dd></dd></dl>
1586
1587 <dl class="attribute">
1588 <dt id="git.objects.submodule.root.RootModule.k_root_name">
1589 <code class="descname">k_root_name</code><em class="property"> = '__ROOT__'</em><a class="headerlink" href="#git.objects.submodule.root.RootModule.k_root_name" title="Permalink to this definition">¶</a></dt>
1590 <dd></dd></dl>
1591
1592 <dl class="method">
1593 <dt id="git.objects.submodule.root.RootModule.module">
1594 <code class="descname">module</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.root.RootModule.module" title="Permalink to this definition">¶</a></dt>
1595 <dd><table class="docutils field-list" frame="void" rules="none">
1596 <col class="field-name" />
1597 <col class="field-body" />
1598 <tbody valign="top">
1599 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">the actual repository containing the submodules</td>
1600 </tr>
1601 </tbody>
1602 </table>
1603 </dd></dl>
1604
1605 <dl class="method">
1606 <dt id="git.objects.submodule.root.RootModule.update">
1607 <code class="descname">update</code><span class="sig-paren">(</span><em>previous_commit=None</em>, <em>recursive=True</em>, <em>force_remove=False</em>, <em>init=True</em>, <em>to_latest_revision=False</em>, <em>progress=None</em>, <em>dry_run=False</em>, <em>force_reset=False</em>, <em>keep_going=False</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.root.RootModule.update" title="Permalink to this definition">¶</a></dt>
1608 <dd><p>Update the submodules of this repository to the current HEAD commit.
1609 This method behaves smartly by determining changes of the path of a submodules
1610 repository, next to changes to the to-be-checked-out commit or the branch to be
1611 checked out. This works if the submodules ID does not change.
1612 Additionally it will detect addition and removal of submodules, which will be handled
1613 gracefully.</p>
1614 <table class="docutils field-list" frame="void" rules="none">
1615 <col class="field-name" />
1616 <col class="field-body" />
1617 <tbody valign="top">
1618 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
1619 <li><strong>previous_commit</strong> &#8211; If set to a commit&#8217;ish, the commit we should use
1620 as the previous commit the HEAD pointed to before it was set to the commit it points to now.
1621 If None, it defaults to <a class="reference external" href="mailto:HEAD&#37;&#52;&#48;{1">HEAD<span>&#64;</span>{1</a>} otherwise</li>
1622 <li><strong>recursive</strong> &#8211; if True, the children of submodules will be updated as well
1623 using the same technique</li>
1624 <li><strong>force_remove</strong> &#8211; If submodules have been deleted, they will be forcibly removed.
1625 Otherwise the update may fail if a submodule&#8217;s repository cannot be deleted as
1626 changes have been made to it (see Submodule.update() for more information)</li>
1627 <li><strong>init</strong> &#8211; If we encounter a new module which would need to be initialized, then do it.</li>
1628 <li><strong>to_latest_revision</strong> &#8211; If True, instead of checking out the revision pointed to
1629 by this submodule&#8217;s sha, the checked out tracking branch will be merged with the
1630 latest remote branch fetched from the repository&#8217;s origin.
1631 Unless force_reset is specified, a local tracking branch will never be reset into its past, therefore
1632 the remote branch must be in the future for this to have an effect.</li>
1633 <li><strong>force_reset</strong> &#8211; if True, submodules may checkout or reset their branch even if the repository has
1634 pending changes that would be overwritten, or if the local tracking branch is in the future of the
1635 remote tracking branch and would be reset into its past.</li>
1636 <li><strong>progress</strong> &#8211; RootUpdateProgress instance or None if no progress should be sent</li>
1637 <li><strong>dry_run</strong> &#8211; if True, operations will not actually be performed. Progress messages
1638 will change accordingly to indicate the WOULD DO state of the operation.</li>
1639 <li><strong>keep_going</strong> &#8211; if True, we will ignore but log all errors, and keep going recursively.
1640 Unless dry_run is set as well, keep_going could cause subsequent/inherited errors you wouldn&#8217;t see
1641 otherwise.
1642 In conjunction with dry_run, it can be useful to anticipate all errors when updating submodules</li>
1643 </ul>
1644 </td>
1645 </tr>
1646 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">self</p>
1647 </td>
1648 </tr>
1649 </tbody>
1650 </table>
1651 </dd></dl>
1652
1653 </dd></dl>
1654
1655 <dl class="class">
1656 <dt id="git.objects.submodule.root.RootUpdateProgress">
1657 <em class="property">class </em><code class="descclassname">git.objects.submodule.root.</code><code class="descname">RootUpdateProgress</code><a class="headerlink" href="#git.objects.submodule.root.RootUpdateProgress" title="Permalink to this definition">¶</a></dt>
1658 <dd><p>Utility class which adds more opcodes to the UpdateProgress</p>
1659 <dl class="attribute">
1660 <dt id="git.objects.submodule.root.RootUpdateProgress.BRANCHCHANGE">
1661 <code class="descname">BRANCHCHANGE</code><em class="property"> = 16384</em><a class="headerlink" href="#git.objects.submodule.root.RootUpdateProgress.BRANCHCHANGE" title="Permalink to this definition">¶</a></dt>
1662 <dd></dd></dl>
1663
1664 <dl class="attribute">
1665 <dt id="git.objects.submodule.root.RootUpdateProgress.PATHCHANGE">
1666 <code class="descname">PATHCHANGE</code><em class="property"> = 8192</em><a class="headerlink" href="#git.objects.submodule.root.RootUpdateProgress.PATHCHANGE" title="Permalink to this definition">¶</a></dt>
1667 <dd></dd></dl>
1668
1669 <dl class="attribute">
1670 <dt id="git.objects.submodule.root.RootUpdateProgress.REMOVE">
1671 <code class="descname">REMOVE</code><em class="property"> = 4096</em><a class="headerlink" href="#git.objects.submodule.root.RootUpdateProgress.REMOVE" title="Permalink to this definition">¶</a></dt>
1672 <dd></dd></dl>
1673
1674 <dl class="attribute">
1675 <dt id="git.objects.submodule.root.RootUpdateProgress.URLCHANGE">
1676 <code class="descname">URLCHANGE</code><em class="property"> = 32768</em><a class="headerlink" href="#git.objects.submodule.root.RootUpdateProgress.URLCHANGE" title="Permalink to this definition">¶</a></dt>
1677 <dd></dd></dl>
1678
1679 <dl class="attribute">
1680 <dt id="git.objects.submodule.root.RootUpdateProgress.__module__">
1681 <code class="descname">__module__</code><em class="property"> = 'git.objects.submodule.root'</em><a class="headerlink" href="#git.objects.submodule.root.RootUpdateProgress.__module__" title="Permalink to this definition">¶</a></dt>
1682 <dd></dd></dl>
1683
1684 <dl class="attribute">
1685 <dt id="git.objects.submodule.root.RootUpdateProgress.__slots__">
1686 <code class="descname">__slots__</code><em class="property"> = ()</em><a class="headerlink" href="#git.objects.submodule.root.RootUpdateProgress.__slots__" title="Permalink to this definition">¶</a></dt>
1687 <dd></dd></dl>
1688
1689 <dl class="attribute">
1690 <dt id="git.objects.submodule.root.RootUpdateProgress.x">
1691 <code class="descname">x</code><em class="property"> = 15</em><a class="headerlink" href="#git.objects.submodule.root.RootUpdateProgress.x" title="Permalink to this definition">¶</a></dt>
1692 <dd></dd></dl>
1693
1694 </dd></dl>
1695
1696 </div>
1697 <div class="section" id="module-git.objects.submodule.util">
1698 <span id="objects-submodule-util"></span><h2>Objects.Submodule.util<a class="headerlink" href="#module-git.objects.submodule.util" title="Permalink to this headline">¶</a></h2>
1699 <dl class="function">
1700 <dt id="git.objects.submodule.util.sm_section">
1701 <code class="descclassname">git.objects.submodule.util.</code><code class="descname">sm_section</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.util.sm_section" title="Permalink to this definition">¶</a></dt>
1702 <dd><table class="docutils field-list" frame="void" rules="none">
1703 <col class="field-name" />
1704 <col class="field-body" />
1705 <tbody valign="top">
1706 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">section title used in .gitmodules configuration file</td>
1707 </tr>
1708 </tbody>
1709 </table>
1710 </dd></dl>
1711
1712 <dl class="function">
1713 <dt id="git.objects.submodule.util.sm_name">
1714 <code class="descclassname">git.objects.submodule.util.</code><code class="descname">sm_name</code><span class="sig-paren">(</span><em>section</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.util.sm_name" title="Permalink to this definition">¶</a></dt>
1715 <dd><table class="docutils field-list" frame="void" rules="none">
1716 <col class="field-name" />
1717 <col class="field-body" />
1718 <tbody valign="top">
1719 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">name of the submodule as parsed from the section name</td>
1720 </tr>
1721 </tbody>
1722 </table>
1723 </dd></dl>
1724
1725 <dl class="function">
1726 <dt id="git.objects.submodule.util.mkhead">
1727 <code class="descclassname">git.objects.submodule.util.</code><code class="descname">mkhead</code><span class="sig-paren">(</span><em>repo</em>, <em>path</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.util.mkhead" title="Permalink to this definition">¶</a></dt>
1728 <dd><table class="docutils field-list" frame="void" rules="none">
1729 <col class="field-name" />
1730 <col class="field-body" />
1731 <tbody valign="top">
1732 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">New branch/head instance</td>
1733 </tr>
1734 </tbody>
1735 </table>
1736 </dd></dl>
1737
1738 <dl class="function">
1739 <dt id="git.objects.submodule.util.find_first_remote_branch">
1740 <code class="descclassname">git.objects.submodule.util.</code><code class="descname">find_first_remote_branch</code><span class="sig-paren">(</span><em>remotes</em>, <em>branch_name</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.util.find_first_remote_branch" title="Permalink to this definition">¶</a></dt>
1741 <dd><p>Find the remote branch matching the name of the given branch or raise InvalidGitRepositoryError</p>
1742 </dd></dl>
1743
1744 <dl class="class">
1745 <dt id="git.objects.submodule.util.SubmoduleConfigParser">
1746 <em class="property">class </em><code class="descclassname">git.objects.submodule.util.</code><code class="descname">SubmoduleConfigParser</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.util.SubmoduleConfigParser" title="Permalink to this definition">¶</a></dt>
1747 <dd><p>Catches calls to _write, and updates the .gitmodules blob in the index
1748 with the new data, if we have written into a stream. Otherwise it will
1749 add the local file to the index to make it correspond with the working tree.
1750 Additionally, the cache must be cleared</p>
1751 <p>Please note that no mutating method will work in bare mode</p>
1752 <dl class="attribute">
1753 <dt id="git.objects.submodule.util.SubmoduleConfigParser.__abstractmethods__">
1754 <code class="descname">__abstractmethods__</code><em class="property"> = frozenset([])</em><a class="headerlink" href="#git.objects.submodule.util.SubmoduleConfigParser.__abstractmethods__" title="Permalink to this definition">¶</a></dt>
1755 <dd></dd></dl>
1756
1757 <dl class="method">
1758 <dt id="git.objects.submodule.util.SubmoduleConfigParser.__init__">
1759 <code class="descname">__init__</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.util.SubmoduleConfigParser.__init__" title="Permalink to this definition">¶</a></dt>
1760 <dd></dd></dl>
1761
1762 <dl class="attribute">
1763 <dt id="git.objects.submodule.util.SubmoduleConfigParser.__module__">
1764 <code class="descname">__module__</code><em class="property"> = 'git.objects.submodule.util'</em><a class="headerlink" href="#git.objects.submodule.util.SubmoduleConfigParser.__module__" title="Permalink to this definition">¶</a></dt>
1765 <dd></dd></dl>
1766
1767 <dl class="method">
1768 <dt id="git.objects.submodule.util.SubmoduleConfigParser.flush_to_index">
1769 <code class="descname">flush_to_index</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.util.SubmoduleConfigParser.flush_to_index" title="Permalink to this definition">¶</a></dt>
1770 <dd><p>Flush changes in our configuration file to the index</p>
1771 </dd></dl>
1772
1773 <dl class="method">
1774 <dt id="git.objects.submodule.util.SubmoduleConfigParser.set_submodule">
1775 <code class="descname">set_submodule</code><span class="sig-paren">(</span><em>submodule</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.util.SubmoduleConfigParser.set_submodule" title="Permalink to this definition">¶</a></dt>
1776 <dd><p>Set this instance&#8217;s submodule. It must be called before
1777 the first write operation begins</p>
1778 </dd></dl>
1779
1780 <dl class="method">
1781 <dt id="git.objects.submodule.util.SubmoduleConfigParser.write">
1782 <code class="descname">write</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.submodule.util.SubmoduleConfigParser.write" title="Permalink to this definition">¶</a></dt>
1783 <dd></dd></dl>
1784
1785 </dd></dl>
1786
1787 </div>
1788 <div class="section" id="module-git.objects.util">
1789 <span id="objects-util"></span><h2>Objects.Util<a class="headerlink" href="#module-git.objects.util" title="Permalink to this headline">¶</a></h2>
1790 <p>Module for general utility functions</p>
1791 <dl class="function">
1792 <dt id="git.objects.util.get_object_type_by_name">
1793 <code class="descclassname">git.objects.util.</code><code class="descname">get_object_type_by_name</code><span class="sig-paren">(</span><em>object_type_name</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.get_object_type_by_name" title="Permalink to this definition">¶</a></dt>
1794 <dd><table class="docutils field-list" frame="void" rules="none">
1795 <col class="field-name" />
1796 <col class="field-body" />
1797 <tbody valign="top">
1798 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">type suitable to handle the given object type name.
1799 Use the type to create new instances.</td>
1800 </tr>
1801 <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>object_type_name</strong> &#8211; Member of TYPES</td>
1802 </tr>
1803 <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><strong>ValueError</strong> &#8211; In case object_type_name is unknown</td>
1804 </tr>
1805 </tbody>
1806 </table>
1807 </dd></dl>
1808
1809 <dl class="function">
1810 <dt id="git.objects.util.parse_date">
1811 <code class="descclassname">git.objects.util.</code><code class="descname">parse_date</code><span class="sig-paren">(</span><em>string_date</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.parse_date" title="Permalink to this definition">¶</a></dt>
1812 <dd><p>Parse the given date as one of the following</p>
1813 <blockquote>
1814 <div><ul>
1815 <li><p class="first">Git internal format: timestamp offset</p>
1816 </li>
1817 <li><p class="first">RFC 2822: Thu, 07 Apr 2005 22:13:13 +0200.</p>
1818 </li>
1819 <li><dl class="first docutils">
1820 <dt>ISO 8601 2005-04-07T22:13:13</dt>
1821 <dd><p class="first last">The T can be a space as well</p>
1822 </dd>
1823 </dl>
1824 </li>
1825 </ul>
1826 </div></blockquote>
1827 <table class="docutils field-list" frame="void" rules="none">
1828 <col class="field-name" />
1829 <col class="field-body" />
1830 <tbody valign="top">
1831 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Tuple(int(timestamp_UTC), int(offset)), both in seconds since epoch</td>
1832 </tr>
1833 <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><strong>ValueError</strong> &#8211; If the format could not be understood</td>
1834 </tr>
1835 <tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">Date can also be YYYY.MM.DD, MM/DD/YYYY and DD.MM.YYYY.</td>
1836 </tr>
1837 </tbody>
1838 </table>
1839 </dd></dl>
1840
1841 <dl class="function">
1842 <dt id="git.objects.util.parse_actor_and_date">
1843 <code class="descclassname">git.objects.util.</code><code class="descname">parse_actor_and_date</code><span class="sig-paren">(</span><em>line</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.parse_actor_and_date" title="Permalink to this definition">¶</a></dt>
1844 <dd><p>Parse out the actor (author or committer) info from a line like:</p>
1845 <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">author</span> <span class="n">Tom</span> <span class="n">Preston</span><span class="o">-</span><span class="n">Werner</span> <span class="o">&lt;</span><span class="n">tom</span><span class="nd">@mojombo</span><span class="o">.</span><span class="n">com</span><span class="o">&gt;</span> <span class="mi">1191999972</span> <span class="o">-</span><span class="mi">0700</span>
1846 </pre></div>
1847 </div>
1848 <table class="docutils field-list" frame="void" rules="none">
1849 <col class="field-name" />
1850 <col class="field-body" />
1851 <tbody valign="top">
1852 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">[Actor, int_seconds_since_epoch, int_timezone_offset]</td>
1853 </tr>
1854 </tbody>
1855 </table>
1856 </dd></dl>
1857
1858 <dl class="class">
1859 <dt id="git.objects.util.ProcessStreamAdapter">
1860 <em class="property">class </em><code class="descclassname">git.objects.util.</code><code class="descname">ProcessStreamAdapter</code><span class="sig-paren">(</span><em>process</em>, <em>stream_name</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.ProcessStreamAdapter" title="Permalink to this definition">¶</a></dt>
1861 <dd><p>Class wireing all calls to the contained Process instance.</p>
1862 <p>Use this type to hide the underlying process to provide access only to a specified
1863 stream. The process is usually wrapped into an AutoInterrupt class to kill
1864 it if the instance goes out of scope.</p>
1865 <dl class="method">
1866 <dt id="git.objects.util.ProcessStreamAdapter.__getattr__">
1867 <code class="descname">__getattr__</code><span class="sig-paren">(</span><em>attr</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.ProcessStreamAdapter.__getattr__" title="Permalink to this definition">¶</a></dt>
1868 <dd></dd></dl>
1869
1870 <dl class="method">
1871 <dt id="git.objects.util.ProcessStreamAdapter.__init__">
1872 <code class="descname">__init__</code><span class="sig-paren">(</span><em>process</em>, <em>stream_name</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.ProcessStreamAdapter.__init__" title="Permalink to this definition">¶</a></dt>
1873 <dd></dd></dl>
1874
1875 <dl class="attribute">
1876 <dt id="git.objects.util.ProcessStreamAdapter.__module__">
1877 <code class="descname">__module__</code><em class="property"> = 'git.objects.util'</em><a class="headerlink" href="#git.objects.util.ProcessStreamAdapter.__module__" title="Permalink to this definition">¶</a></dt>
1878 <dd></dd></dl>
1879
1880 <dl class="attribute">
1881 <dt id="git.objects.util.ProcessStreamAdapter.__slots__">
1882 <code class="descname">__slots__</code><em class="property"> = ('_proc', '_stream')</em><a class="headerlink" href="#git.objects.util.ProcessStreamAdapter.__slots__" title="Permalink to this definition">¶</a></dt>
1883 <dd></dd></dl>
1884
1885 </dd></dl>
1886
1887 <dl class="class">
1888 <dt id="git.objects.util.Traversable">
1889 <em class="property">class </em><code class="descclassname">git.objects.util.</code><code class="descname">Traversable</code><a class="headerlink" href="#git.objects.util.Traversable" title="Permalink to this definition">¶</a></dt>
1890 <dd><p>Simple interface to perform depth-first or breadth-first traversals
1891 into one direction.
1892 Subclasses only need to implement one function.
1893 Instances of the Subclass must be hashable</p>
1894 <dl class="attribute">
1895 <dt id="git.objects.util.Traversable.__module__">
1896 <code class="descname">__module__</code><em class="property"> = 'git.objects.util'</em><a class="headerlink" href="#git.objects.util.Traversable.__module__" title="Permalink to this definition">¶</a></dt>
1897 <dd></dd></dl>
1898
1899 <dl class="attribute">
1900 <dt id="git.objects.util.Traversable.__slots__">
1901 <code class="descname">__slots__</code><em class="property"> = ()</em><a class="headerlink" href="#git.objects.util.Traversable.__slots__" title="Permalink to this definition">¶</a></dt>
1902 <dd></dd></dl>
1903
1904 <dl class="method">
1905 <dt id="git.objects.util.Traversable.list_traverse">
1906 <code class="descname">list_traverse</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.Traversable.list_traverse" title="Permalink to this definition">¶</a></dt>
1907 <dd><table class="docutils field-list" frame="void" rules="none">
1908 <col class="field-name" />
1909 <col class="field-body" />
1910 <tbody valign="top">
1911 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">IterableList with the results of the traversal as produced by
1912 traverse()</td>
1913 </tr>
1914 </tbody>
1915 </table>
1916 </dd></dl>
1917
1918 <dl class="method">
1919 <dt id="git.objects.util.Traversable.traverse">
1920 <code class="descname">traverse</code><span class="sig-paren">(</span><em>predicate=&lt;function &lt;lambda&gt;&gt;</em>, <em>prune=&lt;function &lt;lambda&gt;&gt;</em>, <em>depth=-1</em>, <em>branch_first=True</em>, <em>visit_once=True</em>, <em>ignore_self=1</em>, <em>as_edge=False</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.Traversable.traverse" title="Permalink to this definition">¶</a></dt>
1921 <dd><table class="docutils field-list" frame="void" rules="none">
1922 <col class="field-name" />
1923 <col class="field-body" />
1924 <tbody valign="top">
1925 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">iterator yieling of items found when traversing self</p>
1926 </td>
1927 </tr>
1928 <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
1929 <li><strong>predicate</strong> &#8211; f(i,d) returns False if item i at depth d should not be included in the result</li>
1930 <li><strong>prune</strong> &#8211; f(i,d) return True if the search should stop at item i at depth d.
1931 Item i will not be returned.</li>
1932 <li><strong>depth</strong> &#8211; define at which level the iteration should not go deeper
1933 if -1, there is no limit
1934 if 0, you would effectively only get self, the root of the iteration
1935 i.e. if 1, you would only get the first level of predessessors/successors</li>
1936 <li><strong>branch_first</strong> &#8211; if True, items will be returned branch first, otherwise depth first</li>
1937 <li><strong>visit_once</strong> &#8211; if True, items will only be returned once, although they might be encountered
1938 several times. Loops are prevented that way.</li>
1939 <li><strong>ignore_self</strong> &#8211; if True, self will be ignored and automatically pruned from
1940 the result. Otherwise it will be the first item to be returned.
1941 If as_edge is True, the source of the first edge is None</li>
1942 <li><strong>as_edge</strong> &#8211; if True, return a pair of items, first being the source, second the
1943 destinatination, i.e. tuple(src, dest) with the edge spanning from
1944 source to destination</li>
1945 </ul>
1946 </td>
1947 </tr>
1948 </tbody>
1949 </table>
1950 </dd></dl>
1951
1952 </dd></dl>
1953
1954 <dl class="function">
1955 <dt id="git.objects.util.altz_to_utctz_str">
1956 <code class="descclassname">git.objects.util.</code><code class="descname">altz_to_utctz_str</code><span class="sig-paren">(</span><em>altz</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.altz_to_utctz_str" title="Permalink to this definition">¶</a></dt>
1957 <dd><p>As above, but inverses the operation, returning a string that can be used
1958 in commit objects</p>
1959 </dd></dl>
1960
1961 <dl class="function">
1962 <dt id="git.objects.util.utctz_to_altz">
1963 <code class="descclassname">git.objects.util.</code><code class="descname">utctz_to_altz</code><span class="sig-paren">(</span><em>utctz</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.utctz_to_altz" title="Permalink to this definition">¶</a></dt>
1964 <dd><p>we convert utctz to the timezone in seconds, it is the format time.altzone
1965 returns. Git stores it as UTC timezone which has the opposite sign as well,
1966 which explains the -1 * ( that was made explicit here )
1967 :param utctz: git utc timezone string, i.e. +0200</p>
1968 </dd></dl>
1969
1970 <dl class="function">
1971 <dt id="git.objects.util.verify_utctz">
1972 <code class="descclassname">git.objects.util.</code><code class="descname">verify_utctz</code><span class="sig-paren">(</span><em>offset</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.verify_utctz" title="Permalink to this definition">¶</a></dt>
1973 <dd><table class="docutils field-list" frame="void" rules="none">
1974 <col class="field-name" />
1975 <col class="field-body" />
1976 <tbody valign="top">
1977 <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><strong>ValueError</strong> &#8211; if offset is incorrect</td>
1978 </tr>
1979 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">offset</td>
1980 </tr>
1981 </tbody>
1982 </table>
1983 </dd></dl>
1984
1985 <dl class="class">
1986 <dt id="git.objects.util.Actor">
1987 <em class="property">class </em><code class="descclassname">git.objects.util.</code><code class="descname">Actor</code><span class="sig-paren">(</span><em>name</em>, <em>email</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.Actor" title="Permalink to this definition">¶</a></dt>
1988 <dd><p>Actors hold information about a person acting on the repository. They
1989 can be committers and authors or anything with a name and an email as
1990 mentioned in the git log entries.</p>
1991 <dl class="method">
1992 <dt id="git.objects.util.Actor.__eq__">
1993 <code class="descname">__eq__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.Actor.__eq__" title="Permalink to this definition">¶</a></dt>
1994 <dd></dd></dl>
1995
1996 <dl class="method">
1997 <dt id="git.objects.util.Actor.__hash__">
1998 <code class="descname">__hash__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.Actor.__hash__" title="Permalink to this definition">¶</a></dt>
1999 <dd></dd></dl>
2000
2001 <dl class="method">
2002 <dt id="git.objects.util.Actor.__init__">
2003 <code class="descname">__init__</code><span class="sig-paren">(</span><em>name</em>, <em>email</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.Actor.__init__" title="Permalink to this definition">¶</a></dt>
2004 <dd></dd></dl>
2005
2006 <dl class="attribute">
2007 <dt id="git.objects.util.Actor.__module__">
2008 <code class="descname">__module__</code><em class="property"> = 'git.util'</em><a class="headerlink" href="#git.objects.util.Actor.__module__" title="Permalink to this definition">¶</a></dt>
2009 <dd></dd></dl>
2010
2011 <dl class="method">
2012 <dt id="git.objects.util.Actor.__ne__">
2013 <code class="descname">__ne__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.Actor.__ne__" title="Permalink to this definition">¶</a></dt>
2014 <dd></dd></dl>
2015
2016 <dl class="method">
2017 <dt id="git.objects.util.Actor.__repr__">
2018 <code class="descname">__repr__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.Actor.__repr__" title="Permalink to this definition">¶</a></dt>
2019 <dd></dd></dl>
2020
2021 <dl class="attribute">
2022 <dt id="git.objects.util.Actor.__slots__">
2023 <code class="descname">__slots__</code><em class="property"> = ('name', 'email')</em><a class="headerlink" href="#git.objects.util.Actor.__slots__" title="Permalink to this definition">¶</a></dt>
2024 <dd></dd></dl>
2025
2026 <dl class="method">
2027 <dt id="git.objects.util.Actor.__str__">
2028 <code class="descname">__str__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.Actor.__str__" title="Permalink to this definition">¶</a></dt>
2029 <dd></dd></dl>
2030
2031 <dl class="classmethod">
2032 <dt id="git.objects.util.Actor.author">
2033 <em class="property">classmethod </em><code class="descname">author</code><span class="sig-paren">(</span><em>config_reader=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.Actor.author" title="Permalink to this definition">¶</a></dt>
2034 <dd><p>Same as committer(), but defines the main author. It may be specified in the environment,
2035 but defaults to the committer</p>
2036 </dd></dl>
2037
2038 <dl class="classmethod">
2039 <dt id="git.objects.util.Actor.committer">
2040 <em class="property">classmethod </em><code class="descname">committer</code><span class="sig-paren">(</span><em>config_reader=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.Actor.committer" title="Permalink to this definition">¶</a></dt>
2041 <dd><table class="docutils field-list" frame="void" rules="none">
2042 <col class="field-name" />
2043 <col class="field-body" />
2044 <tbody valign="top">
2045 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Actor instance corresponding to the configured committer. It behaves
2046 similar to the git implementation, such that the environment will override
2047 configuration values of config_reader. If no value is set at all, it will be
2048 generated</td>
2049 </tr>
2050 <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>config_reader</strong> &#8211; ConfigReader to use to retrieve the values from in case
2051 they are not set in the environment</td>
2052 </tr>
2053 </tbody>
2054 </table>
2055 </dd></dl>
2056
2057 <dl class="attribute">
2058 <dt id="git.objects.util.Actor.conf_email">
2059 <code class="descname">conf_email</code><em class="property"> = 'email'</em><a class="headerlink" href="#git.objects.util.Actor.conf_email" title="Permalink to this definition">¶</a></dt>
2060 <dd></dd></dl>
2061
2062 <dl class="attribute">
2063 <dt id="git.objects.util.Actor.conf_name">
2064 <code class="descname">conf_name</code><em class="property"> = 'name'</em><a class="headerlink" href="#git.objects.util.Actor.conf_name" title="Permalink to this definition">¶</a></dt>
2065 <dd></dd></dl>
2066
2067 <dl class="attribute">
2068 <dt id="git.objects.util.Actor.email">
2069 <code class="descname">email</code><a class="headerlink" href="#git.objects.util.Actor.email" title="Permalink to this definition">¶</a></dt>
2070 <dd></dd></dl>
2071
2072 <dl class="attribute">
2073 <dt id="git.objects.util.Actor.env_author_email">
2074 <code class="descname">env_author_email</code><em class="property"> = 'GIT_AUTHOR_EMAIL'</em><a class="headerlink" href="#git.objects.util.Actor.env_author_email" title="Permalink to this definition">¶</a></dt>
2075 <dd></dd></dl>
2076
2077 <dl class="attribute">
2078 <dt id="git.objects.util.Actor.env_author_name">
2079 <code class="descname">env_author_name</code><em class="property"> = 'GIT_AUTHOR_NAME'</em><a class="headerlink" href="#git.objects.util.Actor.env_author_name" title="Permalink to this definition">¶</a></dt>
2080 <dd></dd></dl>
2081
2082 <dl class="attribute">
2083 <dt id="git.objects.util.Actor.env_committer_email">
2084 <code class="descname">env_committer_email</code><em class="property"> = 'GIT_COMMITTER_EMAIL'</em><a class="headerlink" href="#git.objects.util.Actor.env_committer_email" title="Permalink to this definition">¶</a></dt>
2085 <dd></dd></dl>
2086
2087 <dl class="attribute">
2088 <dt id="git.objects.util.Actor.env_committer_name">
2089 <code class="descname">env_committer_name</code><em class="property"> = 'GIT_COMMITTER_NAME'</em><a class="headerlink" href="#git.objects.util.Actor.env_committer_name" title="Permalink to this definition">¶</a></dt>
2090 <dd></dd></dl>
2091
2092 <dl class="attribute">
2093 <dt id="git.objects.util.Actor.name">
2094 <code class="descname">name</code><a class="headerlink" href="#git.objects.util.Actor.name" title="Permalink to this definition">¶</a></dt>
2095 <dd></dd></dl>
2096
2097 <dl class="attribute">
2098 <dt id="git.objects.util.Actor.name_email_regex">
2099 <code class="descname">name_email_regex</code><em class="property"> = &lt;_sre.SRE_Pattern object&gt;</em><a class="headerlink" href="#git.objects.util.Actor.name_email_regex" title="Permalink to this definition">¶</a></dt>
2100 <dd></dd></dl>
2101
2102 <dl class="attribute">
2103 <dt id="git.objects.util.Actor.name_only_regex">
2104 <code class="descname">name_only_regex</code><em class="property"> = &lt;_sre.SRE_Pattern object&gt;</em><a class="headerlink" href="#git.objects.util.Actor.name_only_regex" title="Permalink to this definition">¶</a></dt>
2105 <dd></dd></dl>
2106
2107 </dd></dl>
2108
2109 <dl class="class">
2110 <dt id="git.objects.util.tzoffset">
2111 <em class="property">class </em><code class="descclassname">git.objects.util.</code><code class="descname">tzoffset</code><span class="sig-paren">(</span><em>secs_west_of_utc</em>, <em>name=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.tzoffset" title="Permalink to this definition">¶</a></dt>
2112 <dd><dl class="attribute">
2113 <dt id="git.objects.util.tzoffset.__dict__">
2114 <code class="descname">__dict__</code><em class="property"> = dict_proxy({'__module__': 'git.objects.util', 'dst': &lt;function dst at 0x10fe00e60&gt;, 'utcoffset': &lt;function utcoffset at 0x10fe00d70&gt;, 'tzname': &lt;function tzname at 0x10fe00de8&gt;, '__dict__': &lt;attribute '__dict__' of 'tzoffset' objects&gt;, '__weakref__': &lt;attribute '__weakref__' of 'tzoffset' objects&gt;, '__doc__': None, '__init__': &lt;function __init__ at 0x10fe00cf8&gt;})</em><a class="headerlink" href="#git.objects.util.tzoffset.__dict__" title="Permalink to this definition">¶</a></dt>
2115 <dd></dd></dl>
2116
2117 <dl class="method">
2118 <dt id="git.objects.util.tzoffset.__init__">
2119 <code class="descname">__init__</code><span class="sig-paren">(</span><em>secs_west_of_utc</em>, <em>name=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.tzoffset.__init__" title="Permalink to this definition">¶</a></dt>
2120 <dd></dd></dl>
2121
2122 <dl class="attribute">
2123 <dt id="git.objects.util.tzoffset.__module__">
2124 <code class="descname">__module__</code><em class="property"> = 'git.objects.util'</em><a class="headerlink" href="#git.objects.util.tzoffset.__module__" title="Permalink to this definition">¶</a></dt>
2125 <dd></dd></dl>
2126
2127 <dl class="attribute">
2128 <dt id="git.objects.util.tzoffset.__weakref__">
2129 <code class="descname">__weakref__</code><a class="headerlink" href="#git.objects.util.tzoffset.__weakref__" title="Permalink to this definition">¶</a></dt>
2130 <dd><p>list of weak references to the object (if defined)</p>
2131 </dd></dl>
2132
2133 <dl class="method">
2134 <dt id="git.objects.util.tzoffset.dst">
2135 <code class="descname">dst</code><span class="sig-paren">(</span><em>dt</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.tzoffset.dst" title="Permalink to this definition">¶</a></dt>
2136 <dd></dd></dl>
2137
2138 <dl class="method">
2139 <dt id="git.objects.util.tzoffset.tzname">
2140 <code class="descname">tzname</code><span class="sig-paren">(</span><em>dt</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.tzoffset.tzname" title="Permalink to this definition">¶</a></dt>
2141 <dd></dd></dl>
2142
2143 <dl class="method">
2144 <dt id="git.objects.util.tzoffset.utcoffset">
2145 <code class="descname">utcoffset</code><span class="sig-paren">(</span><em>dt</em><span class="sig-paren">)</span><a class="headerlink" href="#git.objects.util.tzoffset.utcoffset" title="Permalink to this definition">¶</a></dt>
2146 <dd></dd></dl>
2147
2148 </dd></dl>
2149
2150 </div>
2151 <div class="section" id="module-git.index.base">
2152 <span id="index-base"></span><h2>Index.Base<a class="headerlink" href="#module-git.index.base" title="Permalink to this headline">¶</a></h2>
2153 <dl class="class">
2154 <dt id="git.index.base.IndexFile">
2155 <em class="property">class </em><code class="descclassname">git.index.base.</code><code class="descname">IndexFile</code><span class="sig-paren">(</span><em>repo</em>, <em>file_path=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile" title="Permalink to this definition">¶</a></dt>
2156 <dd><p>Implements an Index that can be manipulated using a native implementation in
2157 order to save git command function calls wherever possible.</p>
2158 <p>It provides custom merging facilities allowing to merge without actually changing
2159 your index or your working tree. This way you can perform own test-merges based
2160 on the index only without having to deal with the working copy. This is useful
2161 in case of partial working trees.</p>
2162 <p><code class="docutils literal"><span class="pre">Entries</span></code></p>
2163 <p>The index contains an entries dict whose keys are tuples of type IndexEntry
2164 to facilitate access.</p>
2165 <p>You may read the entries dict or manipulate it using IndexEntry instance, i.e.:</p>
2166 <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">index</span><span class="o">.</span><span class="n">entries</span><span class="p">[</span><span class="n">index</span><span class="o">.</span><span class="n">entry_key</span><span class="p">(</span><span class="n">index_entry_instance</span><span class="p">)]</span> <span class="o">=</span> <span class="n">index_entry_instance</span>
2167 </pre></div>
2168 </div>
2169 <p>Make sure you use index.write() once you are done manipulating the index directly
2170 before operating on it using the git command</p>
2171 <dl class="attribute">
2172 <dt id="git.index.base.IndexFile.S_IFGITLINK">
2173 <code class="descname">S_IFGITLINK</code><em class="property"> = 57344</em><a class="headerlink" href="#git.index.base.IndexFile.S_IFGITLINK" title="Permalink to this definition">¶</a></dt>
2174 <dd></dd></dl>
2175
2176 <dl class="method">
2177 <dt id="git.index.base.IndexFile.__init__">
2178 <code class="descname">__init__</code><span class="sig-paren">(</span><em>repo</em>, <em>file_path=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile.__init__" title="Permalink to this definition">¶</a></dt>
2179 <dd><p>Initialize this Index instance, optionally from the given <code class="docutils literal"><span class="pre">file_path</span></code>.
2180 If no file_path is given, we will be created from the current index file.</p>
2181 <p>If a stream is not given, the stream will be initialized from the current
2182 repository&#8217;s index on demand.</p>
2183 </dd></dl>
2184
2185 <dl class="attribute">
2186 <dt id="git.index.base.IndexFile.__module__">
2187 <code class="descname">__module__</code><em class="property"> = 'git.index.base'</em><a class="headerlink" href="#git.index.base.IndexFile.__module__" title="Permalink to this definition">¶</a></dt>
2188 <dd></dd></dl>
2189
2190 <dl class="attribute">
2191 <dt id="git.index.base.IndexFile.__slots__">
2192 <code class="descname">__slots__</code><em class="property"> = ('repo', 'version', 'entries', '_extension_data', '_file_path')</em><a class="headerlink" href="#git.index.base.IndexFile.__slots__" title="Permalink to this definition">¶</a></dt>
2193 <dd></dd></dl>
2194
2195 <dl class="method">
2196 <dt id="git.index.base.IndexFile.add">
2197 <code class="descname">add</code><span class="sig-paren">(</span><em>items</em>, <em>force=True</em>, <em>fprogress=&lt;function &lt;lambda&gt;&gt;</em>, <em>path_rewriter=None</em>, <em>write=True</em>, <em>write_extension_data=False</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile.add" title="Permalink to this definition">¶</a></dt>
2198 <dd><p>Add files from the working tree, specific blobs or BaseIndexEntries
2199 to the index.</p>
2200 <table class="docutils field-list" frame="void" rules="none">
2201 <col class="field-name" />
2202 <col class="field-body" />
2203 <tbody valign="top">
2204 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
2205 <li><strong>items</strong> &#8211; <p>Multiple types of items are supported, types can be mixed within one call.
2206 Different types imply a different handling. File paths may generally be
2207 relative or absolute.</p>
2208 <ul>
2209 <li><dl class="first docutils">
2210 <dt>path string</dt>
2211 <dd>strings denote a relative or absolute path into the repository pointing to
2212 an existing file, i.e. CHANGES, lib/myfile.ext, &#8216;/home/gitrepo/lib/myfile.ext&#8217;.<p>Absolute paths must start with working tree directory of this index&#8217;s repository
2213 to be considered valid. For example, if it was initialized with a non-normalized path, like
2214 <cite>/root/repo/../repo</cite>, absolute paths to be added must start with <cite>/root/repo/../repo</cite>.</p>
2215 <p>Paths provided like this must exist. When added, they will be written
2216 into the object database.</p>
2217 <p>PathStrings may contain globs, such as &#8216;lib/__init__*&#8217; or can be directories
2218 like &#8216;lib&#8217;, the latter ones will add all the files within the dirctory and
2219 subdirectories.</p>
2220 <p>This equals a straight git-add.</p>
2221 <p class="last">They are added at stage 0</p>
2222 </dd>
2223 </dl>
2224 </li>
2225 <li><dl class="first docutils">
2226 <dt>Blob or Submodule object</dt>
2227 <dd>Blobs are added as they are assuming a valid mode is set.
2228 The file they refer to may or may not exist in the file system, but
2229 must be a path relative to our repository.<p>If their sha is null ( 40*0 ), their path must exist in the file system
2230 relative to the git repository as an object will be created from
2231 the data at the path.
2232 The handling now very much equals the way string paths are processed, except that
2233 the mode you have set will be kept. This allows you to create symlinks
2234 by settings the mode respectively and writing the target of the symlink
2235 directly into the file. This equals a default Linux-Symlink which
2236 is not dereferenced automatically, except that it can be created on
2237 filesystems not supporting it as well.</p>
2238 <p>Please note that globs or directories are not allowed in Blob objects.</p>
2239 <p class="last">They are added at stage 0</p>
2240 </dd>
2241 </dl>
2242 </li>
2243 <li><dl class="first docutils">
2244 <dt>BaseIndexEntry or type</dt>
2245 <dd>Handling equals the one of Blob objects, but the stage may be
2246 explicitly set. Please note that Index Entries require binary sha&#8217;s.</dd>
2247 </dl>
2248 </li>
2249 </ul>
2250 </li>
2251 <li><strong>force</strong> &#8211; <strong>CURRENTLY INEFFECTIVE</strong>
2252 If True, otherwise ignored or excluded files will be
2253 added anyway.
2254 As opposed to the git-add command, we enable this flag by default
2255 as the API user usually wants the item to be added even though
2256 they might be excluded.</li>
2257 <li><strong>fprogress</strong> &#8211; Function with signature f(path, done=False, item=item) called for each
2258 path to be added, one time once it is about to be added where done==False
2259 and once after it was added where done=True.
2260 item is set to the actual item we handle, either a Path or a BaseIndexEntry
2261 Please note that the processed path is not guaranteed to be present
2262 in the index already as the index is currently being processed.</li>
2263 <li><strong>path_rewriter</strong> &#8211; Function with signature (string) func(BaseIndexEntry) function returning a path
2264 for each passed entry which is the path to be actually recorded for the
2265 object created from entry.path. This allows you to write an index which
2266 is not identical to the layout of the actual files on your hard-disk.
2267 If not None and <code class="docutils literal"><span class="pre">items</span></code> contain plain paths, these paths will be
2268 converted to Entries beforehand and passed to the path_rewriter.
2269 Please note that entry.path is relative to the git repository.</li>
2270 <li><strong>write</strong> &#8211; If True, the index will be written once it was altered. Otherwise
2271 the changes only exist in memory and are not available to git commands.</li>
2272 <li><strong>write_extension_data</strong> &#8211; If True, extension data will be written back to the index. This can lead to issues in case
2273 it is containing the &#8216;TREE&#8217; extension, which will cause the <cite>git commit</cite> command to write an
2274 old tree, instead of a new one representing the now changed index.
2275 This doesn&#8217;t matter if you use <cite>IndexFile.commit()</cite>, which ignores the <cite>TREE</cite> extension altogether.
2276 You should set it to True if you intend to use <cite>IndexFile.commit()</cite> exclusively while maintaining
2277 support for third-party extensions. Besides that, you can usually safely ignore the built-in
2278 extensions when using GitPython on repositories that are not handled manually at all.
2279 All current built-in extensions are listed here:
2280 <a class="reference external" href="http://opensource.apple.com/source/Git/Git-26/src/git-htmldocs/technical/index-format.txt">http://opensource.apple.com/source/Git/Git-26/src/git-htmldocs/technical/index-format.txt</a></li>
2281 </ul>
2282 </td>
2283 </tr>
2284 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">List(BaseIndexEntries) representing the entries just actually added.</p>
2285 </td>
2286 </tr>
2287 <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><strong>OSError</strong> &#8211; if a supplied Path did not exist. Please note that BaseIndexEntry
2288 Objects that do not have a null sha will be added even if their paths
2289 do not exist.</p>
2290 </td>
2291 </tr>
2292 </tbody>
2293 </table>
2294 </dd></dl>
2295
2296 <dl class="method">
2297 <dt id="git.index.base.IndexFile.checkout">
2298 <code class="descname">checkout</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile.checkout" title="Permalink to this definition">¶</a></dt>
2299 <dd></dd></dl>
2300
2301 <dl class="method">
2302 <dt id="git.index.base.IndexFile.commit">
2303 <code class="descname">commit</code><span class="sig-paren">(</span><em>message</em>, <em>parent_commits=None</em>, <em>head=True</em>, <em>author=None</em>, <em>committer=None</em>, <em>author_date=None</em>, <em>commit_date=None</em>, <em>skip_hooks=False</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile.commit" title="Permalink to this definition">¶</a></dt>
2304 <dd><p>Commit the current default index file, creating a commit object.
2305 For more information on the arguments, see tree.commit.</p>
2306 <table class="docutils field-list" frame="void" rules="none">
2307 <col class="field-name" />
2308 <col class="field-body" />
2309 <tbody valign="top">
2310 <tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">If you have manually altered the .entries member of this instance,
2311 don&#8217;t forget to write() your changes to disk beforehand.
2312 Passing skip_hooks=True is the equivalent of using <cite>-n</cite>
2313 or <cite>&#8211;no-verify</cite> on the command line.</td>
2314 </tr>
2315 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Commit object representing the new commit</td>
2316 </tr>
2317 </tbody>
2318 </table>
2319 </dd></dl>
2320
2321 <dl class="method">
2322 <dt id="git.index.base.IndexFile.diff">
2323 <code class="descname">diff</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile.diff" title="Permalink to this definition">¶</a></dt>
2324 <dd></dd></dl>
2325
2326 <dl class="attribute">
2327 <dt id="git.index.base.IndexFile.entries">
2328 <code class="descname">entries</code><a class="headerlink" href="#git.index.base.IndexFile.entries" title="Permalink to this definition">¶</a></dt>
2329 <dd></dd></dl>
2330
2331 <dl class="classmethod">
2332 <dt id="git.index.base.IndexFile.entry_key">
2333 <em class="property">classmethod </em><code class="descname">entry_key</code><span class="sig-paren">(</span><em>*entry</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile.entry_key" title="Permalink to this definition">¶</a></dt>
2334 <dd></dd></dl>
2335
2336 <dl class="classmethod">
2337 <dt id="git.index.base.IndexFile.from_tree">
2338 <em class="property">classmethod </em><code class="descname">from_tree</code><span class="sig-paren">(</span><em>repo</em>, <em>*treeish</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile.from_tree" title="Permalink to this definition">¶</a></dt>
2339 <dd><p>Merge the given treeish revisions into a new index which is returned.
2340 The original index will remain unaltered</p>
2341 <table class="docutils field-list" frame="void" rules="none">
2342 <col class="field-name" />
2343 <col class="field-body" />
2344 <tbody valign="top">
2345 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
2346 <li><strong>repo</strong> &#8211; The repository treeish are located in.</li>
2347 <li><strong>treeish</strong> &#8211; One, two or three Tree Objects, Commits or 40 byte hexshas. The result
2348 changes according to the amount of trees.
2349 If 1 Tree is given, it will just be read into a new index
2350 If 2 Trees are given, they will be merged into a new index using a
2351 two way merge algorithm. Tree 1 is the &#8216;current&#8217; tree, tree 2 is the &#8216;other&#8217;
2352 one. It behaves like a fast-forward.
2353 If 3 Trees are given, a 3-way merge will be performed with the first tree
2354 being the common ancestor of tree 2 and tree 3. Tree 2 is the &#8216;current&#8217; tree,
2355 tree 3 is the &#8216;other&#8217; one</li>
2356 <li><strong>kwargs</strong> &#8211; Additional arguments passed to git-read-tree</li>
2357 </ul>
2358 </td>
2359 </tr>
2360 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">New IndexFile instance. It will point to a temporary index location which
2361 does not exist anymore. If you intend to write such a merged Index, supply
2362 an alternate file_path to its &#8216;write&#8217; method.</p>
2363 </td>
2364 </tr>
2365 <tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body"><p class="first">In the three-way merge case, &#8211;aggressive will be specified to automatically
2366 resolve more cases in a commonly correct manner. Specify trivial=True as kwarg
2367 to override that.</p>
2368 <p class="last">As the underlying git-read-tree command takes into account the current index,
2369 it will be temporarily moved out of the way to assure there are no unsuspected
2370 interferences.</p>
2371 </td>
2372 </tr>
2373 </tbody>
2374 </table>
2375 </dd></dl>
2376
2377 <dl class="method">
2378 <dt id="git.index.base.IndexFile.iter_blobs">
2379 <code class="descname">iter_blobs</code><span class="sig-paren">(</span><em>predicate=&lt;function &lt;lambda&gt;&gt;</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile.iter_blobs" title="Permalink to this definition">¶</a></dt>
2380 <dd><table class="docutils field-list" frame="void" rules="none">
2381 <col class="field-name" />
2382 <col class="field-body" />
2383 <tbody valign="top">
2384 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Iterator yielding tuples of Blob objects and stages, tuple(stage, Blob)</td>
2385 </tr>
2386 <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>predicate</strong> &#8211; Function(t) returning True if tuple(stage, Blob) should be yielded by the
2387 iterator. A default filter, the BlobFilter, allows you to yield blobs
2388 only if they match a given list of paths.</td>
2389 </tr>
2390 </tbody>
2391 </table>
2392 </dd></dl>
2393
2394 <dl class="method">
2395 <dt id="git.index.base.IndexFile.merge_tree">
2396 <code class="descname">merge_tree</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile.merge_tree" title="Permalink to this definition">¶</a></dt>
2397 <dd></dd></dl>
2398
2399 <dl class="method">
2400 <dt id="git.index.base.IndexFile.move">
2401 <code class="descname">move</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile.move" title="Permalink to this definition">¶</a></dt>
2402 <dd></dd></dl>
2403
2404 <dl class="classmethod">
2405 <dt id="git.index.base.IndexFile.new">
2406 <em class="property">classmethod </em><code class="descname">new</code><span class="sig-paren">(</span><em>repo</em>, <em>*tree_sha</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile.new" title="Permalink to this definition">¶</a></dt>
2407 <dd><p>Merge the given treeish revisions into a new index which is returned.
2408 This method behaves like git-read-tree &#8211;aggressive when doing the merge.</p>
2409 <table class="docutils field-list" frame="void" rules="none">
2410 <col class="field-name" />
2411 <col class="field-body" />
2412 <tbody valign="top">
2413 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
2414 <li><strong>repo</strong> &#8211; The repository treeish are located in.</li>
2415 <li><strong>tree_sha</strong> &#8211; 20 byte or 40 byte tree sha or tree objects</li>
2416 </ul>
2417 </td>
2418 </tr>
2419 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">New IndexFile instance. Its path will be undefined.
2420 If you intend to write such a merged Index, supply an alternate file_path
2421 to its &#8216;write&#8217; method.</p>
2422 </td>
2423 </tr>
2424 </tbody>
2425 </table>
2426 </dd></dl>
2427
2428 <dl class="attribute">
2429 <dt id="git.index.base.IndexFile.path">
2430 <code class="descname">path</code><a class="headerlink" href="#git.index.base.IndexFile.path" title="Permalink to this definition">¶</a></dt>
2431 <dd><table class="docutils field-list" frame="void" rules="none">
2432 <col class="field-name" />
2433 <col class="field-body" />
2434 <tbody valign="top">
2435 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Path to the index file we are representing</td>
2436 </tr>
2437 </tbody>
2438 </table>
2439 </dd></dl>
2440
2441 <dl class="method">
2442 <dt id="git.index.base.IndexFile.remove">
2443 <code class="descname">remove</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile.remove" title="Permalink to this definition">¶</a></dt>
2444 <dd></dd></dl>
2445
2446 <dl class="attribute">
2447 <dt id="git.index.base.IndexFile.repo">
2448 <code class="descname">repo</code><a class="headerlink" href="#git.index.base.IndexFile.repo" title="Permalink to this definition">¶</a></dt>
2449 <dd></dd></dl>
2450
2451 <dl class="method">
2452 <dt id="git.index.base.IndexFile.reset">
2453 <code class="descname">reset</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile.reset" title="Permalink to this definition">¶</a></dt>
2454 <dd></dd></dl>
2455
2456 <dl class="method">
2457 <dt id="git.index.base.IndexFile.resolve_blobs">
2458 <code class="descname">resolve_blobs</code><span class="sig-paren">(</span><em>iter_blobs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile.resolve_blobs" title="Permalink to this definition">¶</a></dt>
2459 <dd><p>Resolve the blobs given in blob iterator. This will effectively remove the
2460 index entries of the respective path at all non-null stages and add the given
2461 blob as new stage null blob.</p>
2462 <p>For each path there may only be one blob, otherwise a ValueError will be raised
2463 claiming the path is already at stage 0.</p>
2464 <table class="docutils field-list" frame="void" rules="none">
2465 <col class="field-name" />
2466 <col class="field-body" />
2467 <tbody valign="top">
2468 <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><strong>ValueError</strong> &#8211; if one of the blobs already existed at stage 0</td>
2469 </tr>
2470 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">self</td>
2471 </tr>
2472 <tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">You will have to write the index manually once you are done, i.e.
2473 index.resolve_blobs(blobs).write()</td>
2474 </tr>
2475 </tbody>
2476 </table>
2477 </dd></dl>
2478
2479 <dl class="method">
2480 <dt id="git.index.base.IndexFile.unmerged_blobs">
2481 <code class="descname">unmerged_blobs</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile.unmerged_blobs" title="Permalink to this definition">¶</a></dt>
2482 <dd><table class="docutils field-list" frame="void" rules="none">
2483 <col class="field-name" />
2484 <col class="field-body" />
2485 <tbody valign="top">
2486 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Iterator yielding dict(path : list( tuple( stage, Blob, ...))), being
2487 a dictionary associating a path in the index with a list containing
2488 sorted stage/blob pairs</td>
2489 </tr>
2490 <tr class="field-even field"><th class="field-name">Note:</th><td class="field-body">Blobs that have been removed in one side simply do not exist in the
2491 given stage. I.e. a file removed on the &#8216;other&#8217; branch whose entries
2492 are at stage 3 will not have a stage 3 entry.</td>
2493 </tr>
2494 </tbody>
2495 </table>
2496 </dd></dl>
2497
2498 <dl class="method">
2499 <dt id="git.index.base.IndexFile.update">
2500 <code class="descname">update</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile.update" title="Permalink to this definition">¶</a></dt>
2501 <dd><p>Reread the contents of our index file, discarding all cached information
2502 we might have.</p>
2503 <table class="docutils field-list" frame="void" rules="none">
2504 <col class="field-name" />
2505 <col class="field-body" />
2506 <tbody valign="top">
2507 <tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">This is a possibly dangerious operations as it will discard your changes
2508 to index.entries</td>
2509 </tr>
2510 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">self</td>
2511 </tr>
2512 </tbody>
2513 </table>
2514 </dd></dl>
2515
2516 <dl class="attribute">
2517 <dt id="git.index.base.IndexFile.version">
2518 <code class="descname">version</code><a class="headerlink" href="#git.index.base.IndexFile.version" title="Permalink to this definition">¶</a></dt>
2519 <dd></dd></dl>
2520
2521 <dl class="method">
2522 <dt id="git.index.base.IndexFile.write">
2523 <code class="descname">write</code><span class="sig-paren">(</span><em>file_path=None</em>, <em>ignore_extension_data=False</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile.write" title="Permalink to this definition">¶</a></dt>
2524 <dd><p>Write the current state to our file path or to the given one</p>
2525 <table class="docutils field-list" frame="void" rules="none">
2526 <col class="field-name" />
2527 <col class="field-body" />
2528 <tbody valign="top">
2529 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
2530 <li><strong>file_path</strong> &#8211; If None, we will write to our stored file path from which we have
2531 been initialized. Otherwise we write to the given file path.
2532 Please note that this will change the file_path of this index to
2533 the one you gave.</li>
2534 <li><strong>ignore_extension_data</strong> &#8211; If True, the TREE type extension data read in the index will not
2535 be written to disk. NOTE that no extension data is actually written.
2536 Use this if you have altered the index and
2537 would like to use git-write-tree afterwards to create a tree
2538 representing your written changes.
2539 If this data is present in the written index, git-write-tree
2540 will instead write the stored/cached tree.
2541 Alternatively, use IndexFile.write_tree() to handle this case
2542 automatically</li>
2543 </ul>
2544 </td>
2545 </tr>
2546 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">self</p>
2547 </td>
2548 </tr>
2549 </tbody>
2550 </table>
2551 </dd></dl>
2552
2553 <dl class="method">
2554 <dt id="git.index.base.IndexFile.write_tree">
2555 <code class="descname">write_tree</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.IndexFile.write_tree" title="Permalink to this definition">¶</a></dt>
2556 <dd><p>Writes this index to a corresponding Tree object into the repository&#8217;s
2557 object database and return it.</p>
2558 <table class="docutils field-list" frame="void" rules="none">
2559 <col class="field-name" />
2560 <col class="field-body" />
2561 <tbody valign="top">
2562 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Tree object representing this index</p>
2563 </td>
2564 </tr>
2565 <tr class="field-even field"><th class="field-name">Note:</th><td class="field-body"><p class="first">The tree will be written even if one or more objects the tree refers to
2566 does not yet exist in the object database. This could happen if you added
2567 Entries to the index directly.</p>
2568 </td>
2569 </tr>
2570 <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple">
2571 <li><strong>ValueError</strong> &#8211; if there are no entries in the cache</li>
2572 <li><strong>UnmergedEntriesError</strong> &#8211; </li>
2573 </ul>
2574 </td>
2575 </tr>
2576 </tbody>
2577 </table>
2578 </dd></dl>
2579
2580 </dd></dl>
2581
2582 <dl class="exception">
2583 <dt id="git.index.base.CheckoutError">
2584 <em class="property">exception </em><code class="descclassname">git.index.base.</code><code class="descname">CheckoutError</code><span class="sig-paren">(</span><em>message</em>, <em>failed_files</em>, <em>valid_files</em>, <em>failed_reasons</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.CheckoutError" title="Permalink to this definition">¶</a></dt>
2585 <dd><p>Thrown if a file could not be checked out from the index as it contained
2586 changes.</p>
2587 <p>The .failed_files attribute contains a list of relative paths that failed
2588 to be checked out as they contained changes that did not exist in the index.</p>
2589 <p>The .failed_reasons attribute contains a string informing about the actual
2590 cause of the issue.</p>
2591 <p>The .valid_files attribute contains a list of relative paths to files that
2592 were checked out successfully and hence match the version stored in the
2593 index</p>
2594 <dl class="method">
2595 <dt id="git.index.base.CheckoutError.__init__">
2596 <code class="descname">__init__</code><span class="sig-paren">(</span><em>message</em>, <em>failed_files</em>, <em>valid_files</em>, <em>failed_reasons</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.CheckoutError.__init__" title="Permalink to this definition">¶</a></dt>
2597 <dd></dd></dl>
2598
2599 <dl class="attribute">
2600 <dt id="git.index.base.CheckoutError.__module__">
2601 <code class="descname">__module__</code><em class="property"> = 'git.exc'</em><a class="headerlink" href="#git.index.base.CheckoutError.__module__" title="Permalink to this definition">¶</a></dt>
2602 <dd></dd></dl>
2603
2604 <dl class="method">
2605 <dt id="git.index.base.CheckoutError.__str__">
2606 <code class="descname">__str__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.index.base.CheckoutError.__str__" title="Permalink to this definition">¶</a></dt>
2607 <dd></dd></dl>
2608
2609 <dl class="attribute">
2610 <dt id="git.index.base.CheckoutError.__weakref__">
2611 <code class="descname">__weakref__</code><a class="headerlink" href="#git.index.base.CheckoutError.__weakref__" title="Permalink to this definition">¶</a></dt>
2612 <dd><p>list of weak references to the object (if defined)</p>
2613 </dd></dl>
2614
2615 </dd></dl>
2616
2617 </div>
2618 <div class="section" id="module-git.index.fun">
2619 <span id="index-functions"></span><h2>Index.Functions<a class="headerlink" href="#module-git.index.fun" title="Permalink to this headline">¶</a></h2>
2620 <dl class="function">
2621 <dt id="git.index.fun.write_cache">
2622 <code class="descclassname">git.index.fun.</code><code class="descname">write_cache</code><span class="sig-paren">(</span><em>entries</em>, <em>stream</em>, <em>extension_data=None</em>, <em>ShaStreamCls=&lt;class 'git.util.IndexFileSHA1Writer'&gt;</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.fun.write_cache" title="Permalink to this definition">¶</a></dt>
2623 <dd><p>Write the cache represented by entries to a stream</p>
2624 <table class="docutils field-list" frame="void" rules="none">
2625 <col class="field-name" />
2626 <col class="field-body" />
2627 <tbody valign="top">
2628 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
2629 <li><strong>entries</strong> &#8211; <strong>sorted</strong> list of entries</li>
2630 <li><strong>stream</strong> &#8211; stream to wrap into the AdapterStreamCls - it is used for
2631 final output.</li>
2632 <li><strong>ShaStreamCls</strong> &#8211; Type to use when writing to the stream. It produces a sha
2633 while writing to it, before the data is passed on to the wrapped stream</li>
2634 <li><strong>extension_data</strong> &#8211; any kind of data to write as a trailer, it must begin
2635 a 4 byte identifier, followed by its size ( 4 bytes )</li>
2636 </ul>
2637 </td>
2638 </tr>
2639 </tbody>
2640 </table>
2641 </dd></dl>
2642
2643 <dl class="function">
2644 <dt id="git.index.fun.read_cache">
2645 <code class="descclassname">git.index.fun.</code><code class="descname">read_cache</code><span class="sig-paren">(</span><em>stream</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.fun.read_cache" title="Permalink to this definition">¶</a></dt>
2646 <dd><p>Read a cache file from the given stream
2647 :return: tuple(version, entries_dict, extension_data, content_sha)
2648 * version is the integer version number
2649 * entries dict is a dictionary which maps IndexEntry instances to a path at a stage
2650 * extension_data is &#8216;&#8217; or 4 bytes of type + 4 bytes of size + size bytes
2651 * content_sha is a 20 byte sha on all cache file contents</p>
2652 </dd></dl>
2653
2654 <dl class="function">
2655 <dt id="git.index.fun.write_tree_from_cache">
2656 <code class="descclassname">git.index.fun.</code><code class="descname">write_tree_from_cache</code><span class="sig-paren">(</span><em>entries</em>, <em>odb</em>, <em>sl</em>, <em>si=0</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.fun.write_tree_from_cache" title="Permalink to this definition">¶</a></dt>
2657 <dd><p>Create a tree from the given sorted list of entries and put the respective
2658 trees into the given object database</p>
2659 <table class="docutils field-list" frame="void" rules="none">
2660 <col class="field-name" />
2661 <col class="field-body" />
2662 <tbody valign="top">
2663 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
2664 <li><strong>entries</strong> &#8211; <strong>sorted</strong> list of IndexEntries</li>
2665 <li><strong>odb</strong> &#8211; object database to store the trees in</li>
2666 <li><strong>si</strong> &#8211; start index at which we should start creating subtrees</li>
2667 <li><strong>sl</strong> &#8211; slice indicating the range we should process on the entries list</li>
2668 </ul>
2669 </td>
2670 </tr>
2671 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">tuple(binsha, list(tree_entry, ...)) a tuple of a sha and a list of
2672 tree entries being a tuple of hexsha, mode, name</p>
2673 </td>
2674 </tr>
2675 </tbody>
2676 </table>
2677 </dd></dl>
2678
2679 <dl class="function">
2680 <dt id="git.index.fun.entry_key">
2681 <code class="descclassname">git.index.fun.</code><code class="descname">entry_key</code><span class="sig-paren">(</span><em>*entry</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.fun.entry_key" title="Permalink to this definition">¶</a></dt>
2682 <dd><table class="docutils field-list" frame="void" rules="none">
2683 <col class="field-name" />
2684 <col class="field-body" />
2685 <tbody valign="top">
2686 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Key suitable to be used for the index.entries dictionary</td>
2687 </tr>
2688 <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>entry</strong> &#8211; One instance of type BaseIndexEntry or the path and the stage</td>
2689 </tr>
2690 </tbody>
2691 </table>
2692 </dd></dl>
2693
2694 <dl class="function">
2695 <dt id="git.index.fun.stat_mode_to_index_mode">
2696 <code class="descclassname">git.index.fun.</code><code class="descname">stat_mode_to_index_mode</code><span class="sig-paren">(</span><em>mode</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.fun.stat_mode_to_index_mode" title="Permalink to this definition">¶</a></dt>
2697 <dd><p>Convert the given mode from a stat call to the corresponding index mode
2698 and return it</p>
2699 </dd></dl>
2700
2701 <dl class="function">
2702 <dt id="git.index.fun.run_commit_hook">
2703 <code class="descclassname">git.index.fun.</code><code class="descname">run_commit_hook</code><span class="sig-paren">(</span><em>name</em>, <em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.fun.run_commit_hook" title="Permalink to this definition">¶</a></dt>
2704 <dd><p>Run the commit hook of the given name. Silently ignores hooks that do not exist.
2705 :param name: name of hook, like &#8216;pre-commit&#8217;
2706 :param index: IndexFile instance
2707 :raises HookExecutionError:</p>
2708 </dd></dl>
2709
2710 <dl class="function">
2711 <dt id="git.index.fun.hook_path">
2712 <code class="descclassname">git.index.fun.</code><code class="descname">hook_path</code><span class="sig-paren">(</span><em>name</em>, <em>git_dir</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.fun.hook_path" title="Permalink to this definition">¶</a></dt>
2713 <dd><table class="docutils field-list" frame="void" rules="none">
2714 <col class="field-name" />
2715 <col class="field-body" />
2716 <tbody valign="top">
2717 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">path to the given named hook in the given git repository directory</td>
2718 </tr>
2719 </tbody>
2720 </table>
2721 </dd></dl>
2722
2723 </div>
2724 <div class="section" id="module-git.index.typ">
2725 <span id="index-types"></span><h2>Index.Types<a class="headerlink" href="#module-git.index.typ" title="Permalink to this headline">¶</a></h2>
2726 <p>Module with additional types used by the index</p>
2727 <dl class="class">
2728 <dt id="git.index.typ.BlobFilter">
2729 <em class="property">class </em><code class="descclassname">git.index.typ.</code><code class="descname">BlobFilter</code><span class="sig-paren">(</span><em>paths</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.typ.BlobFilter" title="Permalink to this definition">¶</a></dt>
2730 <dd><p>Predicate to be used by iter_blobs allowing to filter only return blobs which
2731 match the given list of directories or files.</p>
2732 <p>The given paths are given relative to the repository.</p>
2733 <dl class="method">
2734 <dt id="git.index.typ.BlobFilter.__call__">
2735 <code class="descname">__call__</code><span class="sig-paren">(</span><em>stage_blob</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.typ.BlobFilter.__call__" title="Permalink to this definition">¶</a></dt>
2736 <dd></dd></dl>
2737
2738 <dl class="method">
2739 <dt id="git.index.typ.BlobFilter.__init__">
2740 <code class="descname">__init__</code><span class="sig-paren">(</span><em>paths</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.typ.BlobFilter.__init__" title="Permalink to this definition">¶</a></dt>
2741 <dd><table class="docutils field-list" frame="void" rules="none">
2742 <col class="field-name" />
2743 <col class="field-body" />
2744 <tbody valign="top">
2745 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>paths</strong> &#8211; tuple or list of paths which are either pointing to directories or
2746 to files relative to the current repository</td>
2747 </tr>
2748 </tbody>
2749 </table>
2750 </dd></dl>
2751
2752 <dl class="attribute">
2753 <dt id="git.index.typ.BlobFilter.__module__">
2754 <code class="descname">__module__</code><em class="property"> = 'git.index.typ'</em><a class="headerlink" href="#git.index.typ.BlobFilter.__module__" title="Permalink to this definition">¶</a></dt>
2755 <dd></dd></dl>
2756
2757 <dl class="attribute">
2758 <dt id="git.index.typ.BlobFilter.__slots__">
2759 <code class="descname">__slots__</code><em class="property"> = 'paths'</em><a class="headerlink" href="#git.index.typ.BlobFilter.__slots__" title="Permalink to this definition">¶</a></dt>
2760 <dd></dd></dl>
2761
2762 <dl class="attribute">
2763 <dt id="git.index.typ.BlobFilter.paths">
2764 <code class="descname">paths</code><a class="headerlink" href="#git.index.typ.BlobFilter.paths" title="Permalink to this definition">¶</a></dt>
2765 <dd></dd></dl>
2766
2767 </dd></dl>
2768
2769 <dl class="class">
2770 <dt id="git.index.typ.BaseIndexEntry">
2771 <em class="property">class </em><code class="descclassname">git.index.typ.</code><code class="descname">BaseIndexEntry</code><a class="headerlink" href="#git.index.typ.BaseIndexEntry" title="Permalink to this definition">¶</a></dt>
2772 <dd><p>Small Brother of an index entry which can be created to describe changes
2773 done to the index in which case plenty of additional information is not requried.</p>
2774 <p>As the first 4 data members match exactly to the IndexEntry type, methods
2775 expecting a BaseIndexEntry can also handle full IndexEntries even if they
2776 use numeric indices for performance reasons.</p>
2777 <dl class="attribute">
2778 <dt id="git.index.typ.BaseIndexEntry.__dict__">
2779 <code class="descname">__dict__</code><em class="property"> = dict_proxy({'__module__': 'git.index.typ', '__str__': &lt;function __str__ at 0x10fe75050&gt;, 'binsha': &lt;property object at 0x10fe6cfc8&gt;, 'mode': &lt;property object at 0x10fe6cf70&gt;, 'hexsha': &lt;property object at 0x10fe76050&gt;, 'to_blob': &lt;function to_blob at 0x10fe75488&gt;, '__repr__': &lt;function __repr__ at 0x10fe750c8&gt;, 'path': &lt;property object at 0x10fe76100&gt;, '__dict__': &lt;attribute '__dict__' of 'BaseIndexEntry' objects&gt;, 'flags': &lt;property object at 0x10fe76158&gt;, 'stage': &lt;property object at 0x10fe760a8&gt;, '__doc__': 'Small Brother of an index entry which can be created to describe changes\n done to the index in which case plenty of additional information is not requried.\n\n As the first 4 data members match exactly to the IndexEntry type, methods\n expecting a BaseIndexEntry can also handle full IndexEntries even if they\n use numeric indices for performance reasons. ', 'from_blob': &lt;classmethod object at 0x10fe6f8a0&gt;})</em><a class="headerlink" href="#git.index.typ.BaseIndexEntry.__dict__" title="Permalink to this definition">¶</a></dt>
2780 <dd></dd></dl>
2781
2782 <dl class="attribute">
2783 <dt id="git.index.typ.BaseIndexEntry.__module__">
2784 <code class="descname">__module__</code><em class="property"> = 'git.index.typ'</em><a class="headerlink" href="#git.index.typ.BaseIndexEntry.__module__" title="Permalink to this definition">¶</a></dt>
2785 <dd></dd></dl>
2786
2787 <dl class="method">
2788 <dt id="git.index.typ.BaseIndexEntry.__repr__">
2789 <code class="descname">__repr__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.index.typ.BaseIndexEntry.__repr__" title="Permalink to this definition">¶</a></dt>
2790 <dd></dd></dl>
2791
2792 <dl class="method">
2793 <dt id="git.index.typ.BaseIndexEntry.__str__">
2794 <code class="descname">__str__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.index.typ.BaseIndexEntry.__str__" title="Permalink to this definition">¶</a></dt>
2795 <dd></dd></dl>
2796
2797 <dl class="attribute">
2798 <dt id="git.index.typ.BaseIndexEntry.binsha">
2799 <code class="descname">binsha</code><a class="headerlink" href="#git.index.typ.BaseIndexEntry.binsha" title="Permalink to this definition">¶</a></dt>
2800 <dd><p>binary sha of the blob</p>
2801 </dd></dl>
2802
2803 <dl class="attribute">
2804 <dt id="git.index.typ.BaseIndexEntry.flags">
2805 <code class="descname">flags</code><a class="headerlink" href="#git.index.typ.BaseIndexEntry.flags" title="Permalink to this definition">¶</a></dt>
2806 <dd><table class="docutils field-list" frame="void" rules="none">
2807 <col class="field-name" />
2808 <col class="field-body" />
2809 <tbody valign="top">
2810 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">flags stored with this entry</td>
2811 </tr>
2812 </tbody>
2813 </table>
2814 </dd></dl>
2815
2816 <dl class="classmethod">
2817 <dt id="git.index.typ.BaseIndexEntry.from_blob">
2818 <em class="property">classmethod </em><code class="descname">from_blob</code><span class="sig-paren">(</span><em>blob</em>, <em>stage=0</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.typ.BaseIndexEntry.from_blob" title="Permalink to this definition">¶</a></dt>
2819 <dd><table class="docutils field-list" frame="void" rules="none">
2820 <col class="field-name" />
2821 <col class="field-body" />
2822 <tbody valign="top">
2823 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Fully equipped BaseIndexEntry at the given stage</td>
2824 </tr>
2825 </tbody>
2826 </table>
2827 </dd></dl>
2828
2829 <dl class="attribute">
2830 <dt id="git.index.typ.BaseIndexEntry.hexsha">
2831 <code class="descname">hexsha</code><a class="headerlink" href="#git.index.typ.BaseIndexEntry.hexsha" title="Permalink to this definition">¶</a></dt>
2832 <dd><p>hex version of our sha</p>
2833 </dd></dl>
2834
2835 <dl class="attribute">
2836 <dt id="git.index.typ.BaseIndexEntry.mode">
2837 <code class="descname">mode</code><a class="headerlink" href="#git.index.typ.BaseIndexEntry.mode" title="Permalink to this definition">¶</a></dt>
2838 <dd><p>File Mode, compatible to stat module constants</p>
2839 </dd></dl>
2840
2841 <dl class="attribute">
2842 <dt id="git.index.typ.BaseIndexEntry.path">
2843 <code class="descname">path</code><a class="headerlink" href="#git.index.typ.BaseIndexEntry.path" title="Permalink to this definition">¶</a></dt>
2844 <dd><table class="docutils field-list" frame="void" rules="none">
2845 <col class="field-name" />
2846 <col class="field-body" />
2847 <tbody valign="top">
2848 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">our path relative to the repository working tree root</td>
2849 </tr>
2850 </tbody>
2851 </table>
2852 </dd></dl>
2853
2854 <dl class="attribute">
2855 <dt id="git.index.typ.BaseIndexEntry.stage">
2856 <code class="descname">stage</code><a class="headerlink" href="#git.index.typ.BaseIndexEntry.stage" title="Permalink to this definition">¶</a></dt>
2857 <dd><p>Stage of the entry, either:</p>
2858 <blockquote>
2859 <div><ul class="simple">
2860 <li>0 = default stage</li>
2861 <li>1 = stage before a merge or common ancestor entry in case of a 3 way merge</li>
2862 <li>2 = stage of entries from the &#8216;left&#8217; side of the merge</li>
2863 <li>3 = stage of entries from the right side of the merge</li>
2864 </ul>
2865 </div></blockquote>
2866 <table class="docutils field-list" frame="void" rules="none">
2867 <col class="field-name" />
2868 <col class="field-body" />
2869 <tbody valign="top">
2870 <tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">For more information, see <a class="reference external" href="http://www.kernel.org/pub/software/scm/git/docs/git-read-tree.html">http://www.kernel.org/pub/software/scm/git/docs/git-read-tree.html</a></td>
2871 </tr>
2872 </tbody>
2873 </table>
2874 </dd></dl>
2875
2876 <dl class="method">
2877 <dt id="git.index.typ.BaseIndexEntry.to_blob">
2878 <code class="descname">to_blob</code><span class="sig-paren">(</span><em>repo</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.typ.BaseIndexEntry.to_blob" title="Permalink to this definition">¶</a></dt>
2879 <dd><table class="docutils field-list" frame="void" rules="none">
2880 <col class="field-name" />
2881 <col class="field-body" />
2882 <tbody valign="top">
2883 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Blob using the information of this index entry</td>
2884 </tr>
2885 </tbody>
2886 </table>
2887 </dd></dl>
2888
2889 </dd></dl>
2890
2891 <dl class="class">
2892 <dt id="git.index.typ.IndexEntry">
2893 <em class="property">class </em><code class="descclassname">git.index.typ.</code><code class="descname">IndexEntry</code><a class="headerlink" href="#git.index.typ.IndexEntry" title="Permalink to this definition">¶</a></dt>
2894 <dd><p>Allows convenient access to IndexEntry data without completely unpacking it.</p>
2895 <p>Attributes usully accessed often are cached in the tuple whereas others are
2896 unpacked on demand.</p>
2897 <p>See the properties for a mapping between names and tuple indices.</p>
2898 <dl class="attribute">
2899 <dt id="git.index.typ.IndexEntry.__module__">
2900 <code class="descname">__module__</code><em class="property"> = 'git.index.typ'</em><a class="headerlink" href="#git.index.typ.IndexEntry.__module__" title="Permalink to this definition">¶</a></dt>
2901 <dd></dd></dl>
2902
2903 <dl class="attribute">
2904 <dt id="git.index.typ.IndexEntry.ctime">
2905 <code class="descname">ctime</code><a class="headerlink" href="#git.index.typ.IndexEntry.ctime" title="Permalink to this definition">¶</a></dt>
2906 <dd><table class="docutils field-list" frame="void" rules="none">
2907 <col class="field-name" />
2908 <col class="field-body" />
2909 <tbody valign="top">
2910 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Tuple(int_time_seconds_since_epoch, int_nano_seconds) of the
2911 file&#8217;s creation time</td>
2912 </tr>
2913 </tbody>
2914 </table>
2915 </dd></dl>
2916
2917 <dl class="attribute">
2918 <dt id="git.index.typ.IndexEntry.dev">
2919 <code class="descname">dev</code><a class="headerlink" href="#git.index.typ.IndexEntry.dev" title="Permalink to this definition">¶</a></dt>
2920 <dd><p>Device ID</p>
2921 </dd></dl>
2922
2923 <dl class="classmethod">
2924 <dt id="git.index.typ.IndexEntry.from_base">
2925 <em class="property">classmethod </em><code class="descname">from_base</code><span class="sig-paren">(</span><em>base</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.typ.IndexEntry.from_base" title="Permalink to this definition">¶</a></dt>
2926 <dd><table class="docutils field-list" frame="void" rules="none">
2927 <col class="field-name" />
2928 <col class="field-body" />
2929 <tbody valign="top">
2930 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Minimal entry as created from the given BaseIndexEntry instance.
2931 Missing values will be set to null-like values</td>
2932 </tr>
2933 <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>base</strong> &#8211; Instance of type BaseIndexEntry</td>
2934 </tr>
2935 </tbody>
2936 </table>
2937 </dd></dl>
2938
2939 <dl class="classmethod">
2940 <dt id="git.index.typ.IndexEntry.from_blob">
2941 <em class="property">classmethod </em><code class="descname">from_blob</code><span class="sig-paren">(</span><em>blob</em>, <em>stage=0</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.typ.IndexEntry.from_blob" title="Permalink to this definition">¶</a></dt>
2942 <dd><table class="docutils field-list" frame="void" rules="none">
2943 <col class="field-name" />
2944 <col class="field-body" />
2945 <tbody valign="top">
2946 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Minimal entry resembling the given blob object</td>
2947 </tr>
2948 </tbody>
2949 </table>
2950 </dd></dl>
2951
2952 <dl class="attribute">
2953 <dt id="git.index.typ.IndexEntry.gid">
2954 <code class="descname">gid</code><a class="headerlink" href="#git.index.typ.IndexEntry.gid" title="Permalink to this definition">¶</a></dt>
2955 <dd><p>Group ID</p>
2956 </dd></dl>
2957
2958 <dl class="attribute">
2959 <dt id="git.index.typ.IndexEntry.inode">
2960 <code class="descname">inode</code><a class="headerlink" href="#git.index.typ.IndexEntry.inode" title="Permalink to this definition">¶</a></dt>
2961 <dd><p>Inode ID</p>
2962 </dd></dl>
2963
2964 <dl class="attribute">
2965 <dt id="git.index.typ.IndexEntry.mtime">
2966 <code class="descname">mtime</code><a class="headerlink" href="#git.index.typ.IndexEntry.mtime" title="Permalink to this definition">¶</a></dt>
2967 <dd><p>See ctime property, but returns modification time</p>
2968 </dd></dl>
2969
2970 <dl class="attribute">
2971 <dt id="git.index.typ.IndexEntry.size">
2972 <code class="descname">size</code><a class="headerlink" href="#git.index.typ.IndexEntry.size" title="Permalink to this definition">¶</a></dt>
2973 <dd><table class="docutils field-list" frame="void" rules="none">
2974 <col class="field-name" />
2975 <col class="field-body" />
2976 <tbody valign="top">
2977 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Uncompressed size of the blob</td>
2978 </tr>
2979 </tbody>
2980 </table>
2981 </dd></dl>
2982
2983 <dl class="attribute">
2984 <dt id="git.index.typ.IndexEntry.uid">
2985 <code class="descname">uid</code><a class="headerlink" href="#git.index.typ.IndexEntry.uid" title="Permalink to this definition">¶</a></dt>
2986 <dd><p>User ID</p>
2987 </dd></dl>
2988
2989 </dd></dl>
2990
2991 </div>
2992 <div class="section" id="module-git.index.util">
2993 <span id="index-util"></span><h2>Index.Util<a class="headerlink" href="#module-git.index.util" title="Permalink to this headline">¶</a></h2>
2994 <p>Module containing index utilities</p>
2995 <dl class="class">
2996 <dt id="git.index.util.TemporaryFileSwap">
2997 <em class="property">class </em><code class="descclassname">git.index.util.</code><code class="descname">TemporaryFileSwap</code><span class="sig-paren">(</span><em>file_path</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.util.TemporaryFileSwap" title="Permalink to this definition">¶</a></dt>
2998 <dd><p>Utility class moving a file to a temporary location within the same directory
2999 and moving it back on to where on object deletion.</p>
3000 <dl class="method">
3001 <dt id="git.index.util.TemporaryFileSwap.__del__">
3002 <code class="descname">__del__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.index.util.TemporaryFileSwap.__del__" title="Permalink to this definition">¶</a></dt>
3003 <dd></dd></dl>
3004
3005 <dl class="method">
3006 <dt id="git.index.util.TemporaryFileSwap.__init__">
3007 <code class="descname">__init__</code><span class="sig-paren">(</span><em>file_path</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.util.TemporaryFileSwap.__init__" title="Permalink to this definition">¶</a></dt>
3008 <dd></dd></dl>
3009
3010 <dl class="attribute">
3011 <dt id="git.index.util.TemporaryFileSwap.__module__">
3012 <code class="descname">__module__</code><em class="property"> = 'git.index.util'</em><a class="headerlink" href="#git.index.util.TemporaryFileSwap.__module__" title="Permalink to this definition">¶</a></dt>
3013 <dd></dd></dl>
3014
3015 <dl class="attribute">
3016 <dt id="git.index.util.TemporaryFileSwap.__slots__">
3017 <code class="descname">__slots__</code><em class="property"> = ('file_path', 'tmp_file_path')</em><a class="headerlink" href="#git.index.util.TemporaryFileSwap.__slots__" title="Permalink to this definition">¶</a></dt>
3018 <dd></dd></dl>
3019
3020 <dl class="attribute">
3021 <dt id="git.index.util.TemporaryFileSwap.file_path">
3022 <code class="descname">file_path</code><a class="headerlink" href="#git.index.util.TemporaryFileSwap.file_path" title="Permalink to this definition">¶</a></dt>
3023 <dd></dd></dl>
3024
3025 <dl class="attribute">
3026 <dt id="git.index.util.TemporaryFileSwap.tmp_file_path">
3027 <code class="descname">tmp_file_path</code><a class="headerlink" href="#git.index.util.TemporaryFileSwap.tmp_file_path" title="Permalink to this definition">¶</a></dt>
3028 <dd></dd></dl>
3029
3030 </dd></dl>
3031
3032 <dl class="function">
3033 <dt id="git.index.util.post_clear_cache">
3034 <code class="descclassname">git.index.util.</code><code class="descname">post_clear_cache</code><span class="sig-paren">(</span><em>func</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.util.post_clear_cache" title="Permalink to this definition">¶</a></dt>
3035 <dd><p>Decorator for functions that alter the index using the git command. This would
3036 invalidate our possibly existing entries dictionary which is why it must be
3037 deleted to allow it to be lazily reread later.</p>
3038 <table class="docutils field-list" frame="void" rules="none">
3039 <col class="field-name" />
3040 <col class="field-body" />
3041 <tbody valign="top">
3042 <tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">This decorator will not be required once all functions are implemented
3043 natively which in fact is possible, but probably not feasible performance wise.</td>
3044 </tr>
3045 </tbody>
3046 </table>
3047 </dd></dl>
3048
3049 <dl class="function">
3050 <dt id="git.index.util.default_index">
3051 <code class="descclassname">git.index.util.</code><code class="descname">default_index</code><span class="sig-paren">(</span><em>func</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.util.default_index" title="Permalink to this definition">¶</a></dt>
3052 <dd><p>Decorator assuring the wrapped method may only run if we are the default
3053 repository index. This is as we rely on git commands that operate
3054 on that index only.</p>
3055 </dd></dl>
3056
3057 <dl class="function">
3058 <dt id="git.index.util.git_working_dir">
3059 <code class="descclassname">git.index.util.</code><code class="descname">git_working_dir</code><span class="sig-paren">(</span><em>func</em><span class="sig-paren">)</span><a class="headerlink" href="#git.index.util.git_working_dir" title="Permalink to this definition">¶</a></dt>
3060 <dd><p>Decorator which changes the current working dir to the one of the git
3061 repository in order to assure relative paths are handled correctly</p>
3062 </dd></dl>
3063
3064 </div>
3065 <div class="section" id="module-git.cmd">
3066 <span id="gitcmd"></span><h2>GitCmd<a class="headerlink" href="#module-git.cmd" title="Permalink to this headline">¶</a></h2>
3067 <dl class="class">
3068 <dt id="git.cmd.Git">
3069 <em class="property">class </em><code class="descclassname">git.cmd.</code><code class="descname">Git</code><span class="sig-paren">(</span><em>working_dir=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git" title="Permalink to this definition">¶</a></dt>
3070 <dd><p>The Git class manages communication with the Git binary.</p>
3071 <p>It provides a convenient interface to calling the Git binary, such as in:</p>
3072 <div class="highlight-default"><div class="highlight"><pre><span></span><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>
3073 <span class="n">g</span><span class="o">.</span><span class="n">init</span><span class="p">()</span> <span class="c1"># calls &#39;git init&#39; program</span>
3074 <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="c1"># calls &#39;git ls-files&#39; program</span>
3075 </pre></div>
3076 </div>
3077 <dl class="docutils">
3078 <dt><code class="docutils literal"><span class="pre">Debugging</span></code></dt>
3079 <dd>Set the GIT_PYTHON_TRACE environment variable print each invocation
3080 of the command to stdout.
3081 Set its value to &#8216;full&#8217; to see details about the returned values.</dd>
3082 </dl>
3083 <dl class="class">
3084 <dt id="git.cmd.Git.AutoInterrupt">
3085 <em class="property">class </em><code class="descname">AutoInterrupt</code><span class="sig-paren">(</span><em>proc</em>, <em>args</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.AutoInterrupt" title="Permalink to this definition">¶</a></dt>
3086 <dd><p>Kill/Interrupt the stored process instance once this instance goes out of scope. It is
3087 used to prevent processes piling up in case iterators stop reading.
3088 Besides all attributes are wired through to the contained process object.</p>
3089 <p>The wait method was overridden to perform automatic status code checking
3090 and possibly raise.</p>
3091 <dl class="method">
3092 <dt id="git.cmd.Git.AutoInterrupt.__del__">
3093 <code class="descname">__del__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.AutoInterrupt.__del__" title="Permalink to this definition">¶</a></dt>
3094 <dd></dd></dl>
3095
3096 <dl class="method">
3097 <dt id="git.cmd.Git.AutoInterrupt.__getattr__">
3098 <code class="descname">__getattr__</code><span class="sig-paren">(</span><em>attr</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.AutoInterrupt.__getattr__" title="Permalink to this definition">¶</a></dt>
3099 <dd></dd></dl>
3100
3101 <dl class="method">
3102 <dt id="git.cmd.Git.AutoInterrupt.__init__">
3103 <code class="descname">__init__</code><span class="sig-paren">(</span><em>proc</em>, <em>args</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.AutoInterrupt.__init__" title="Permalink to this definition">¶</a></dt>
3104 <dd></dd></dl>
3105
3106 <dl class="attribute">
3107 <dt id="git.cmd.Git.AutoInterrupt.__module__">
3108 <code class="descname">__module__</code><em class="property"> = 'git.cmd'</em><a class="headerlink" href="#git.cmd.Git.AutoInterrupt.__module__" title="Permalink to this definition">¶</a></dt>
3109 <dd></dd></dl>
3110
3111 <dl class="attribute">
3112 <dt id="git.cmd.Git.AutoInterrupt.__slots__">
3113 <code class="descname">__slots__</code><em class="property"> = ('proc', 'args')</em><a class="headerlink" href="#git.cmd.Git.AutoInterrupt.__slots__" title="Permalink to this definition">¶</a></dt>
3114 <dd></dd></dl>
3115
3116 <dl class="attribute">
3117 <dt id="git.cmd.Git.AutoInterrupt.args">
3118 <code class="descname">args</code><a class="headerlink" href="#git.cmd.Git.AutoInterrupt.args" title="Permalink to this definition">¶</a></dt>
3119 <dd></dd></dl>
3120
3121 <dl class="attribute">
3122 <dt id="git.cmd.Git.AutoInterrupt.proc">
3123 <code class="descname">proc</code><a class="headerlink" href="#git.cmd.Git.AutoInterrupt.proc" title="Permalink to this definition">¶</a></dt>
3124 <dd></dd></dl>
3125
3126 <dl class="method">
3127 <dt id="git.cmd.Git.AutoInterrupt.wait">
3128 <code class="descname">wait</code><span class="sig-paren">(</span><em>stderr=''</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.AutoInterrupt.wait" title="Permalink to this definition">¶</a></dt>
3129 <dd><p>Wait for the process and return its status code.</p>
3130 <table class="docutils field-list" frame="void" rules="none">
3131 <col class="field-name" />
3132 <col class="field-body" />
3133 <tbody valign="top">
3134 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>stderr</strong> &#8211; Previously read value of stderr, in case stderr is already closed.</td>
3135 </tr>
3136 <tr class="field-even field"><th class="field-name">Warn:</th><td class="field-body">may deadlock if output or error pipes are used and not handled separately.</td>
3137 </tr>
3138 <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><strong>GitCommandError</strong> &#8211; if the return status is not 0</td>
3139 </tr>
3140 </tbody>
3141 </table>
3142 </dd></dl>
3143
3144 </dd></dl>
3145
3146 <dl class="attribute">
3147 <dt id="git.cmd.Git.CREATE_NO_WINDOW">
3148 <code class="descclassname">Git.</code><code class="descname">CREATE_NO_WINDOW</code><em class="property"> = 134217728</em><a class="headerlink" href="#git.cmd.Git.CREATE_NO_WINDOW" title="Permalink to this definition">¶</a></dt>
3149 <dd></dd></dl>
3150
3151 <dl class="class">
3152 <dt id="git.cmd.Git.CatFileContentStream">
3153 <em class="property">class </em><code class="descclassname">Git.</code><code class="descname">CatFileContentStream</code><span class="sig-paren">(</span><em>size</em>, <em>stream</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.CatFileContentStream" title="Permalink to this definition">¶</a></dt>
3154 <dd><p>Object representing a sized read-only stream returning the contents of
3155 an object.
3156 It behaves like a stream, but counts the data read and simulates an empty
3157 stream once our sized content region is empty.
3158 If not all data is read to the end of the objects&#8217;s lifetime, we read the
3159 rest to assure the underlying stream continues to work</p>
3160 <dl class="method">
3161 <dt id="git.cmd.Git.CatFileContentStream.__del__">
3162 <code class="descname">__del__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.CatFileContentStream.__del__" title="Permalink to this definition">¶</a></dt>
3163 <dd></dd></dl>
3164
3165 <dl class="method">
3166 <dt id="git.cmd.Git.CatFileContentStream.__init__">
3167 <code class="descname">__init__</code><span class="sig-paren">(</span><em>size</em>, <em>stream</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.CatFileContentStream.__init__" title="Permalink to this definition">¶</a></dt>
3168 <dd></dd></dl>
3169
3170 <dl class="method">
3171 <dt id="git.cmd.Git.CatFileContentStream.__iter__">
3172 <code class="descname">__iter__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.CatFileContentStream.__iter__" title="Permalink to this definition">¶</a></dt>
3173 <dd></dd></dl>
3174
3175 <dl class="attribute">
3176 <dt id="git.cmd.Git.CatFileContentStream.__module__">
3177 <code class="descname">__module__</code><em class="property"> = 'git.cmd'</em><a class="headerlink" href="#git.cmd.Git.CatFileContentStream.__module__" title="Permalink to this definition">¶</a></dt>
3178 <dd></dd></dl>
3179
3180 <dl class="attribute">
3181 <dt id="git.cmd.Git.CatFileContentStream.__slots__">
3182 <code class="descname">__slots__</code><em class="property"> = ('_stream', '_nbr', '_size')</em><a class="headerlink" href="#git.cmd.Git.CatFileContentStream.__slots__" title="Permalink to this definition">¶</a></dt>
3183 <dd></dd></dl>
3184
3185 <dl class="method">
3186 <dt id="git.cmd.Git.CatFileContentStream.next">
3187 <code class="descname">next</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.CatFileContentStream.next" title="Permalink to this definition">¶</a></dt>
3188 <dd></dd></dl>
3189
3190 <dl class="method">
3191 <dt id="git.cmd.Git.CatFileContentStream.read">
3192 <code class="descname">read</code><span class="sig-paren">(</span><em>size=-1</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.CatFileContentStream.read" title="Permalink to this definition">¶</a></dt>
3193 <dd></dd></dl>
3194
3195 <dl class="method">
3196 <dt id="git.cmd.Git.CatFileContentStream.readline">
3197 <code class="descname">readline</code><span class="sig-paren">(</span><em>size=-1</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.CatFileContentStream.readline" title="Permalink to this definition">¶</a></dt>
3198 <dd></dd></dl>
3199
3200 <dl class="method">
3201 <dt id="git.cmd.Git.CatFileContentStream.readlines">
3202 <code class="descname">readlines</code><span class="sig-paren">(</span><em>size=-1</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.CatFileContentStream.readlines" title="Permalink to this definition">¶</a></dt>
3203 <dd></dd></dl>
3204
3205 </dd></dl>
3206
3207 <dl class="attribute">
3208 <dt id="git.cmd.Git.GIT_PYTHON_GIT_EXECUTABLE">
3209 <code class="descclassname">Git.</code><code class="descname">GIT_PYTHON_GIT_EXECUTABLE</code><em class="property"> = 'git'</em><a class="headerlink" href="#git.cmd.Git.GIT_PYTHON_GIT_EXECUTABLE" title="Permalink to this definition">¶</a></dt>
3210 <dd></dd></dl>
3211
3212 <dl class="attribute">
3213 <dt id="git.cmd.Git.GIT_PYTHON_TRACE">
3214 <code class="descclassname">Git.</code><code class="descname">GIT_PYTHON_TRACE</code><em class="property"> = False</em><a class="headerlink" href="#git.cmd.Git.GIT_PYTHON_TRACE" title="Permalink to this definition">¶</a></dt>
3215 <dd></dd></dl>
3216
3217 <dl class="attribute">
3218 <dt id="git.cmd.Git.USE_SHELL">
3219 <code class="descclassname">Git.</code><code class="descname">USE_SHELL</code><em class="property"> = False</em><a class="headerlink" href="#git.cmd.Git.USE_SHELL" title="Permalink to this definition">¶</a></dt>
3220 <dd></dd></dl>
3221
3222 <dl class="method">
3223 <dt id="git.cmd.Git.__call__">
3224 <code class="descclassname">Git.</code><code class="descname">__call__</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.__call__" title="Permalink to this definition">¶</a></dt>
3225 <dd><p>Specify command line options to the git executable
3226 for a subcommand call</p>
3227 <table class="docutils field-list" frame="void" rules="none">
3228 <col class="field-name" />
3229 <col class="field-body" />
3230 <tbody valign="top">
3231 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>kwargs</strong> &#8211; is a dict of keyword arguments.
3232 these arguments are passed as in _call_process
3233 but will be passed to the git command rather than
3234 the subcommand.</td>
3235 </tr>
3236 </tbody>
3237 </table>
3238 <dl class="docutils">
3239 <dt><code class="docutils literal"><span class="pre">Examples</span></code>::</dt>
3240 <dd>git(work_tree=&#8217;/tmp&#8217;).difftool()</dd>
3241 </dl>
3242 </dd></dl>
3243
3244 <dl class="method">
3245 <dt id="git.cmd.Git.__getattr__">
3246 <code class="descclassname">Git.</code><code class="descname">__getattr__</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.__getattr__" title="Permalink to this definition">¶</a></dt>
3247 <dd><p>A convenience method as it allows to call the command as if it was
3248 an object.
3249 :return: Callable object that will execute call _call_process with your arguments.</p>
3250 </dd></dl>
3251
3252 <dl class="method">
3253 <dt id="git.cmd.Git.__getstate__">
3254 <code class="descclassname">Git.</code><code class="descname">__getstate__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.__getstate__" title="Permalink to this definition">¶</a></dt>
3255 <dd></dd></dl>
3256
3257 <dl class="method">
3258 <dt id="git.cmd.Git.__init__">
3259 <code class="descclassname">Git.</code><code class="descname">__init__</code><span class="sig-paren">(</span><em>working_dir=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.__init__" title="Permalink to this definition">¶</a></dt>
3260 <dd><p>Initialize this instance with:</p>
3261 <table class="docutils field-list" frame="void" rules="none">
3262 <col class="field-name" />
3263 <col class="field-body" />
3264 <tbody valign="top">
3265 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>working_dir</strong> &#8211; Git directory we should work in. If None, we always work in the current
3266 directory as returned by os.getcwd().
3267 It is meant to be the working tree directory if available, or the
3268 .git directory in case of bare repositories.</td>
3269 </tr>
3270 </tbody>
3271 </table>
3272 </dd></dl>
3273
3274 <dl class="attribute">
3275 <dt id="git.cmd.Git.__module__">
3276 <code class="descclassname">Git.</code><code class="descname">__module__</code><em class="property"> = 'git.cmd'</em><a class="headerlink" href="#git.cmd.Git.__module__" title="Permalink to this definition">¶</a></dt>
3277 <dd></dd></dl>
3278
3279 <dl class="method">
3280 <dt id="git.cmd.Git.__setstate__">
3281 <code class="descclassname">Git.</code><code class="descname">__setstate__</code><span class="sig-paren">(</span><em>d</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.__setstate__" title="Permalink to this definition">¶</a></dt>
3282 <dd></dd></dl>
3283
3284 <dl class="attribute">
3285 <dt id="git.cmd.Git.__slots__">
3286 <code class="descclassname">Git.</code><code class="descname">__slots__</code><em class="property"> = ('_working_dir', 'cat_file_all', 'cat_file_header', '_version_info', '_git_options', '_environment')</em><a class="headerlink" href="#git.cmd.Git.__slots__" title="Permalink to this definition">¶</a></dt>
3287 <dd></dd></dl>
3288
3289 <dl class="attribute">
3290 <dt id="git.cmd.Git.cat_file_all">
3291 <code class="descclassname">Git.</code><code class="descname">cat_file_all</code><a class="headerlink" href="#git.cmd.Git.cat_file_all" title="Permalink to this definition">¶</a></dt>
3292 <dd></dd></dl>
3293
3294 <dl class="attribute">
3295 <dt id="git.cmd.Git.cat_file_header">
3296 <code class="descclassname">Git.</code><code class="descname">cat_file_header</code><a class="headerlink" href="#git.cmd.Git.cat_file_header" title="Permalink to this definition">¶</a></dt>
3297 <dd></dd></dl>
3298
3299 <dl class="method">
3300 <dt id="git.cmd.Git.clear_cache">
3301 <code class="descclassname">Git.</code><code class="descname">clear_cache</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.clear_cache" title="Permalink to this definition">¶</a></dt>
3302 <dd><p>Clear all kinds of internal caches to release resources.</p>
3303 <p>Currently persistent commands will be interrupted.</p>
3304 <table class="docutils field-list" frame="void" rules="none">
3305 <col class="field-name" />
3306 <col class="field-body" />
3307 <tbody valign="top">
3308 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">self</td>
3309 </tr>
3310 </tbody>
3311 </table>
3312 </dd></dl>
3313
3314 <dl class="method">
3315 <dt id="git.cmd.Git.custom_environment">
3316 <code class="descclassname">Git.</code><code class="descname">custom_environment</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwds</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.custom_environment" title="Permalink to this definition">¶</a></dt>
3317 <dd><p>A context manager around the above <code class="docutils literal"><span class="pre">update_environment</span></code> method to restore the
3318 environment back to its previous state after operation.</p>
3319 <p><code class="docutils literal"><span class="pre">Examples</span></code>:</p>
3320 <div class="highlight-default"><div class="highlight"><pre><span></span><span class="k">with</span> <span class="bp">self</span><span class="o">.</span><span class="n">custom_environment</span><span class="p">(</span><span class="n">GIT_SSH</span><span class="o">=</span><span class="s1">&#39;/bin/ssh_wrapper&#39;</span><span class="p">):</span>
3321 <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="o">.</span><span class="n">fetch</span><span class="p">()</span>
3322 </pre></div>
3323 </div>
3324 <table class="docutils field-list" frame="void" rules="none">
3325 <col class="field-name" />
3326 <col class="field-body" />
3327 <tbody valign="top">
3328 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>kwargs</strong> &#8211; see update_environment</td>
3329 </tr>
3330 </tbody>
3331 </table>
3332 </dd></dl>
3333
3334 <dl class="method">
3335 <dt id="git.cmd.Git.environment">
3336 <code class="descclassname">Git.</code><code class="descname">environment</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.environment" title="Permalink to this definition">¶</a></dt>
3337 <dd></dd></dl>
3338
3339 <dl class="method">
3340 <dt id="git.cmd.Git.execute">
3341 <code class="descclassname">Git.</code><code class="descname">execute</code><span class="sig-paren">(</span><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>as_process=False</em>, <em>output_stream=None</em>, <em>stdout_as_string=True</em>, <em>kill_after_timeout=None</em>, <em>with_stdout=True</em>, <em>universal_newlines=False</em>, <em>**subprocess_kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.execute" title="Permalink to this definition">¶</a></dt>
3342 <dd><p>Handles executing the command on the shell and consumes and returns
3343 the returned information (stdout)</p>
3344 <table class="docutils field-list" frame="void" rules="none">
3345 <col class="field-name" />
3346 <col class="field-body" />
3347 <tbody valign="top">
3348 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
3349 <li><strong>command</strong> &#8211; The command argument list to execute.
3350 It should be a string, or a sequence of program arguments. The
3351 program to execute is the first item in the args sequence or string.</li>
3352 <li><strong>istream</strong> &#8211; Standard input filehandle passed to subprocess.Popen.</li>
3353 <li><strong>with_keep_cwd</strong> &#8211; Whether to use the current working directory from os.getcwd().
3354 The cmd otherwise uses its own working_dir that it has been initialized
3355 with if possible.</li>
3356 <li><strong>with_extended_output</strong> &#8211; Whether to return a (status, stdout, stderr) tuple.</li>
3357 <li><strong>with_exceptions</strong> &#8211; Whether to raise an exception when git returns a non-zero status.</li>
3358 <li><strong>as_process</strong> &#8211; Whether to return the created process instance directly from which
3359 streams can be read on demand. This will render with_extended_output and
3360 with_exceptions ineffective - the caller will have
3361 to deal with the details himself.
3362 It is important to note that the process will be placed into an AutoInterrupt
3363 wrapper that will interrupt the process once it goes out of scope. If you
3364 use the command in iterators, you should pass the whole process instance
3365 instead of a single stream.</li>
3366 <li><strong>output_stream</strong> &#8211; If set to a file-like object, data produced by the git command will be
3367 output to the given stream directly.
3368 This feature only has any effect if as_process is False. Processes will
3369 always be created with a pipe due to issues with subprocess.
3370 This merely is a workaround as data will be copied from the
3371 output pipe to the given output stream directly.
3372 Judging from the implementation, you shouldn&#8217;t use this flag !</li>
3373 <li><strong>stdout_as_string</strong> &#8211; if False, the commands standard output will be bytes. Otherwise, it will be
3374 decoded into a string using the default encoding (usually utf-8).
3375 The latter can fail, if the output contains binary data.</li>
3376 <li><strong>subprocess_kwargs</strong> &#8211; Keyword arguments to be passed to subprocess.Popen. Please note that
3377 some of the valid kwargs are already set by this method, the ones you
3378 specify may not be the same ones.</li>
3379 <li><strong>with_stdout</strong> &#8211; If True, default True, we open stdout on the created process</li>
3380 <li><strong>universal_newlines</strong> &#8211; if True, pipes will be opened as text, and lines are split at
3381 all known line endings.</li>
3382 <li><strong>kill_after_timeout</strong> &#8211; To specify a timeout in seconds for the git command, after which the process
3383 should be killed. This will have no effect if as_process is set to True. It is
3384 set to None by default and will let the process run until the timeout is
3385 explicitly specified. This feature is not supported on Windows. It&#8217;s also worth
3386 noting that kill_after_timeout uses SIGKILL, which can have negative side
3387 effects on a repository. For example, stale locks in case of git gc could
3388 render the repository incapable of accepting changes until the lock is manually
3389 removed.</li>
3390 </ul>
3391 </td>
3392 </tr>
3393 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><ul class="simple">
3394 <li>str(output) if extended_output = False (Default)</li>
3395 <li>tuple(int(status), str(stdout), str(stderr)) if extended_output = True</li>
3396 </ul>
3397 <p>if ouput_stream is True, the stdout value will be your output stream:
3398 * output_stream if extended_output = False
3399 * tuple(int(status), output_stream, str(stderr)) if extended_output = True</p>
3400 <p>Note git is executed with LC_MESSAGES=&#8221;C&#8221; to ensure consistent
3401 output regardless of system language.</p>
3402 </p>
3403 </td>
3404 </tr>
3405 <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first"><strong>GitCommandError</strong> &#8211; </p>
3406 </td>
3407 </tr>
3408 <tr class="field-even field"><th class="field-name">Note:</th><td class="field-body"><p class="first last">If you add additional keyword arguments to the signature of this method,
3409 you must update the execute_kwargs tuple housed in this module.</p>
3410 </td>
3411 </tr>
3412 </tbody>
3413 </table>
3414 </dd></dl>
3415
3416 <dl class="method">
3417 <dt id="git.cmd.Git.get_object_data">
3418 <code class="descclassname">Git.</code><code class="descname">get_object_data</code><span class="sig-paren">(</span><em>ref</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.get_object_data" title="Permalink to this definition">¶</a></dt>
3419 <dd><p>As get_object_header, but returns object data as well
3420 :return: (hexsha, type_string, size_as_int,data_string)
3421 :note: not threadsafe</p>
3422 </dd></dl>
3423
3424 <dl class="method">
3425 <dt id="git.cmd.Git.get_object_header">
3426 <code class="descclassname">Git.</code><code class="descname">get_object_header</code><span class="sig-paren">(</span><em>ref</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.get_object_header" title="Permalink to this definition">¶</a></dt>
3427 <dd><p>Use this method to quickly examine the type and size of the object behind
3428 the given ref.</p>
3429 <table class="docutils field-list" frame="void" rules="none">
3430 <col class="field-name" />
3431 <col class="field-body" />
3432 <tbody valign="top">
3433 <tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">The method will only suffer from the costs of command invocation
3434 once and reuses the command in subsequent calls.</td>
3435 </tr>
3436 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">(hexsha, type_string, size_as_int)</td>
3437 </tr>
3438 </tbody>
3439 </table>
3440 </dd></dl>
3441
3442 <dl class="attribute">
3443 <dt id="git.cmd.Git.git_exec_name">
3444 <code class="descclassname">Git.</code><code class="descname">git_exec_name</code><em class="property"> = 'git'</em><a class="headerlink" href="#git.cmd.Git.git_exec_name" title="Permalink to this definition">¶</a></dt>
3445 <dd></dd></dl>
3446
3447 <dl class="attribute">
3448 <dt id="git.cmd.Git.git_exec_name_win">
3449 <code class="descclassname">Git.</code><code class="descname">git_exec_name_win</code><em class="property"> = 'git.cmd'</em><a class="headerlink" href="#git.cmd.Git.git_exec_name_win" title="Permalink to this definition">¶</a></dt>
3450 <dd></dd></dl>
3451
3452 <dl class="attribute">
3453 <dt id="git.cmd.Git.max_chunk_size">
3454 <code class="descclassname">Git.</code><code class="descname">max_chunk_size</code><em class="property"> = 65536</em><a class="headerlink" href="#git.cmd.Git.max_chunk_size" title="Permalink to this definition">¶</a></dt>
3455 <dd></dd></dl>
3456
3457 <dl class="method">
3458 <dt id="git.cmd.Git.stream_object_data">
3459 <code class="descclassname">Git.</code><code class="descname">stream_object_data</code><span class="sig-paren">(</span><em>ref</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.stream_object_data" title="Permalink to this definition">¶</a></dt>
3460 <dd><p>As get_object_header, but returns the data as a stream</p>
3461 <table class="docutils field-list" frame="void" rules="none">
3462 <col class="field-name" />
3463 <col class="field-body" />
3464 <tbody valign="top">
3465 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">(hexsha, type_string, size_as_int, stream)</td>
3466 </tr>
3467 <tr class="field-even field"><th class="field-name">Note:</th><td class="field-body">This method is not threadsafe, you need one independent Command instance per thread to be safe !</td>
3468 </tr>
3469 </tbody>
3470 </table>
3471 </dd></dl>
3472
3473 <dl class="method">
3474 <dt id="git.cmd.Git.transform_kwarg">
3475 <code class="descclassname">Git.</code><code class="descname">transform_kwarg</code><span class="sig-paren">(</span><em>name</em>, <em>value</em>, <em>split_single_char_options</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.transform_kwarg" title="Permalink to this definition">¶</a></dt>
3476 <dd></dd></dl>
3477
3478 <dl class="method">
3479 <dt id="git.cmd.Git.transform_kwargs">
3480 <code class="descclassname">Git.</code><code class="descname">transform_kwargs</code><span class="sig-paren">(</span><em>split_single_char_options=True</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.transform_kwargs" title="Permalink to this definition">¶</a></dt>
3481 <dd><p>Transforms Python style kwargs into git command line options.</p>
3482 </dd></dl>
3483
3484 <dl class="method">
3485 <dt id="git.cmd.Git.update_environment">
3486 <code class="descclassname">Git.</code><code class="descname">update_environment</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.cmd.Git.update_environment" title="Permalink to this definition">¶</a></dt>
3487 <dd><p>Set environment variables for future git invocations. Return all changed
3488 values in a format that can be passed back into this function to revert
3489 the changes:</p>
3490 <p><code class="docutils literal"><span class="pre">Examples</span></code>:</p>
3491 <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">old_env</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">update_environment</span><span class="p">(</span><span class="n">PWD</span><span class="o">=</span><span class="s1">&#39;/tmp&#39;</span><span class="p">)</span>
3492 <span class="bp">self</span><span class="o">.</span><span class="n">update_environment</span><span class="p">(</span><span class="o">**</span><span class="n">old_env</span><span class="p">)</span>
3493 </pre></div>
3494 </div>
3495 <table class="docutils field-list" frame="void" rules="none">
3496 <col class="field-name" />
3497 <col class="field-body" />
3498 <tbody valign="top">
3499 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>kwargs</strong> &#8211; environment variables to use for git processes</td>
3500 </tr>
3501 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">dict that maps environment variables to their old values</td>
3502 </tr>
3503 </tbody>
3504 </table>
3505 </dd></dl>
3506
3507 <dl class="attribute">
3508 <dt id="git.cmd.Git.version_info">
3509 <code class="descclassname">Git.</code><code class="descname">version_info</code><a class="headerlink" href="#git.cmd.Git.version_info" title="Permalink to this definition">¶</a></dt>
3510 <dd><table class="docutils field-list" frame="void" rules="none">
3511 <col class="field-name" />
3512 <col class="field-body" />
3513 <tbody valign="top">
3514 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">tuple(int, int, int, int) tuple with integers representing the major, minor
3515 and additional version numbers as parsed from git version.
3516 This value is generated on demand and is cached</td>
3517 </tr>
3518 </tbody>
3519 </table>
3520 </dd></dl>
3521
3522 <dl class="attribute">
3523 <dt id="git.cmd.Git.working_dir">
3524 <code class="descclassname">Git.</code><code class="descname">working_dir</code><a class="headerlink" href="#git.cmd.Git.working_dir" title="Permalink to this definition">¶</a></dt>
3525 <dd><table class="docutils field-list" frame="void" rules="none">
3526 <col class="field-name" />
3527 <col class="field-body" />
3528 <tbody valign="top">
3529 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Git directory we are working on</td>
3530 </tr>
3531 </tbody>
3532 </table>
3533 </dd></dl>
3534
3535 </dd></dl>
3536
3537 </div>
3538 <div class="section" id="module-git.config">
3539 <span id="config"></span><h2>Config<a class="headerlink" href="#module-git.config" title="Permalink to this headline">¶</a></h2>
3540 <p>Module containing module parser implementation able to properly read and write
3541 configuration files</p>
3542 <dl class="attribute">
3543 <dt id="git.config.GitConfigParser">
3544 <code class="descclassname">git.config.</code><code class="descname">GitConfigParser</code><a class="headerlink" href="#git.config.GitConfigParser" title="Permalink to this definition">¶</a></dt>
3545 <dd><p>alias of <code class="xref py py-class docutils literal"><span class="pre">write</span></code></p>
3546 </dd></dl>
3547
3548 <dl class="class">
3549 <dt id="git.config.SectionConstraint">
3550 <em class="property">class </em><code class="descclassname">git.config.</code><code class="descname">SectionConstraint</code><span class="sig-paren">(</span><em>config</em>, <em>section</em><span class="sig-paren">)</span><a class="headerlink" href="#git.config.SectionConstraint" title="Permalink to this definition">¶</a></dt>
3551 <dd><p>Constrains a ConfigParser to only option commands which are constrained to
3552 always use the section we have been initialized with.</p>
3553 <p>It supports all ConfigParser methods that operate on an option.</p>
3554 <table class="docutils field-list" frame="void" rules="none">
3555 <col class="field-name" />
3556 <col class="field-body" />
3557 <tbody valign="top">
3558 <tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">If used as a context manager, will release the wrapped ConfigParser.</td>
3559 </tr>
3560 </tbody>
3561 </table>
3562 <dl class="method">
3563 <dt id="git.config.SectionConstraint.__del__">
3564 <code class="descname">__del__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.config.SectionConstraint.__del__" title="Permalink to this definition">¶</a></dt>
3565 <dd></dd></dl>
3566
3567 <dl class="method">
3568 <dt id="git.config.SectionConstraint.__enter__">
3569 <code class="descname">__enter__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.config.SectionConstraint.__enter__" title="Permalink to this definition">¶</a></dt>
3570 <dd></dd></dl>
3571
3572 <dl class="method">
3573 <dt id="git.config.SectionConstraint.__exit__">
3574 <code class="descname">__exit__</code><span class="sig-paren">(</span><em>exception_type</em>, <em>exception_value</em>, <em>traceback</em><span class="sig-paren">)</span><a class="headerlink" href="#git.config.SectionConstraint.__exit__" title="Permalink to this definition">¶</a></dt>
3575 <dd></dd></dl>
3576
3577 <dl class="method">
3578 <dt id="git.config.SectionConstraint.__getattr__">
3579 <code class="descname">__getattr__</code><span class="sig-paren">(</span><em>attr</em><span class="sig-paren">)</span><a class="headerlink" href="#git.config.SectionConstraint.__getattr__" title="Permalink to this definition">¶</a></dt>
3580 <dd></dd></dl>
3581
3582 <dl class="method">
3583 <dt id="git.config.SectionConstraint.__init__">
3584 <code class="descname">__init__</code><span class="sig-paren">(</span><em>config</em>, <em>section</em><span class="sig-paren">)</span><a class="headerlink" href="#git.config.SectionConstraint.__init__" title="Permalink to this definition">¶</a></dt>
3585 <dd></dd></dl>
3586
3587 <dl class="attribute">
3588 <dt id="git.config.SectionConstraint.__module__">
3589 <code class="descname">__module__</code><em class="property"> = 'git.config'</em><a class="headerlink" href="#git.config.SectionConstraint.__module__" title="Permalink to this definition">¶</a></dt>
3590 <dd></dd></dl>
3591
3592 <dl class="attribute">
3593 <dt id="git.config.SectionConstraint.__slots__">
3594 <code class="descname">__slots__</code><em class="property"> = ('_config', '_section_name')</em><a class="headerlink" href="#git.config.SectionConstraint.__slots__" title="Permalink to this definition">¶</a></dt>
3595 <dd></dd></dl>
3596
3597 <dl class="attribute">
3598 <dt id="git.config.SectionConstraint.config">
3599 <code class="descname">config</code><a class="headerlink" href="#git.config.SectionConstraint.config" title="Permalink to this definition">¶</a></dt>
3600 <dd><p>return: Configparser instance we constrain</p>
3601 </dd></dl>
3602
3603 <dl class="method">
3604 <dt id="git.config.SectionConstraint.release">
3605 <code class="descname">release</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.config.SectionConstraint.release" title="Permalink to this definition">¶</a></dt>
3606 <dd><p>Equivalent to GitConfigParser.release(), which is called on our underlying parser instance</p>
3607 </dd></dl>
3608
3609 </dd></dl>
3610
3611 </div>
3612 <div class="section" id="module-git.diff">
3613 <span id="diff"></span><h2>Diff<a class="headerlink" href="#module-git.diff" title="Permalink to this headline">¶</a></h2>
3614 <dl class="class">
3615 <dt id="git.diff.Diffable">
3616 <em class="property">class </em><code class="descclassname">git.diff.</code><code class="descname">Diffable</code><a class="headerlink" href="#git.diff.Diffable" title="Permalink to this definition">¶</a></dt>
3617 <dd><p>Common interface for all object that can be diffed against another object of compatible type.</p>
3618 <table class="docutils field-list" frame="void" rules="none">
3619 <col class="field-name" />
3620 <col class="field-body" />
3621 <tbody valign="top">
3622 <tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">Subclasses require a repo member as it is the case for Object instances, for practical
3623 reasons we do not derive from Object.</td>
3624 </tr>
3625 </tbody>
3626 </table>
3627 <dl class="class">
3628 <dt id="git.diff.Diffable.Index">
3629 <em class="property">class </em><code class="descname">Index</code><a class="headerlink" href="#git.diff.Diffable.Index" title="Permalink to this definition">¶</a></dt>
3630 <dd><dl class="attribute">
3631 <dt id="git.diff.Diffable.Index.__dict__">
3632 <code class="descname">__dict__</code><em class="property"> = dict_proxy({'__dict__': &lt;attribute '__dict__' of 'Index' objects&gt;, '__module__': 'git.diff', '__weakref__': &lt;attribute '__weakref__' of 'Index' objects&gt;, '__doc__': None})</em><a class="headerlink" href="#git.diff.Diffable.Index.__dict__" title="Permalink to this definition">¶</a></dt>
3633 <dd></dd></dl>
3634
3635 <dl class="attribute">
3636 <dt id="git.diff.Diffable.Index.__module__">
3637 <code class="descname">__module__</code><em class="property"> = 'git.diff'</em><a class="headerlink" href="#git.diff.Diffable.Index.__module__" title="Permalink to this definition">¶</a></dt>
3638 <dd></dd></dl>
3639
3640 <dl class="attribute">
3641 <dt id="git.diff.Diffable.Index.__weakref__">
3642 <code class="descname">__weakref__</code><a class="headerlink" href="#git.diff.Diffable.Index.__weakref__" title="Permalink to this definition">¶</a></dt>
3643 <dd><p>list of weak references to the object (if defined)</p>
3644 </dd></dl>
3645
3646 </dd></dl>
3647
3648 <dl class="attribute">
3649 <dt id="git.diff.Diffable.__module__">
3650 <code class="descclassname">Diffable.</code><code class="descname">__module__</code><em class="property"> = 'git.diff'</em><a class="headerlink" href="#git.diff.Diffable.__module__" title="Permalink to this definition">¶</a></dt>
3651 <dd></dd></dl>
3652
3653 <dl class="attribute">
3654 <dt id="git.diff.Diffable.__slots__">
3655 <code class="descclassname">Diffable.</code><code class="descname">__slots__</code><em class="property"> = ()</em><a class="headerlink" href="#git.diff.Diffable.__slots__" title="Permalink to this definition">¶</a></dt>
3656 <dd></dd></dl>
3657
3658 <dl class="method">
3659 <dt id="git.diff.Diffable.diff">
3660 <code class="descclassname">Diffable.</code><code class="descname">diff</code><span class="sig-paren">(</span><em>other=&lt;class 'git.diff.Index'&gt;</em>, <em>paths=None</em>, <em>create_patch=False</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.diff.Diffable.diff" title="Permalink to this definition">¶</a></dt>
3661 <dd><p>Creates diffs between two items being trees, trees and index or an
3662 index and the working tree. It will detect renames automatically.</p>
3663 <table class="docutils field-list" frame="void" rules="none">
3664 <col class="field-name" />
3665 <col class="field-body" />
3666 <tbody valign="top">
3667 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
3668 <li><strong>other</strong> &#8211; Is the item to compare us with.
3669 If None, we will be compared to the working tree.
3670 If Treeish, it will be compared against the respective tree
3671 If Index ( type ), it will be compared against the index.
3672 If git.NULL_TREE, it will compare against the empty tree.
3673 It defaults to Index to assure the method will not by-default fail
3674 on bare repositories.</li>
3675 <li><strong>paths</strong> &#8211; is a list of paths or a single path to limit the diff to.
3676 It will only include at least one of the givne path or paths.</li>
3677 <li><strong>create_patch</strong> &#8211; If True, the returned Diff contains a detailed patch that if applied
3678 makes the self to other. Patches are somwhat costly as blobs have to be read
3679 and diffed.</li>
3680 <li><strong>kwargs</strong> &#8211; Additional arguments passed to git-diff, such as
3681 R=True to swap both sides of the diff.</li>
3682 </ul>
3683 </td>
3684 </tr>
3685 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">git.DiffIndex</p>
3686 </td>
3687 </tr>
3688 <tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body"><p class="first last">On a bare repository, &#8216;other&#8217; needs to be provided as Index or as
3689 as Tree/Commit, or a git command error will occour</p>
3690 </td>
3691 </tr>
3692 </tbody>
3693 </table>
3694 </dd></dl>
3695
3696 </dd></dl>
3697
3698 <dl class="class">
3699 <dt id="git.diff.DiffIndex">
3700 <em class="property">class </em><code class="descclassname">git.diff.</code><code class="descname">DiffIndex</code><a class="headerlink" href="#git.diff.DiffIndex" title="Permalink to this definition">¶</a></dt>
3701 <dd><p>Implements an Index for diffs, allowing a list of Diffs to be queried by
3702 the diff properties.</p>
3703 <p>The class improves the diff handling convenience</p>
3704 <dl class="attribute">
3705 <dt id="git.diff.DiffIndex.__dict__">
3706 <code class="descname">__dict__</code><em class="property"> = dict_proxy({'iter_change_type': &lt;function iter_change_type at 0x10fe27848&gt;, '__module__': 'git.diff', 'change_type': ('A', 'D', 'R', 'M'), '__dict__': &lt;attribute '__dict__' of 'DiffIndex' objects&gt;, '__weakref__': &lt;attribute '__weakref__' of 'DiffIndex' objects&gt;, '__doc__': 'Implements an Index for diffs, allowing a list of Diffs to be queried by\n the diff properties.\n\n The class improves the diff handling convenience'})</em><a class="headerlink" href="#git.diff.DiffIndex.__dict__" title="Permalink to this definition">¶</a></dt>
3707 <dd></dd></dl>
3708
3709 <dl class="attribute">
3710 <dt id="git.diff.DiffIndex.__module__">
3711 <code class="descname">__module__</code><em class="property"> = 'git.diff'</em><a class="headerlink" href="#git.diff.DiffIndex.__module__" title="Permalink to this definition">¶</a></dt>
3712 <dd></dd></dl>
3713
3714 <dl class="attribute">
3715 <dt id="git.diff.DiffIndex.__weakref__">
3716 <code class="descname">__weakref__</code><a class="headerlink" href="#git.diff.DiffIndex.__weakref__" title="Permalink to this definition">¶</a></dt>
3717 <dd><p>list of weak references to the object (if defined)</p>
3718 </dd></dl>
3719
3720 <dl class="attribute">
3721 <dt id="git.diff.DiffIndex.change_type">
3722 <code class="descname">change_type</code><em class="property"> = ('A', 'D', 'R', 'M')</em><a class="headerlink" href="#git.diff.DiffIndex.change_type" title="Permalink to this definition">¶</a></dt>
3723 <dd></dd></dl>
3724
3725 <dl class="method">
3726 <dt id="git.diff.DiffIndex.iter_change_type">
3727 <code class="descname">iter_change_type</code><span class="sig-paren">(</span><em>change_type</em><span class="sig-paren">)</span><a class="headerlink" href="#git.diff.DiffIndex.iter_change_type" title="Permalink to this definition">¶</a></dt>
3728 <dd><table class="docutils field-list" frame="void" rules="none">
3729 <col class="field-name" />
3730 <col class="field-body" />
3731 <tbody valign="top">
3732 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">iterator yieling Diff instances that match the given change_type</td>
3733 </tr>
3734 <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>change_type</strong> &#8211; <p>Member of DiffIndex.change_type, namely:</p>
3735 <ul class="simple">
3736 <li>&#8216;A&#8217; for added paths</li>
3737 <li>&#8216;D&#8217; for deleted paths</li>
3738 <li>&#8216;R&#8217; for renamed paths</li>
3739 <li>&#8216;M&#8217; for paths with modified data</li>
3740 </ul>
3741 </td>
3742 </tr>
3743 </tbody>
3744 </table>
3745 </dd></dl>
3746
3747 </dd></dl>
3748
3749 <dl class="class">
3750 <dt id="git.diff.Diff">
3751 <em class="property">class </em><code class="descclassname">git.diff.</code><code class="descname">Diff</code><span class="sig-paren">(</span><em>repo</em>, <em>a_rawpath</em>, <em>b_rawpath</em>, <em>a_blob_id</em>, <em>b_blob_id</em>, <em>a_mode</em>, <em>b_mode</em>, <em>new_file</em>, <em>deleted_file</em>, <em>raw_rename_from</em>, <em>raw_rename_to</em>, <em>diff</em>, <em>change_type</em><span class="sig-paren">)</span><a class="headerlink" href="#git.diff.Diff" title="Permalink to this definition">¶</a></dt>
3752 <dd><p>A Diff contains diff information between two Trees.</p>
3753 <p>It contains two sides a and b of the diff, members are prefixed with
3754 &#8220;a&#8221; and &#8220;b&#8221; respectively to inidcate that.</p>
3755 <p>Diffs keep information about the changed blob objects, the file mode, renames,
3756 deletions and new files.</p>
3757 <p>There are a few cases where None has to be expected as member variable value:</p>
3758 <p><code class="docutils literal"><span class="pre">New</span> <span class="pre">File</span></code>:</p>
3759 <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">a_mode</span> <span class="ow">is</span> <span class="kc">None</span>
3760 <span class="n">a_blob</span> <span class="ow">is</span> <span class="kc">None</span>
3761 <span class="n">a_path</span> <span class="ow">is</span> <span class="kc">None</span>
3762 </pre></div>
3763 </div>
3764 <p><code class="docutils literal"><span class="pre">Deleted</span> <span class="pre">File</span></code>:</p>
3765 <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">b_mode</span> <span class="ow">is</span> <span class="kc">None</span>
3766 <span class="n">b_blob</span> <span class="ow">is</span> <span class="kc">None</span>
3767 <span class="n">b_path</span> <span class="ow">is</span> <span class="kc">None</span>
3768 </pre></div>
3769 </div>
3770 <p><code class="docutils literal"><span class="pre">Working</span> <span class="pre">Tree</span> <span class="pre">Blobs</span></code></p>
3771 <blockquote>
3772 <div>When comparing to working trees, the working tree blob will have a null hexsha
3773 as a corresponding object does not yet exist. The mode will be null as well.
3774 But the path will be available though.
3775 If it is listed in a diff the working tree version of the file must
3776 be different to the version in the index or tree, and hence has been modified.</div></blockquote>
3777 <dl class="attribute">
3778 <dt id="git.diff.Diff.NULL_BIN_SHA">
3779 <code class="descname">NULL_BIN_SHA</code><em class="property"> = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'</em><a class="headerlink" href="#git.diff.Diff.NULL_BIN_SHA" title="Permalink to this definition">¶</a></dt>
3780 <dd></dd></dl>
3781
3782 <dl class="attribute">
3783 <dt id="git.diff.Diff.NULL_HEX_SHA">
3784 <code class="descname">NULL_HEX_SHA</code><em class="property"> = '0000000000000000000000000000000000000000'</em><a class="headerlink" href="#git.diff.Diff.NULL_HEX_SHA" title="Permalink to this definition">¶</a></dt>
3785 <dd></dd></dl>
3786
3787 <dl class="method">
3788 <dt id="git.diff.Diff.__eq__">
3789 <code class="descname">__eq__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#git.diff.Diff.__eq__" title="Permalink to this definition">¶</a></dt>
3790 <dd></dd></dl>
3791
3792 <dl class="method">
3793 <dt id="git.diff.Diff.__hash__">
3794 <code class="descname">__hash__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.diff.Diff.__hash__" title="Permalink to this definition">¶</a></dt>
3795 <dd></dd></dl>
3796
3797 <dl class="method">
3798 <dt id="git.diff.Diff.__init__">
3799 <code class="descname">__init__</code><span class="sig-paren">(</span><em>repo</em>, <em>a_rawpath</em>, <em>b_rawpath</em>, <em>a_blob_id</em>, <em>b_blob_id</em>, <em>a_mode</em>, <em>b_mode</em>, <em>new_file</em>, <em>deleted_file</em>, <em>raw_rename_from</em>, <em>raw_rename_to</em>, <em>diff</em>, <em>change_type</em><span class="sig-paren">)</span><a class="headerlink" href="#git.diff.Diff.__init__" title="Permalink to this definition">¶</a></dt>
3800 <dd></dd></dl>
3801
3802 <dl class="attribute">
3803 <dt id="git.diff.Diff.__module__">
3804 <code class="descname">__module__</code><em class="property"> = 'git.diff'</em><a class="headerlink" href="#git.diff.Diff.__module__" title="Permalink to this definition">¶</a></dt>
3805 <dd></dd></dl>
3806
3807 <dl class="method">
3808 <dt id="git.diff.Diff.__ne__">
3809 <code class="descname">__ne__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#git.diff.Diff.__ne__" title="Permalink to this definition">¶</a></dt>
3810 <dd></dd></dl>
3811
3812 <dl class="attribute">
3813 <dt id="git.diff.Diff.__slots__">
3814 <code class="descname">__slots__</code><em class="property"> = ('a_blob', 'b_blob', 'a_mode', 'b_mode', 'a_rawpath', 'b_rawpath', 'new_file', 'deleted_file', 'raw_rename_from', 'raw_rename_to', 'diff', 'change_type')</em><a class="headerlink" href="#git.diff.Diff.__slots__" title="Permalink to this definition">¶</a></dt>
3815 <dd></dd></dl>
3816
3817 <dl class="method">
3818 <dt id="git.diff.Diff.__str__">
3819 <code class="descname">__str__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.diff.Diff.__str__" title="Permalink to this definition">¶</a></dt>
3820 <dd></dd></dl>
3821
3822 <dl class="attribute">
3823 <dt id="git.diff.Diff.a_blob">
3824 <code class="descname">a_blob</code><a class="headerlink" href="#git.diff.Diff.a_blob" title="Permalink to this definition">¶</a></dt>
3825 <dd></dd></dl>
3826
3827 <dl class="attribute">
3828 <dt id="git.diff.Diff.a_mode">
3829 <code class="descname">a_mode</code><a class="headerlink" href="#git.diff.Diff.a_mode" title="Permalink to this definition">¶</a></dt>
3830 <dd></dd></dl>
3831
3832 <dl class="attribute">
3833 <dt id="git.diff.Diff.a_path">
3834 <code class="descname">a_path</code><a class="headerlink" href="#git.diff.Diff.a_path" title="Permalink to this definition">¶</a></dt>
3835 <dd></dd></dl>
3836
3837 <dl class="attribute">
3838 <dt id="git.diff.Diff.a_rawpath">
3839 <code class="descname">a_rawpath</code><a class="headerlink" href="#git.diff.Diff.a_rawpath" title="Permalink to this definition">¶</a></dt>
3840 <dd></dd></dl>
3841
3842 <dl class="attribute">
3843 <dt id="git.diff.Diff.b_blob">
3844 <code class="descname">b_blob</code><a class="headerlink" href="#git.diff.Diff.b_blob" title="Permalink to this definition">¶</a></dt>
3845 <dd></dd></dl>
3846
3847 <dl class="attribute">
3848 <dt id="git.diff.Diff.b_mode">
3849 <code class="descname">b_mode</code><a class="headerlink" href="#git.diff.Diff.b_mode" title="Permalink to this definition">¶</a></dt>
3850 <dd></dd></dl>
3851
3852 <dl class="attribute">
3853 <dt id="git.diff.Diff.b_path">
3854 <code class="descname">b_path</code><a class="headerlink" href="#git.diff.Diff.b_path" title="Permalink to this definition">¶</a></dt>
3855 <dd></dd></dl>
3856
3857 <dl class="attribute">
3858 <dt id="git.diff.Diff.b_rawpath">
3859 <code class="descname">b_rawpath</code><a class="headerlink" href="#git.diff.Diff.b_rawpath" title="Permalink to this definition">¶</a></dt>
3860 <dd></dd></dl>
3861
3862 <dl class="attribute">
3863 <dt id="git.diff.Diff.change_type">
3864 <code class="descname">change_type</code><a class="headerlink" href="#git.diff.Diff.change_type" title="Permalink to this definition">¶</a></dt>
3865 <dd></dd></dl>
3866
3867 <dl class="attribute">
3868 <dt id="git.diff.Diff.deleted_file">
3869 <code class="descname">deleted_file</code><a class="headerlink" href="#git.diff.Diff.deleted_file" title="Permalink to this definition">¶</a></dt>
3870 <dd></dd></dl>
3871
3872 <dl class="attribute">
3873 <dt id="git.diff.Diff.diff">
3874 <code class="descname">diff</code><a class="headerlink" href="#git.diff.Diff.diff" title="Permalink to this definition">¶</a></dt>
3875 <dd></dd></dl>
3876
3877 <dl class="attribute">
3878 <dt id="git.diff.Diff.new_file">
3879 <code class="descname">new_file</code><a class="headerlink" href="#git.diff.Diff.new_file" title="Permalink to this definition">¶</a></dt>
3880 <dd></dd></dl>
3881
3882 <dl class="attribute">
3883 <dt id="git.diff.Diff.raw_rename_from">
3884 <code class="descname">raw_rename_from</code><a class="headerlink" href="#git.diff.Diff.raw_rename_from" title="Permalink to this definition">¶</a></dt>
3885 <dd></dd></dl>
3886
3887 <dl class="attribute">
3888 <dt id="git.diff.Diff.raw_rename_to">
3889 <code class="descname">raw_rename_to</code><a class="headerlink" href="#git.diff.Diff.raw_rename_to" title="Permalink to this definition">¶</a></dt>
3890 <dd></dd></dl>
3891
3892 <dl class="attribute">
3893 <dt id="git.diff.Diff.re_header">
3894 <code class="descname">re_header</code><em class="property"> = &lt;_sre.SRE_Pattern object&gt;</em><a class="headerlink" href="#git.diff.Diff.re_header" title="Permalink to this definition">¶</a></dt>
3895 <dd></dd></dl>
3896
3897 <dl class="attribute">
3898 <dt id="git.diff.Diff.rename_from">
3899 <code class="descname">rename_from</code><a class="headerlink" href="#git.diff.Diff.rename_from" title="Permalink to this definition">¶</a></dt>
3900 <dd></dd></dl>
3901
3902 <dl class="attribute">
3903 <dt id="git.diff.Diff.rename_to">
3904 <code class="descname">rename_to</code><a class="headerlink" href="#git.diff.Diff.rename_to" title="Permalink to this definition">¶</a></dt>
3905 <dd></dd></dl>
3906
3907 <dl class="attribute">
3908 <dt id="git.diff.Diff.renamed">
3909 <code class="descname">renamed</code><a class="headerlink" href="#git.diff.Diff.renamed" title="Permalink to this definition">¶</a></dt>
3910 <dd><table class="docutils field-list" frame="void" rules="none">
3911 <col class="field-name" />
3912 <col class="field-body" />
3913 <tbody valign="top">
3914 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True if the blob of our diff has been renamed</td>
3915 </tr>
3916 <tr class="field-even field"><th class="field-name">Note:</th><td class="field-body">This property is deprecated, please use <code class="docutils literal"><span class="pre">renamed_file</span></code> instead.</td>
3917 </tr>
3918 </tbody>
3919 </table>
3920 </dd></dl>
3921
3922 <dl class="attribute">
3923 <dt id="git.diff.Diff.renamed_file">
3924 <code class="descname">renamed_file</code><a class="headerlink" href="#git.diff.Diff.renamed_file" title="Permalink to this definition">¶</a></dt>
3925 <dd><table class="docutils field-list" frame="void" rules="none">
3926 <col class="field-name" />
3927 <col class="field-body" />
3928 <tbody valign="top">
3929 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True if the blob of our diff has been renamed</td>
3930 </tr>
3931 <tr class="field-even field"><th class="field-name">Note:</th><td class="field-body">This property is deprecated, please use <code class="docutils literal"><span class="pre">renamed_file</span></code> instead.</td>
3932 </tr>
3933 </tbody>
3934 </table>
3935 </dd></dl>
3936
3937 </dd></dl>
3938
3939 </div>
3940 <div class="section" id="module-git.exc">
3941 <span id="exceptions"></span><h2>Exceptions<a class="headerlink" href="#module-git.exc" title="Permalink to this headline">¶</a></h2>
3942 <p>Module containing all exceptions thrown througout the git package,</p>
3943 <dl class="exception">
3944 <dt id="git.exc.CacheError">
3945 <em class="property">exception </em><code class="descclassname">git.exc.</code><code class="descname">CacheError</code><a class="headerlink" href="#git.exc.CacheError" title="Permalink to this definition">¶</a></dt>
3946 <dd><p>Base for all errors related to the git index, which is called cache internally</p>
3947 <dl class="attribute">
3948 <dt id="git.exc.CacheError.__module__">
3949 <code class="descname">__module__</code><em class="property"> = 'git.exc'</em><a class="headerlink" href="#git.exc.CacheError.__module__" title="Permalink to this definition">¶</a></dt>
3950 <dd></dd></dl>
3951
3952 <dl class="attribute">
3953 <dt id="git.exc.CacheError.__weakref__">
3954 <code class="descname">__weakref__</code><a class="headerlink" href="#git.exc.CacheError.__weakref__" title="Permalink to this definition">¶</a></dt>
3955 <dd><p>list of weak references to the object (if defined)</p>
3956 </dd></dl>
3957
3958 </dd></dl>
3959
3960 <dl class="exception">
3961 <dt id="git.exc.CheckoutError">
3962 <em class="property">exception </em><code class="descclassname">git.exc.</code><code class="descname">CheckoutError</code><span class="sig-paren">(</span><em>message</em>, <em>failed_files</em>, <em>valid_files</em>, <em>failed_reasons</em><span class="sig-paren">)</span><a class="headerlink" href="#git.exc.CheckoutError" title="Permalink to this definition">¶</a></dt>
3963 <dd><p>Thrown if a file could not be checked out from the index as it contained
3964 changes.</p>
3965 <p>The .failed_files attribute contains a list of relative paths that failed
3966 to be checked out as they contained changes that did not exist in the index.</p>
3967 <p>The .failed_reasons attribute contains a string informing about the actual
3968 cause of the issue.</p>
3969 <p>The .valid_files attribute contains a list of relative paths to files that
3970 were checked out successfully and hence match the version stored in the
3971 index</p>
3972 <dl class="method">
3973 <dt id="git.exc.CheckoutError.__init__">
3974 <code class="descname">__init__</code><span class="sig-paren">(</span><em>message</em>, <em>failed_files</em>, <em>valid_files</em>, <em>failed_reasons</em><span class="sig-paren">)</span><a class="headerlink" href="#git.exc.CheckoutError.__init__" title="Permalink to this definition">¶</a></dt>
3975 <dd></dd></dl>
3976
3977 <dl class="attribute">
3978 <dt id="git.exc.CheckoutError.__module__">
3979 <code class="descname">__module__</code><em class="property"> = 'git.exc'</em><a class="headerlink" href="#git.exc.CheckoutError.__module__" title="Permalink to this definition">¶</a></dt>
3980 <dd></dd></dl>
3981
3982 <dl class="method">
3983 <dt id="git.exc.CheckoutError.__str__">
3984 <code class="descname">__str__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.exc.CheckoutError.__str__" title="Permalink to this definition">¶</a></dt>
3985 <dd></dd></dl>
3986
3987 <dl class="attribute">
3988 <dt id="git.exc.CheckoutError.__weakref__">
3989 <code class="descname">__weakref__</code><a class="headerlink" href="#git.exc.CheckoutError.__weakref__" title="Permalink to this definition">¶</a></dt>
3990 <dd><p>list of weak references to the object (if defined)</p>
3991 </dd></dl>
3992
3993 </dd></dl>
3994
3995 <dl class="exception">
3996 <dt id="git.exc.GitCommandError">
3997 <em class="property">exception </em><code class="descclassname">git.exc.</code><code class="descname">GitCommandError</code><span class="sig-paren">(</span><em>command</em>, <em>status</em>, <em>stderr=None</em>, <em>stdout=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.exc.GitCommandError" title="Permalink to this definition">¶</a></dt>
3998 <dd><p>Thrown if execution of the git command fails with non-zero status code.</p>
3999 <dl class="method">
4000 <dt id="git.exc.GitCommandError.__init__">
4001 <code class="descname">__init__</code><span class="sig-paren">(</span><em>command</em>, <em>status</em>, <em>stderr=None</em>, <em>stdout=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.exc.GitCommandError.__init__" title="Permalink to this definition">¶</a></dt>
4002 <dd></dd></dl>
4003
4004 <dl class="attribute">
4005 <dt id="git.exc.GitCommandError.__module__">
4006 <code class="descname">__module__</code><em class="property"> = 'git.exc'</em><a class="headerlink" href="#git.exc.GitCommandError.__module__" title="Permalink to this definition">¶</a></dt>
4007 <dd></dd></dl>
4008
4009 <dl class="method">
4010 <dt id="git.exc.GitCommandError.__str__">
4011 <code class="descname">__str__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.exc.GitCommandError.__str__" title="Permalink to this definition">¶</a></dt>
4012 <dd></dd></dl>
4013
4014 <dl class="attribute">
4015 <dt id="git.exc.GitCommandError.__weakref__">
4016 <code class="descname">__weakref__</code><a class="headerlink" href="#git.exc.GitCommandError.__weakref__" title="Permalink to this definition">¶</a></dt>
4017 <dd><p>list of weak references to the object (if defined)</p>
4018 </dd></dl>
4019
4020 </dd></dl>
4021
4022 <dl class="exception">
4023 <dt id="git.exc.GitCommandNotFound">
4024 <em class="property">exception </em><code class="descclassname">git.exc.</code><code class="descname">GitCommandNotFound</code><a class="headerlink" href="#git.exc.GitCommandNotFound" title="Permalink to this definition">¶</a></dt>
4025 <dd><p>Thrown if we cannot find the <cite>git</cite> executable in the PATH or at the path given by
4026 the GIT_PYTHON_GIT_EXECUTABLE environment variable</p>
4027 <dl class="attribute">
4028 <dt id="git.exc.GitCommandNotFound.__module__">
4029 <code class="descname">__module__</code><em class="property"> = 'git.exc'</em><a class="headerlink" href="#git.exc.GitCommandNotFound.__module__" title="Permalink to this definition">¶</a></dt>
4030 <dd></dd></dl>
4031
4032 <dl class="attribute">
4033 <dt id="git.exc.GitCommandNotFound.__weakref__">
4034 <code class="descname">__weakref__</code><a class="headerlink" href="#git.exc.GitCommandNotFound.__weakref__" title="Permalink to this definition">¶</a></dt>
4035 <dd><p>list of weak references to the object (if defined)</p>
4036 </dd></dl>
4037
4038 </dd></dl>
4039
4040 <dl class="exception">
4041 <dt id="git.exc.HookExecutionError">
4042 <em class="property">exception </em><code class="descclassname">git.exc.</code><code class="descname">HookExecutionError</code><span class="sig-paren">(</span><em>command</em>, <em>status</em>, <em>stdout</em>, <em>stderr</em><span class="sig-paren">)</span><a class="headerlink" href="#git.exc.HookExecutionError" title="Permalink to this definition">¶</a></dt>
4043 <dd><p>Thrown if a hook exits with a non-zero exit code. It provides access to the exit code and the string returned
4044 via standard output</p>
4045 <dl class="method">
4046 <dt id="git.exc.HookExecutionError.__init__">
4047 <code class="descname">__init__</code><span class="sig-paren">(</span><em>command</em>, <em>status</em>, <em>stdout</em>, <em>stderr</em><span class="sig-paren">)</span><a class="headerlink" href="#git.exc.HookExecutionError.__init__" title="Permalink to this definition">¶</a></dt>
4048 <dd></dd></dl>
4049
4050 <dl class="attribute">
4051 <dt id="git.exc.HookExecutionError.__module__">
4052 <code class="descname">__module__</code><em class="property"> = 'git.exc'</em><a class="headerlink" href="#git.exc.HookExecutionError.__module__" title="Permalink to this definition">¶</a></dt>
4053 <dd></dd></dl>
4054
4055 <dl class="method">
4056 <dt id="git.exc.HookExecutionError.__str__">
4057 <code class="descname">__str__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.exc.HookExecutionError.__str__" title="Permalink to this definition">¶</a></dt>
4058 <dd></dd></dl>
4059
4060 <dl class="attribute">
4061 <dt id="git.exc.HookExecutionError.__weakref__">
4062 <code class="descname">__weakref__</code><a class="headerlink" href="#git.exc.HookExecutionError.__weakref__" title="Permalink to this definition">¶</a></dt>
4063 <dd><p>list of weak references to the object (if defined)</p>
4064 </dd></dl>
4065
4066 </dd></dl>
4067
4068 <dl class="exception">
4069 <dt id="git.exc.InvalidGitRepositoryError">
4070 <em class="property">exception </em><code class="descclassname">git.exc.</code><code class="descname">InvalidGitRepositoryError</code><a class="headerlink" href="#git.exc.InvalidGitRepositoryError" title="Permalink to this definition">¶</a></dt>
4071 <dd><p>Thrown if the given repository appears to have an invalid format.</p>
4072 <dl class="attribute">
4073 <dt id="git.exc.InvalidGitRepositoryError.__module__">
4074 <code class="descname">__module__</code><em class="property"> = 'git.exc'</em><a class="headerlink" href="#git.exc.InvalidGitRepositoryError.__module__" title="Permalink to this definition">¶</a></dt>
4075 <dd></dd></dl>
4076
4077 <dl class="attribute">
4078 <dt id="git.exc.InvalidGitRepositoryError.__weakref__">
4079 <code class="descname">__weakref__</code><a class="headerlink" href="#git.exc.InvalidGitRepositoryError.__weakref__" title="Permalink to this definition">¶</a></dt>
4080 <dd><p>list of weak references to the object (if defined)</p>
4081 </dd></dl>
4082
4083 </dd></dl>
4084
4085 <dl class="exception">
4086 <dt id="git.exc.NoSuchPathError">
4087 <em class="property">exception </em><code class="descclassname">git.exc.</code><code class="descname">NoSuchPathError</code><a class="headerlink" href="#git.exc.NoSuchPathError" title="Permalink to this definition">¶</a></dt>
4088 <dd><p>Thrown if a path could not be access by the system.</p>
4089 <dl class="attribute">
4090 <dt id="git.exc.NoSuchPathError.__module__">
4091 <code class="descname">__module__</code><em class="property"> = 'git.exc'</em><a class="headerlink" href="#git.exc.NoSuchPathError.__module__" title="Permalink to this definition">¶</a></dt>
4092 <dd></dd></dl>
4093
4094 <dl class="attribute">
4095 <dt id="git.exc.NoSuchPathError.__weakref__">
4096 <code class="descname">__weakref__</code><a class="headerlink" href="#git.exc.NoSuchPathError.__weakref__" title="Permalink to this definition">¶</a></dt>
4097 <dd><p>list of weak references to the object (if defined)</p>
4098 </dd></dl>
4099
4100 </dd></dl>
4101
4102 <dl class="exception">
4103 <dt id="git.exc.RepositoryDirtyError">
4104 <em class="property">exception </em><code class="descclassname">git.exc.</code><code class="descname">RepositoryDirtyError</code><span class="sig-paren">(</span><em>repo</em>, <em>message</em><span class="sig-paren">)</span><a class="headerlink" href="#git.exc.RepositoryDirtyError" title="Permalink to this definition">¶</a></dt>
4105 <dd><p>Thrown whenever an operation on a repository fails as it has uncommited changes that would be overwritten</p>
4106 <dl class="method">
4107 <dt id="git.exc.RepositoryDirtyError.__init__">
4108 <code class="descname">__init__</code><span class="sig-paren">(</span><em>repo</em>, <em>message</em><span class="sig-paren">)</span><a class="headerlink" href="#git.exc.RepositoryDirtyError.__init__" title="Permalink to this definition">¶</a></dt>
4109 <dd></dd></dl>
4110
4111 <dl class="attribute">
4112 <dt id="git.exc.RepositoryDirtyError.__module__">
4113 <code class="descname">__module__</code><em class="property"> = 'git.exc'</em><a class="headerlink" href="#git.exc.RepositoryDirtyError.__module__" title="Permalink to this definition">¶</a></dt>
4114 <dd></dd></dl>
4115
4116 <dl class="method">
4117 <dt id="git.exc.RepositoryDirtyError.__str__">
4118 <code class="descname">__str__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.exc.RepositoryDirtyError.__str__" title="Permalink to this definition">¶</a></dt>
4119 <dd></dd></dl>
4120
4121 <dl class="attribute">
4122 <dt id="git.exc.RepositoryDirtyError.__weakref__">
4123 <code class="descname">__weakref__</code><a class="headerlink" href="#git.exc.RepositoryDirtyError.__weakref__" title="Permalink to this definition">¶</a></dt>
4124 <dd><p>list of weak references to the object (if defined)</p>
4125 </dd></dl>
4126
4127 </dd></dl>
4128
4129 <dl class="exception">
4130 <dt id="git.exc.UnmergedEntriesError">
4131 <em class="property">exception </em><code class="descclassname">git.exc.</code><code class="descname">UnmergedEntriesError</code><a class="headerlink" href="#git.exc.UnmergedEntriesError" title="Permalink to this definition">¶</a></dt>
4132 <dd><p>Thrown if an operation cannot proceed as there are still unmerged
4133 entries in the cache</p>
4134 <dl class="attribute">
4135 <dt id="git.exc.UnmergedEntriesError.__module__">
4136 <code class="descname">__module__</code><em class="property"> = 'git.exc'</em><a class="headerlink" href="#git.exc.UnmergedEntriesError.__module__" title="Permalink to this definition">¶</a></dt>
4137 <dd></dd></dl>
4138
4139 </dd></dl>
4140
4141 <dl class="exception">
4142 <dt id="git.exc.WorkTreeRepositoryUnsupported">
4143 <em class="property">exception </em><code class="descclassname">git.exc.</code><code class="descname">WorkTreeRepositoryUnsupported</code><a class="headerlink" href="#git.exc.WorkTreeRepositoryUnsupported" title="Permalink to this definition">¶</a></dt>
4144 <dd><p>Thrown to indicate we can&#8217;t handle work tree repositories</p>
4145 <dl class="attribute">
4146 <dt id="git.exc.WorkTreeRepositoryUnsupported.__module__">
4147 <code class="descname">__module__</code><em class="property"> = 'git.exc'</em><a class="headerlink" href="#git.exc.WorkTreeRepositoryUnsupported.__module__" title="Permalink to this definition">¶</a></dt>
4148 <dd></dd></dl>
4149
4150 </dd></dl>
4151
4152 </div>
4153 <div class="section" id="module-git.refs.symbolic">
4154 <span id="refs-symbolic"></span><h2>Refs.symbolic<a class="headerlink" href="#module-git.refs.symbolic" title="Permalink to this headline">¶</a></h2>
4155 <dl class="class">
4156 <dt id="git.refs.symbolic.SymbolicReference">
4157 <em class="property">class </em><code class="descclassname">git.refs.symbolic.</code><code class="descname">SymbolicReference</code><span class="sig-paren">(</span><em>repo</em>, <em>path</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference" title="Permalink to this definition">¶</a></dt>
4158 <dd><p>Represents a special case of a reference such that this reference is symbolic.
4159 It does not point to a specific commit, but to another Head, which itself
4160 specifies a commit.</p>
4161 <p>A typical example for a symbolic reference is HEAD.</p>
4162 <dl class="method">
4163 <dt id="git.refs.symbolic.SymbolicReference.__eq__">
4164 <code class="descname">__eq__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.__eq__" title="Permalink to this definition">¶</a></dt>
4165 <dd></dd></dl>
4166
4167 <dl class="method">
4168 <dt id="git.refs.symbolic.SymbolicReference.__hash__">
4169 <code class="descname">__hash__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.__hash__" title="Permalink to this definition">¶</a></dt>
4170 <dd></dd></dl>
4171
4172 <dl class="method">
4173 <dt id="git.refs.symbolic.SymbolicReference.__init__">
4174 <code class="descname">__init__</code><span class="sig-paren">(</span><em>repo</em>, <em>path</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.__init__" title="Permalink to this definition">¶</a></dt>
4175 <dd></dd></dl>
4176
4177 <dl class="attribute">
4178 <dt id="git.refs.symbolic.SymbolicReference.__module__">
4179 <code class="descname">__module__</code><em class="property"> = 'git.refs.symbolic'</em><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.__module__" title="Permalink to this definition">¶</a></dt>
4180 <dd></dd></dl>
4181
4182 <dl class="method">
4183 <dt id="git.refs.symbolic.SymbolicReference.__ne__">
4184 <code class="descname">__ne__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.__ne__" title="Permalink to this definition">¶</a></dt>
4185 <dd></dd></dl>
4186
4187 <dl class="method">
4188 <dt id="git.refs.symbolic.SymbolicReference.__repr__">
4189 <code class="descname">__repr__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.__repr__" title="Permalink to this definition">¶</a></dt>
4190 <dd></dd></dl>
4191
4192 <dl class="attribute">
4193 <dt id="git.refs.symbolic.SymbolicReference.__slots__">
4194 <code class="descname">__slots__</code><em class="property"> = ('repo', 'path')</em><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.__slots__" title="Permalink to this definition">¶</a></dt>
4195 <dd></dd></dl>
4196
4197 <dl class="method">
4198 <dt id="git.refs.symbolic.SymbolicReference.__str__">
4199 <code class="descname">__str__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.__str__" title="Permalink to this definition">¶</a></dt>
4200 <dd></dd></dl>
4201
4202 <dl class="attribute">
4203 <dt id="git.refs.symbolic.SymbolicReference.abspath">
4204 <code class="descname">abspath</code><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.abspath" title="Permalink to this definition">¶</a></dt>
4205 <dd></dd></dl>
4206
4207 <dl class="attribute">
4208 <dt id="git.refs.symbolic.SymbolicReference.commit">
4209 <code class="descname">commit</code><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.commit" title="Permalink to this definition">¶</a></dt>
4210 <dd><p>Query or set commits directly</p>
4211 </dd></dl>
4212
4213 <dl class="classmethod">
4214 <dt id="git.refs.symbolic.SymbolicReference.create">
4215 <em class="property">classmethod </em><code class="descname">create</code><span class="sig-paren">(</span><em>repo</em>, <em>path</em>, <em>reference='HEAD'</em>, <em>force=False</em>, <em>logmsg=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.create" title="Permalink to this definition">¶</a></dt>
4216 <dd><p>Create a new symbolic reference, hence a reference pointing to another reference.</p>
4217 <table class="docutils field-list" frame="void" rules="none">
4218 <col class="field-name" />
4219 <col class="field-body" />
4220 <tbody valign="top">
4221 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
4222 <li><strong>repo</strong> &#8211; Repository to create the reference in</li>
4223 <li><strong>path</strong> &#8211; full path at which the new symbolic reference is supposed to be
4224 created at, i.e. &#8220;NEW_HEAD&#8221; or &#8220;symrefs/my_new_symref&#8221;</li>
4225 <li><strong>reference</strong> &#8211; The reference to which the new symbolic reference should point to.
4226 If it is a commit&#8217;ish, the symbolic ref will be detached.</li>
4227 <li><strong>force</strong> &#8211; if True, force creation even if a symbolic reference with that name already exists.
4228 Raise OSError otherwise</li>
4229 <li><strong>logmsg</strong> &#8211; If not None, the message to append to the reflog. Otherwise no reflog
4230 entry is written.</li>
4231 </ul>
4232 </td>
4233 </tr>
4234 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Newly created symbolic Reference</p>
4235 </td>
4236 </tr>
4237 <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first"><strong>OSError</strong> &#8211; If a (Symbolic)Reference with the same name but different contents
4238 already exists.</p>
4239 </td>
4240 </tr>
4241 <tr class="field-even field"><th class="field-name">Note:</th><td class="field-body"><p class="first last">This does not alter the current HEAD, index or Working Tree</p>
4242 </td>
4243 </tr>
4244 </tbody>
4245 </table>
4246 </dd></dl>
4247
4248 <dl class="classmethod">
4249 <dt id="git.refs.symbolic.SymbolicReference.delete">
4250 <em class="property">classmethod </em><code class="descname">delete</code><span class="sig-paren">(</span><em>repo</em>, <em>path</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.delete" title="Permalink to this definition">¶</a></dt>
4251 <dd><p>Delete the reference at the given path</p>
4252 <table class="docutils field-list" frame="void" rules="none">
4253 <col class="field-name" />
4254 <col class="field-body" />
4255 <tbody valign="top">
4256 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
4257 <li><strong>repo</strong> &#8211; Repository to delete the reference from</li>
4258 <li><strong>path</strong> &#8211; Short or full path pointing to the reference, i.e. refs/myreference
4259 or just &#8220;myreference&#8221;, hence &#8216;refs/&#8217; is implied.
4260 Alternatively the symbolic reference to be deleted</li>
4261 </ul>
4262 </td>
4263 </tr>
4264 </tbody>
4265 </table>
4266 </dd></dl>
4267
4268 <dl class="classmethod">
4269 <dt id="git.refs.symbolic.SymbolicReference.dereference_recursive">
4270 <em class="property">classmethod </em><code class="descname">dereference_recursive</code><span class="sig-paren">(</span><em>repo</em>, <em>ref_path</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.dereference_recursive" title="Permalink to this definition">¶</a></dt>
4271 <dd><table class="docutils field-list" frame="void" rules="none">
4272 <col class="field-name" />
4273 <col class="field-body" />
4274 <tbody valign="top">
4275 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">hexsha stored in the reference at the given ref_path, recursively dereferencing all
4276 intermediate references as required</td>
4277 </tr>
4278 <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>repo</strong> &#8211; the repository containing the reference at ref_path</td>
4279 </tr>
4280 </tbody>
4281 </table>
4282 </dd></dl>
4283
4284 <dl class="classmethod">
4285 <dt id="git.refs.symbolic.SymbolicReference.from_path">
4286 <em class="property">classmethod </em><code class="descname">from_path</code><span class="sig-paren">(</span><em>repo</em>, <em>path</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.from_path" title="Permalink to this definition">¶</a></dt>
4287 <dd><table class="docutils field-list" frame="void" rules="none">
4288 <col class="field-name" />
4289 <col class="field-body" />
4290 <tbody valign="top">
4291 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>path</strong> &#8211; full .git-directory-relative path name to the Reference to instantiate</td>
4292 </tr>
4293 <tr class="field-even field"><th class="field-name">Note:</th><td class="field-body">use to_full_path() if you only have a partial path of a known Reference Type</td>
4294 </tr>
4295 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Instance of type Reference, Head, or Tag
4296 depending on the given path</td>
4297 </tr>
4298 </tbody>
4299 </table>
4300 </dd></dl>
4301
4302 <dl class="attribute">
4303 <dt id="git.refs.symbolic.SymbolicReference.is_detached">
4304 <code class="descname">is_detached</code><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.is_detached" title="Permalink to this definition">¶</a></dt>
4305 <dd><table class="docutils field-list" frame="void" rules="none">
4306 <col class="field-name" />
4307 <col class="field-body" />
4308 <tbody valign="top">
4309 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True if we are a detached reference, hence we point to a specific commit
4310 instead to another reference</td>
4311 </tr>
4312 </tbody>
4313 </table>
4314 </dd></dl>
4315
4316 <dl class="method">
4317 <dt id="git.refs.symbolic.SymbolicReference.is_remote">
4318 <code class="descname">is_remote</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.is_remote" title="Permalink to this definition">¶</a></dt>
4319 <dd><table class="docutils field-list" frame="void" rules="none">
4320 <col class="field-name" />
4321 <col class="field-body" />
4322 <tbody valign="top">
4323 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True if this symbolic reference points to a remote branch</td>
4324 </tr>
4325 </tbody>
4326 </table>
4327 </dd></dl>
4328
4329 <dl class="method">
4330 <dt id="git.refs.symbolic.SymbolicReference.is_valid">
4331 <code class="descname">is_valid</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.is_valid" title="Permalink to this definition">¶</a></dt>
4332 <dd><table class="docutils field-list" frame="void" rules="none">
4333 <col class="field-name" />
4334 <col class="field-body" />
4335 <tbody valign="top">
4336 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True if the reference is valid, hence it can be read and points to
4337 a valid object or reference.</td>
4338 </tr>
4339 </tbody>
4340 </table>
4341 </dd></dl>
4342
4343 <dl class="classmethod">
4344 <dt id="git.refs.symbolic.SymbolicReference.iter_items">
4345 <em class="property">classmethod </em><code class="descname">iter_items</code><span class="sig-paren">(</span><em>repo</em>, <em>common_path=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.iter_items" title="Permalink to this definition">¶</a></dt>
4346 <dd><p>Find all refs in the repository</p>
4347 <table class="docutils field-list" frame="void" rules="none">
4348 <col class="field-name" />
4349 <col class="field-body" />
4350 <tbody valign="top">
4351 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
4352 <li><strong>repo</strong> &#8211; is the Repo</li>
4353 <li><strong>common_path</strong> &#8211; Optional keyword argument to the path which is to be shared by all
4354 returned Ref objects.
4355 Defaults to class specific portion if None assuring that only
4356 refs suitable for the actual class are returned.</li>
4357 </ul>
4358 </td>
4359 </tr>
4360 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><p>git.SymbolicReference[], each of them is guaranteed to be a symbolic
4361 ref which is not detached and pointing to a valid ref</p>
4362 <p>List is lexigraphically sorted
4363 The returned objects represent actual subclasses, such as Head or TagReference</p>
4364 </p>
4365 </td>
4366 </tr>
4367 </tbody>
4368 </table>
4369 </dd></dl>
4370
4371 <dl class="method">
4372 <dt id="git.refs.symbolic.SymbolicReference.log">
4373 <code class="descname">log</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.log" title="Permalink to this definition">¶</a></dt>
4374 <dd><table class="docutils field-list" frame="void" rules="none">
4375 <col class="field-name" />
4376 <col class="field-body" />
4377 <tbody valign="top">
4378 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">RefLog for this reference. Its last entry reflects the latest change
4379 applied to this reference</td>
4380 </tr>
4381 </tbody>
4382 </table>
4383 <div class="admonition note">
4384 <p class="first admonition-title">Note</p>
4385 <p class="last">As the log is parsed every time, its recommended to cache it for use
4386 instead of calling this method repeatedly. It should be considered read-only.</p>
4387 </div>
4388 </dd></dl>
4389
4390 <dl class="method">
4391 <dt id="git.refs.symbolic.SymbolicReference.log_append">
4392 <code class="descname">log_append</code><span class="sig-paren">(</span><em>oldbinsha</em>, <em>message</em>, <em>newbinsha=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.log_append" title="Permalink to this definition">¶</a></dt>
4393 <dd><p>Append a logentry to the logfile of this ref</p>
4394 <table class="docutils field-list" frame="void" rules="none">
4395 <col class="field-name" />
4396 <col class="field-body" />
4397 <tbody valign="top">
4398 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
4399 <li><strong>oldbinsha</strong> &#8211; binary sha this ref used to point to</li>
4400 <li><strong>message</strong> &#8211; A message describing the change</li>
4401 <li><strong>newbinsha</strong> &#8211; The sha the ref points to now. If None, our current commit sha
4402 will be used</li>
4403 </ul>
4404 </td>
4405 </tr>
4406 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">added RefLogEntry instance</p>
4407 </td>
4408 </tr>
4409 </tbody>
4410 </table>
4411 </dd></dl>
4412
4413 <dl class="method">
4414 <dt id="git.refs.symbolic.SymbolicReference.log_entry">
4415 <code class="descname">log_entry</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.log_entry" title="Permalink to this definition">¶</a></dt>
4416 <dd><table class="docutils field-list" frame="void" rules="none">
4417 <col class="field-name" />
4418 <col class="field-body" />
4419 <tbody valign="top">
4420 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">RefLogEntry at the given index</td>
4421 </tr>
4422 <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>index</strong> &#8211; python list compatible positive or negative index</td>
4423 </tr>
4424 </tbody>
4425 </table>
4426 <div class="admonition note">
4427 <p class="first admonition-title">Note</p>
4428 <p class="last">This method must read part of the reflog during execution, hence
4429 it should be used sparringly, or only if you need just one index.
4430 In that case, it will be faster than the <code class="docutils literal"><span class="pre">log()</span></code> method</p>
4431 </div>
4432 </dd></dl>
4433
4434 <dl class="attribute">
4435 <dt id="git.refs.symbolic.SymbolicReference.name">
4436 <code class="descname">name</code><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.name" title="Permalink to this definition">¶</a></dt>
4437 <dd><table class="docutils field-list" frame="void" rules="none">
4438 <col class="field-name" />
4439 <col class="field-body" />
4440 <tbody valign="top">
4441 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">In case of symbolic references, the shortest assumable name
4442 is the path itself.</td>
4443 </tr>
4444 </tbody>
4445 </table>
4446 </dd></dl>
4447
4448 <dl class="attribute">
4449 <dt id="git.refs.symbolic.SymbolicReference.object">
4450 <code class="descname">object</code><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.object" title="Permalink to this definition">¶</a></dt>
4451 <dd><p>Return the object our ref currently refers to</p>
4452 </dd></dl>
4453
4454 <dl class="attribute">
4455 <dt id="git.refs.symbolic.SymbolicReference.path">
4456 <code class="descname">path</code><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.path" title="Permalink to this definition">¶</a></dt>
4457 <dd></dd></dl>
4458
4459 <dl class="attribute">
4460 <dt id="git.refs.symbolic.SymbolicReference.ref">
4461 <code class="descname">ref</code><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.ref" title="Permalink to this definition">¶</a></dt>
4462 <dd><p>Returns the Reference we point to</p>
4463 </dd></dl>
4464
4465 <dl class="attribute">
4466 <dt id="git.refs.symbolic.SymbolicReference.reference">
4467 <code class="descname">reference</code><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.reference" title="Permalink to this definition">¶</a></dt>
4468 <dd><p>Returns the Reference we point to</p>
4469 </dd></dl>
4470
4471 <dl class="method">
4472 <dt id="git.refs.symbolic.SymbolicReference.rename">
4473 <code class="descname">rename</code><span class="sig-paren">(</span><em>new_path</em>, <em>force=False</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.rename" title="Permalink to this definition">¶</a></dt>
4474 <dd><p>Rename self to a new path</p>
4475 <table class="docutils field-list" frame="void" rules="none">
4476 <col class="field-name" />
4477 <col class="field-body" />
4478 <tbody valign="top">
4479 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
4480 <li><strong>new_path</strong> &#8211; Either a simple name or a full path, i.e. new_name or features/new_name.
4481 The prefix refs/ is implied for references and will be set as needed.
4482 In case this is a symbolic ref, there is no implied prefix</li>
4483 <li><strong>force</strong> &#8211; If True, the rename will succeed even if a head with the target name
4484 already exists. It will be overwritten in that case</li>
4485 </ul>
4486 </td>
4487 </tr>
4488 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">self</p>
4489 </td>
4490 </tr>
4491 <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><strong>OSError</strong> &#8211; In case a file at path but a different contents already exists</p>
4492 </td>
4493 </tr>
4494 </tbody>
4495 </table>
4496 </dd></dl>
4497
4498 <dl class="attribute">
4499 <dt id="git.refs.symbolic.SymbolicReference.repo">
4500 <code class="descname">repo</code><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.repo" title="Permalink to this definition">¶</a></dt>
4501 <dd></dd></dl>
4502
4503 <dl class="method">
4504 <dt id="git.refs.symbolic.SymbolicReference.set_commit">
4505 <code class="descname">set_commit</code><span class="sig-paren">(</span><em>commit</em>, <em>logmsg=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.set_commit" title="Permalink to this definition">¶</a></dt>
4506 <dd><p>As set_object, but restricts the type of object to be a Commit</p>
4507 <table class="docutils field-list" frame="void" rules="none">
4508 <col class="field-name" />
4509 <col class="field-body" />
4510 <tbody valign="top">
4511 <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><strong>ValueError</strong> &#8211; If commit is not a Commit object or doesn&#8217;t point to
4512 a commit</td>
4513 </tr>
4514 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">self</td>
4515 </tr>
4516 </tbody>
4517 </table>
4518 </dd></dl>
4519
4520 <dl class="method">
4521 <dt id="git.refs.symbolic.SymbolicReference.set_object">
4522 <code class="descname">set_object</code><span class="sig-paren">(</span><em>object</em>, <em>logmsg=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.set_object" title="Permalink to this definition">¶</a></dt>
4523 <dd><p>Set the object we point to, possibly dereference our symbolic reference first.
4524 If the reference does not exist, it will be created</p>
4525 <table class="docutils field-list" frame="void" rules="none">
4526 <col class="field-name" />
4527 <col class="field-body" />
4528 <tbody valign="top">
4529 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
4530 <li><strong>object</strong> &#8211; a refspec, a SymbolicReference or an Object instance. SymbolicReferences
4531 will be dereferenced beforehand to obtain the object they point to</li>
4532 <li><strong>logmsg</strong> &#8211; If not None, the message will be used in the reflog entry to be
4533 written. Otherwise the reflog is not altered</li>
4534 </ul>
4535 </td>
4536 </tr>
4537 <tr class="field-even field"><th class="field-name">Note:</th><td class="field-body"><p class="first">plain SymbolicReferences may not actually point to objects by convention</p>
4538 </td>
4539 </tr>
4540 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">self</p>
4541 </td>
4542 </tr>
4543 </tbody>
4544 </table>
4545 </dd></dl>
4546
4547 <dl class="method">
4548 <dt id="git.refs.symbolic.SymbolicReference.set_reference">
4549 <code class="descname">set_reference</code><span class="sig-paren">(</span><em>ref</em>, <em>logmsg=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.set_reference" title="Permalink to this definition">¶</a></dt>
4550 <dd><p>Set ourselves to the given ref. It will stay a symbol if the ref is a Reference.
4551 Otherwise an Object, given as Object instance or refspec, is assumed and if valid,
4552 will be set which effectively detaches the refererence if it was a purely
4553 symbolic one.</p>
4554 <table class="docutils field-list" frame="void" rules="none">
4555 <col class="field-name" />
4556 <col class="field-body" />
4557 <tbody valign="top">
4558 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
4559 <li><strong>ref</strong> &#8211; SymbolicReference instance, Object instance or refspec string
4560 Only if the ref is a SymbolicRef instance, we will point to it. Everthing
4561 else is dereferenced to obtain the actual object.</li>
4562 <li><strong>logmsg</strong> &#8211; <p>If set to a string, the message will be used in the reflog.
4563 Otherwise, a reflog entry is not written for the changed reference.
4564 The previous commit of the entry will be the commit we point to now.</p>
4565 <p>See also: log_append()</p>
4566 </li>
4567 </ul>
4568 </td>
4569 </tr>
4570 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">self</p>
4571 </td>
4572 </tr>
4573 <tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body"><p class="first last">This symbolic reference will not be dereferenced. For that, see
4574 <code class="docutils literal"><span class="pre">set_object(...)</span></code></p>
4575 </td>
4576 </tr>
4577 </tbody>
4578 </table>
4579 </dd></dl>
4580
4581 <dl class="classmethod">
4582 <dt id="git.refs.symbolic.SymbolicReference.to_full_path">
4583 <em class="property">classmethod </em><code class="descname">to_full_path</code><span class="sig-paren">(</span><em>path</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.symbolic.SymbolicReference.to_full_path" title="Permalink to this definition">¶</a></dt>
4584 <dd><table class="docutils field-list" frame="void" rules="none">
4585 <col class="field-name" />
4586 <col class="field-body" />
4587 <tbody valign="top">
4588 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">string with a full repository-relative path which can be used to initialize
4589 a Reference instance, for instance by using <code class="docutils literal"><span class="pre">Reference.from_path</span></code></td>
4590 </tr>
4591 </tbody>
4592 </table>
4593 </dd></dl>
4594
4595 </dd></dl>
4596
4597 </div>
4598 <div class="section" id="module-git.refs.reference">
4599 <span id="refs-reference"></span><h2>Refs.reference<a class="headerlink" href="#module-git.refs.reference" title="Permalink to this headline">¶</a></h2>
4600 <dl class="class">
4601 <dt id="git.refs.reference.Reference">
4602 <em class="property">class </em><code class="descclassname">git.refs.reference.</code><code class="descname">Reference</code><span class="sig-paren">(</span><em>repo</em>, <em>path</em>, <em>check_path=True</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.reference.Reference" title="Permalink to this definition">¶</a></dt>
4603 <dd><p>Represents a named reference to any object. Subclasses may apply restrictions though,
4604 i.e. Heads can only point to commits.</p>
4605 <dl class="method">
4606 <dt id="git.refs.reference.Reference.__init__">
4607 <code class="descname">__init__</code><span class="sig-paren">(</span><em>repo</em>, <em>path</em>, <em>check_path=True</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.reference.Reference.__init__" title="Permalink to this definition">¶</a></dt>
4608 <dd><p>Initialize this instance
4609 :param repo: Our parent repository</p>
4610 <table class="docutils field-list" frame="void" rules="none">
4611 <col class="field-name" />
4612 <col class="field-body" />
4613 <tbody valign="top">
4614 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
4615 <li><strong>path</strong> &#8211; Path relative to the .git/ directory pointing to the ref in question, i.e.
4616 refs/heads/master</li>
4617 <li><strong>check_path</strong> &#8211; if False, you can provide any path. Otherwise the path must start with the
4618 default path prefix of this type.</li>
4619 </ul>
4620 </td>
4621 </tr>
4622 </tbody>
4623 </table>
4624 </dd></dl>
4625
4626 <dl class="attribute">
4627 <dt id="git.refs.reference.Reference.__module__">
4628 <code class="descname">__module__</code><em class="property"> = 'git.refs.reference'</em><a class="headerlink" href="#git.refs.reference.Reference.__module__" title="Permalink to this definition">¶</a></dt>
4629 <dd></dd></dl>
4630
4631 <dl class="attribute">
4632 <dt id="git.refs.reference.Reference.__slots__">
4633 <code class="descname">__slots__</code><em class="property"> = ()</em><a class="headerlink" href="#git.refs.reference.Reference.__slots__" title="Permalink to this definition">¶</a></dt>
4634 <dd></dd></dl>
4635
4636 <dl class="method">
4637 <dt id="git.refs.reference.Reference.__str__">
4638 <code class="descname">__str__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.reference.Reference.__str__" title="Permalink to this definition">¶</a></dt>
4639 <dd></dd></dl>
4640
4641 <dl class="classmethod">
4642 <dt id="git.refs.reference.Reference.iter_items">
4643 <em class="property">classmethod </em><code class="descname">iter_items</code><span class="sig-paren">(</span><em>repo</em>, <em>common_path=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.reference.Reference.iter_items" title="Permalink to this definition">¶</a></dt>
4644 <dd><p>Equivalent to SymbolicReference.iter_items, but will return non-detached
4645 references as well.</p>
4646 </dd></dl>
4647
4648 <dl class="attribute">
4649 <dt id="git.refs.reference.Reference.name">
4650 <code class="descname">name</code><a class="headerlink" href="#git.refs.reference.Reference.name" title="Permalink to this definition">¶</a></dt>
4651 <dd><table class="docutils field-list" frame="void" rules="none">
4652 <col class="field-name" />
4653 <col class="field-body" />
4654 <tbody valign="top">
4655 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">(shortest) Name of this reference - it may contain path components</td>
4656 </tr>
4657 </tbody>
4658 </table>
4659 </dd></dl>
4660
4661 <dl class="attribute">
4662 <dt id="git.refs.reference.Reference.remote_head">
4663 <code class="descname">remote_head</code><a class="headerlink" href="#git.refs.reference.Reference.remote_head" title="Permalink to this definition">¶</a></dt>
4664 <dd></dd></dl>
4665
4666 <dl class="attribute">
4667 <dt id="git.refs.reference.Reference.remote_name">
4668 <code class="descname">remote_name</code><a class="headerlink" href="#git.refs.reference.Reference.remote_name" title="Permalink to this definition">¶</a></dt>
4669 <dd></dd></dl>
4670
4671 <dl class="method">
4672 <dt id="git.refs.reference.Reference.set_object">
4673 <code class="descname">set_object</code><span class="sig-paren">(</span><em>object</em>, <em>logmsg=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.reference.Reference.set_object" title="Permalink to this definition">¶</a></dt>
4674 <dd><p>Special version which checks if the head-log needs an update as well
4675 :return: self</p>
4676 </dd></dl>
4677
4678 </dd></dl>
4679
4680 </div>
4681 <div class="section" id="module-git.refs.head">
4682 <span id="refs-head"></span><h2>Refs.head<a class="headerlink" href="#module-git.refs.head" title="Permalink to this headline">¶</a></h2>
4683 <dl class="class">
4684 <dt id="git.refs.head.HEAD">
4685 <em class="property">class </em><code class="descclassname">git.refs.head.</code><code class="descname">HEAD</code><span class="sig-paren">(</span><em>repo</em>, <em>path='HEAD'</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.head.HEAD" title="Permalink to this definition">¶</a></dt>
4686 <dd><p>Special case of a Symbolic Reference as it represents the repository&#8217;s
4687 HEAD reference.</p>
4688 <dl class="method">
4689 <dt id="git.refs.head.HEAD.__init__">
4690 <code class="descname">__init__</code><span class="sig-paren">(</span><em>repo</em>, <em>path='HEAD'</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.head.HEAD.__init__" title="Permalink to this definition">¶</a></dt>
4691 <dd></dd></dl>
4692
4693 <dl class="attribute">
4694 <dt id="git.refs.head.HEAD.__module__">
4695 <code class="descname">__module__</code><em class="property"> = 'git.refs.head'</em><a class="headerlink" href="#git.refs.head.HEAD.__module__" title="Permalink to this definition">¶</a></dt>
4696 <dd></dd></dl>
4697
4698 <dl class="attribute">
4699 <dt id="git.refs.head.HEAD.__slots__">
4700 <code class="descname">__slots__</code><em class="property"> = ()</em><a class="headerlink" href="#git.refs.head.HEAD.__slots__" title="Permalink to this definition">¶</a></dt>
4701 <dd></dd></dl>
4702
4703 <dl class="method">
4704 <dt id="git.refs.head.HEAD.orig_head">
4705 <code class="descname">orig_head</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.head.HEAD.orig_head" title="Permalink to this definition">¶</a></dt>
4706 <dd><table class="docutils field-list" frame="void" rules="none">
4707 <col class="field-name" />
4708 <col class="field-body" />
4709 <tbody valign="top">
4710 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">SymbolicReference pointing at the ORIG_HEAD, which is maintained
4711 to contain the previous value of HEAD</td>
4712 </tr>
4713 </tbody>
4714 </table>
4715 </dd></dl>
4716
4717 <dl class="method">
4718 <dt id="git.refs.head.HEAD.reset">
4719 <code class="descname">reset</code><span class="sig-paren">(</span><em>commit='HEAD'</em>, <em>index=True</em>, <em>working_tree=False</em>, <em>paths=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.head.HEAD.reset" title="Permalink to this definition">¶</a></dt>
4720 <dd><p>Reset our HEAD to the given commit optionally synchronizing
4721 the index and working tree. The reference we refer to will be set to
4722 commit as well.</p>
4723 <table class="docutils field-list" frame="void" rules="none">
4724 <col class="field-name" />
4725 <col class="field-body" />
4726 <tbody valign="top">
4727 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
4728 <li><strong>commit</strong> &#8211; Commit object, Reference Object or string identifying a revision we
4729 should reset HEAD to.</li>
4730 <li><strong>index</strong> &#8211; If True, the index will be set to match the given commit. Otherwise
4731 it will not be touched.</li>
4732 <li><strong>working_tree</strong> &#8211; If True, the working tree will be forcefully adjusted to match the given
4733 commit, possibly overwriting uncommitted changes without warning.
4734 If working_tree is True, index must be true as well</li>
4735 <li><strong>paths</strong> &#8211; Single path or list of paths relative to the git root directory
4736 that are to be reset. This allows to partially reset individual files.</li>
4737 <li><strong>kwargs</strong> &#8211; Additional arguments passed to git-reset.</li>
4738 </ul>
4739 </td>
4740 </tr>
4741 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">self</p>
4742 </td>
4743 </tr>
4744 </tbody>
4745 </table>
4746 </dd></dl>
4747
4748 </dd></dl>
4749
4750 <dl class="class">
4751 <dt id="git.refs.head.Head">
4752 <em class="property">class </em><code class="descclassname">git.refs.head.</code><code class="descname">Head</code><span class="sig-paren">(</span><em>repo</em>, <em>path</em>, <em>check_path=True</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.head.Head" title="Permalink to this definition">¶</a></dt>
4753 <dd><p>A Head is a named reference to a Commit. Every Head instance contains a name
4754 and a Commit object.</p>
4755 <p>Examples:</p>
4756 <div class="highlight-default"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">repo</span> <span class="o">=</span> <span class="n">Repo</span><span class="p">(</span><span class="s2">&quot;/path/to/repo&quot;</span><span class="p">)</span>
4757 <span class="gp">&gt;&gt;&gt; </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="mi">0</span><span class="p">]</span>
4758
4759 <span class="gp">&gt;&gt;&gt; </span><span class="n">head</span><span class="o">.</span><span class="n">name</span>
4760 <span class="go">&#39;master&#39;</span>
4761
4762 <span class="gp">&gt;&gt;&gt; </span><span class="n">head</span><span class="o">.</span><span class="n">commit</span>
4763 <span class="go">&lt;git.Commit &quot;1c09f116cbc2cb4100fb6935bb162daa4723f455&quot;&gt;</span>
4764
4765 <span class="gp">&gt;&gt;&gt; </span><span class="n">head</span><span class="o">.</span><span class="n">commit</span><span class="o">.</span><span class="n">hexsha</span>
4766 <span class="go">&#39;1c09f116cbc2cb4100fb6935bb162daa4723f455&#39;</span>
4767 </pre></div>
4768 </div>
4769 <dl class="attribute">
4770 <dt id="git.refs.head.Head.__dict__">
4771 <code class="descname">__dict__</code><em class="property"> = dict_proxy({'rename': &lt;function rename at 0x10fe56398&gt;, '__module__': 'git.refs.head', '_common_path_default': 'refs/heads', 'config_reader': &lt;function config_reader at 0x10fe56500&gt;, 'k_config_remote': 'remote', 'set_tracking_branch': &lt;function set_tracking_branch at 0x10fe562a8&gt;, '_config_parser': &lt;function _config_parser at 0x10fe56488&gt;, 'k_config_remote_ref': 'merge', 'tracking_branch': &lt;function tracking_branch at 0x10fe56320&gt;, '__dict__': &lt;attribute '__dict__' of 'Head' objects&gt;, 'config_writer': &lt;function config_writer at 0x10fe56578&gt;, 'checkout': &lt;function checkout at 0x10fe56410&gt;, '__doc__': 'A Head is a named reference to a Commit. Every Head instance contains a name\n and a Commit object.\n\n Examples::\n\n &gt;&gt;&gt; repo = Repo(&quot;/path/to/repo&quot;)\n &gt;&gt;&gt; head = repo.heads[0]\n\n &gt;&gt;&gt; head.name\n \'master\'\n\n &gt;&gt;&gt; head.commit\n &lt;git.Commit &quot;1c09f116cbc2cb4100fb6935bb162daa4723f455&quot;&gt;\n\n &gt;&gt;&gt; head.commit.hexsha\n \'1c09f116cbc2cb4100fb6935bb162daa4723f455\'', '__weakref__': &lt;attribute '__weakref__' of 'Head' objects&gt;, 'delete': &lt;classmethod object at 0x10fe4ae50&gt;})</em><a class="headerlink" href="#git.refs.head.Head.__dict__" title="Permalink to this definition">¶</a></dt>
4772 <dd></dd></dl>
4773
4774 <dl class="attribute">
4775 <dt id="git.refs.head.Head.__module__">
4776 <code class="descname">__module__</code><em class="property"> = 'git.refs.head'</em><a class="headerlink" href="#git.refs.head.Head.__module__" title="Permalink to this definition">¶</a></dt>
4777 <dd></dd></dl>
4778
4779 <dl class="attribute">
4780 <dt id="git.refs.head.Head.__weakref__">
4781 <code class="descname">__weakref__</code><a class="headerlink" href="#git.refs.head.Head.__weakref__" title="Permalink to this definition">¶</a></dt>
4782 <dd><p>list of weak references to the object (if defined)</p>
4783 </dd></dl>
4784
4785 <dl class="method">
4786 <dt id="git.refs.head.Head.checkout">
4787 <code class="descname">checkout</code><span class="sig-paren">(</span><em>force=False</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.head.Head.checkout" title="Permalink to this definition">¶</a></dt>
4788 <dd><p>Checkout this head by setting the HEAD to this reference, by updating the index
4789 to reflect the tree we point to and by updating the working tree to reflect
4790 the latest index.</p>
4791 <p>The command will fail if changed working tree files would be overwritten.</p>
4792 <table class="docutils field-list" frame="void" rules="none">
4793 <col class="field-name" />
4794 <col class="field-body" />
4795 <tbody valign="top">
4796 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
4797 <li><strong>force</strong> &#8211; If True, changes to the index and the working tree will be discarded.
4798 If False, GitCommandError will be raised in that situation.</li>
4799 <li><strong>kwargs</strong> &#8211; Additional keyword arguments to be passed to git checkout, i.e.
4800 b=&#8217;new_branch&#8217; to create a new branch at the given spot.</li>
4801 </ul>
4802 </td>
4803 </tr>
4804 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The active branch after the checkout operation, usually self unless
4805 a new branch has been created.
4806 If there is no active branch, as the HEAD is now detached, the HEAD
4807 reference will be returned instead.</p>
4808 </td>
4809 </tr>
4810 <tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body"><p class="first last">By default it is only allowed to checkout heads - everything else
4811 will leave the HEAD detached which is allowed and possible, but remains
4812 a special state that some tools might not be able to handle.</p>
4813 </td>
4814 </tr>
4815 </tbody>
4816 </table>
4817 </dd></dl>
4818
4819 <dl class="method">
4820 <dt id="git.refs.head.Head.config_reader">
4821 <code class="descname">config_reader</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.head.Head.config_reader" title="Permalink to this definition">¶</a></dt>
4822 <dd><table class="docutils field-list" frame="void" rules="none">
4823 <col class="field-name" />
4824 <col class="field-body" />
4825 <tbody valign="top">
4826 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A configuration parser instance constrained to only read
4827 this instance&#8217;s values</td>
4828 </tr>
4829 </tbody>
4830 </table>
4831 </dd></dl>
4832
4833 <dl class="method">
4834 <dt id="git.refs.head.Head.config_writer">
4835 <code class="descname">config_writer</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.head.Head.config_writer" title="Permalink to this definition">¶</a></dt>
4836 <dd><table class="docutils field-list" frame="void" rules="none">
4837 <col class="field-name" />
4838 <col class="field-body" />
4839 <tbody valign="top">
4840 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A configuration writer instance with read-and write acccess
4841 to options of this head</td>
4842 </tr>
4843 </tbody>
4844 </table>
4845 </dd></dl>
4846
4847 <dl class="classmethod">
4848 <dt id="git.refs.head.Head.delete">
4849 <em class="property">classmethod </em><code class="descname">delete</code><span class="sig-paren">(</span><em>repo</em>, <em>*heads</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.head.Head.delete" title="Permalink to this definition">¶</a></dt>
4850 <dd><p>Delete the given heads</p>
4851 <table class="docutils field-list" frame="void" rules="none">
4852 <col class="field-name" />
4853 <col class="field-body" />
4854 <tbody valign="top">
4855 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>force</strong> &#8211; If True, the heads will be deleted even if they are not yet merged into
4856 the main development stream.
4857 Default False</td>
4858 </tr>
4859 </tbody>
4860 </table>
4861 </dd></dl>
4862
4863 <dl class="attribute">
4864 <dt id="git.refs.head.Head.k_config_remote">
4865 <code class="descname">k_config_remote</code><em class="property"> = 'remote'</em><a class="headerlink" href="#git.refs.head.Head.k_config_remote" title="Permalink to this definition">¶</a></dt>
4866 <dd></dd></dl>
4867
4868 <dl class="attribute">
4869 <dt id="git.refs.head.Head.k_config_remote_ref">
4870 <code class="descname">k_config_remote_ref</code><em class="property"> = 'merge'</em><a class="headerlink" href="#git.refs.head.Head.k_config_remote_ref" title="Permalink to this definition">¶</a></dt>
4871 <dd></dd></dl>
4872
4873 <dl class="method">
4874 <dt id="git.refs.head.Head.rename">
4875 <code class="descname">rename</code><span class="sig-paren">(</span><em>new_path</em>, <em>force=False</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.head.Head.rename" title="Permalink to this definition">¶</a></dt>
4876 <dd><p>Rename self to a new path</p>
4877 <table class="docutils field-list" frame="void" rules="none">
4878 <col class="field-name" />
4879 <col class="field-body" />
4880 <tbody valign="top">
4881 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
4882 <li><strong>new_path</strong> &#8211; Either a simple name or a path, i.e. new_name or features/new_name.
4883 The prefix refs/heads is implied</li>
4884 <li><strong>force</strong> &#8211; If True, the rename will succeed even if a head with the target name
4885 already exists.</li>
4886 </ul>
4887 </td>
4888 </tr>
4889 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">self</p>
4890 </td>
4891 </tr>
4892 <tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body"><p class="first last">respects the ref log as git commands are used</p>
4893 </td>
4894 </tr>
4895 </tbody>
4896 </table>
4897 </dd></dl>
4898
4899 <dl class="method">
4900 <dt id="git.refs.head.Head.set_tracking_branch">
4901 <code class="descname">set_tracking_branch</code><span class="sig-paren">(</span><em>remote_reference</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.head.Head.set_tracking_branch" title="Permalink to this definition">¶</a></dt>
4902 <dd><dl class="docutils">
4903 <dt>Configure this branch to track the given remote reference. This will alter</dt>
4904 <dd>this branch&#8217;s configuration accordingly.</dd>
4905 </dl>
4906 <table class="docutils field-list" frame="void" rules="none">
4907 <col class="field-name" />
4908 <col class="field-body" />
4909 <tbody valign="top">
4910 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>remote_reference</strong> &#8211; The remote reference to track or None to untrack
4911 any references</td>
4912 </tr>
4913 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">self</td>
4914 </tr>
4915 </tbody>
4916 </table>
4917 </dd></dl>
4918
4919 <dl class="method">
4920 <dt id="git.refs.head.Head.tracking_branch">
4921 <code class="descname">tracking_branch</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.head.Head.tracking_branch" title="Permalink to this definition">¶</a></dt>
4922 <dd><table class="docutils field-list" frame="void" rules="none">
4923 <col class="field-name" />
4924 <col class="field-body" />
4925 <tbody valign="top">
4926 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The remote_reference we are tracking, or None if we are
4927 not a tracking branch</td>
4928 </tr>
4929 </tbody>
4930 </table>
4931 </dd></dl>
4932
4933 </dd></dl>
4934
4935 </div>
4936 <div class="section" id="module-git.refs.tag">
4937 <span id="refs-tag"></span><h2>Refs.tag<a class="headerlink" href="#module-git.refs.tag" title="Permalink to this headline">¶</a></h2>
4938 <dl class="class">
4939 <dt id="git.refs.tag.TagReference">
4940 <em class="property">class </em><code class="descclassname">git.refs.tag.</code><code class="descname">TagReference</code><span class="sig-paren">(</span><em>repo</em>, <em>path</em>, <em>check_path=True</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.tag.TagReference" title="Permalink to this definition">¶</a></dt>
4941 <dd><p>Class representing a lightweight tag reference which either points to a commit
4942 ,a tag object or any other object. In the latter case additional information,
4943 like the signature or the tag-creator, is available.</p>
4944 <p>This tag object will always point to a commit object, but may carray additional
4945 information in a tag object:</p>
4946 <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">tagref</span> <span class="o">=</span> <span class="n">TagReference</span><span class="o">.</span><span class="n">list_items</span><span class="p">(</span><span class="n">repo</span><span class="p">)[</span><span class="mi">0</span><span class="p">]</span>
4947 <span class="nb">print</span><span class="p">(</span><span class="n">tagref</span><span class="o">.</span><span class="n">commit</span><span class="o">.</span><span class="n">message</span><span class="p">)</span>
4948 <span class="k">if</span> <span class="n">tagref</span><span class="o">.</span><span class="n">tag</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
4949 <span class="nb">print</span><span class="p">(</span><span class="n">tagref</span><span class="o">.</span><span class="n">tag</span><span class="o">.</span><span class="n">message</span><span class="p">)</span>
4950 </pre></div>
4951 </div>
4952 <dl class="attribute">
4953 <dt id="git.refs.tag.TagReference.__module__">
4954 <code class="descname">__module__</code><em class="property"> = 'git.refs.tag'</em><a class="headerlink" href="#git.refs.tag.TagReference.__module__" title="Permalink to this definition">¶</a></dt>
4955 <dd></dd></dl>
4956
4957 <dl class="attribute">
4958 <dt id="git.refs.tag.TagReference.__slots__">
4959 <code class="descname">__slots__</code><em class="property"> = ()</em><a class="headerlink" href="#git.refs.tag.TagReference.__slots__" title="Permalink to this definition">¶</a></dt>
4960 <dd></dd></dl>
4961
4962 <dl class="attribute">
4963 <dt id="git.refs.tag.TagReference.commit">
4964 <code class="descname">commit</code><a class="headerlink" href="#git.refs.tag.TagReference.commit" title="Permalink to this definition">¶</a></dt>
4965 <dd><table class="docutils field-list" frame="void" rules="none">
4966 <col class="field-name" />
4967 <col class="field-body" />
4968 <tbody valign="top">
4969 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Commit object the tag ref points to</td>
4970 </tr>
4971 </tbody>
4972 </table>
4973 </dd></dl>
4974
4975 <dl class="classmethod">
4976 <dt id="git.refs.tag.TagReference.create">
4977 <em class="property">classmethod </em><code class="descname">create</code><span class="sig-paren">(</span><em>repo</em>, <em>path</em>, <em>ref='HEAD'</em>, <em>message=None</em>, <em>force=False</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.tag.TagReference.create" title="Permalink to this definition">¶</a></dt>
4978 <dd><p>Create a new tag reference.</p>
4979 <table class="docutils field-list" frame="void" rules="none">
4980 <col class="field-name" />
4981 <col class="field-body" />
4982 <tbody valign="top">
4983 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
4984 <li><strong>path</strong> &#8211; The name of the tag, i.e. 1.0 or releases/1.0.
4985 The prefix refs/tags is implied</li>
4986 <li><strong>ref</strong> &#8211; A reference to the object you want to tag. It can be a commit, tree or
4987 blob.</li>
4988 <li><strong>message</strong> &#8211; <p>If not None, the message will be used in your tag object. This will also
4989 create an additional tag object that allows to obtain that information, i.e.:</p>
4990 <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">tagref</span><span class="o">.</span><span class="n">tag</span><span class="o">.</span><span class="n">message</span>
4991 </pre></div>
4992 </div>
4993 </li>
4994 <li><strong>force</strong> &#8211; If True, to force creation of a tag even though that tag already exists.</li>
4995 <li><strong>kwargs</strong> &#8211; Additional keyword arguments to be passed to git-tag</li>
4996 </ul>
4997 </td>
4998 </tr>
4999 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">A new TagReference</p>
5000 </td>
5001 </tr>
5002 </tbody>
5003 </table>
5004 </dd></dl>
5005
5006 <dl class="classmethod">
5007 <dt id="git.refs.tag.TagReference.delete">
5008 <em class="property">classmethod </em><code class="descname">delete</code><span class="sig-paren">(</span><em>repo</em>, <em>*tags</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.tag.TagReference.delete" title="Permalink to this definition">¶</a></dt>
5009 <dd><p>Delete the given existing tag or tags</p>
5010 </dd></dl>
5011
5012 <dl class="attribute">
5013 <dt id="git.refs.tag.TagReference.object">
5014 <code class="descname">object</code><a class="headerlink" href="#git.refs.tag.TagReference.object" title="Permalink to this definition">¶</a></dt>
5015 <dd><table class="docutils field-list" frame="void" rules="none">
5016 <col class="field-name" />
5017 <col class="field-body" />
5018 <tbody valign="top">
5019 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The object our ref currently refers to. Refs can be cached, they will
5020 always point to the actual object as it gets re-created on each query</td>
5021 </tr>
5022 </tbody>
5023 </table>
5024 </dd></dl>
5025
5026 <dl class="attribute">
5027 <dt id="git.refs.tag.TagReference.tag">
5028 <code class="descname">tag</code><a class="headerlink" href="#git.refs.tag.TagReference.tag" title="Permalink to this definition">¶</a></dt>
5029 <dd><table class="docutils field-list" frame="void" rules="none">
5030 <col class="field-name" />
5031 <col class="field-body" />
5032 <tbody valign="top">
5033 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Tag object this tag ref points to or None in case
5034 we are a light weight tag</td>
5035 </tr>
5036 </tbody>
5037 </table>
5038 </dd></dl>
5039
5040 </dd></dl>
5041
5042 <dl class="attribute">
5043 <dt id="git.refs.tag.Tag">
5044 <code class="descclassname">git.refs.tag.</code><code class="descname">Tag</code><a class="headerlink" href="#git.refs.tag.Tag" title="Permalink to this definition">¶</a></dt>
5045 <dd><p>alias of <a class="reference internal" href="#git.refs.tag.TagReference" title="git.refs.tag.TagReference"><code class="xref py py-class docutils literal"><span class="pre">TagReference</span></code></a></p>
5046 </dd></dl>
5047
5048 </div>
5049 <div class="section" id="module-git.refs.remote">
5050 <span id="refs-remote"></span><h2>Refs.remote<a class="headerlink" href="#module-git.refs.remote" title="Permalink to this headline">¶</a></h2>
5051 <dl class="class">
5052 <dt id="git.refs.remote.RemoteReference">
5053 <em class="property">class </em><code class="descclassname">git.refs.remote.</code><code class="descname">RemoteReference</code><span class="sig-paren">(</span><em>repo</em>, <em>path</em>, <em>check_path=True</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.remote.RemoteReference" title="Permalink to this definition">¶</a></dt>
5054 <dd><p>Represents a reference pointing to a remote head.</p>
5055 <dl class="attribute">
5056 <dt id="git.refs.remote.RemoteReference.__module__">
5057 <code class="descname">__module__</code><em class="property"> = 'git.refs.remote'</em><a class="headerlink" href="#git.refs.remote.RemoteReference.__module__" title="Permalink to this definition">¶</a></dt>
5058 <dd></dd></dl>
5059
5060 <dl class="classmethod">
5061 <dt id="git.refs.remote.RemoteReference.create">
5062 <em class="property">classmethod </em><code class="descname">create</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.remote.RemoteReference.create" title="Permalink to this definition">¶</a></dt>
5063 <dd><p>Used to disable this method</p>
5064 </dd></dl>
5065
5066 <dl class="classmethod">
5067 <dt id="git.refs.remote.RemoteReference.delete">
5068 <em class="property">classmethod </em><code class="descname">delete</code><span class="sig-paren">(</span><em>repo</em>, <em>*refs</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.remote.RemoteReference.delete" title="Permalink to this definition">¶</a></dt>
5069 <dd><p>Delete the given remote references</p>
5070 <table class="docutils field-list" frame="void" rules="none">
5071 <col class="field-name" />
5072 <col class="field-body" />
5073 <tbody valign="top">
5074 <tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">kwargs are given for compatability with the base class method as we
5075 should not narrow the signature.</td>
5076 </tr>
5077 </tbody>
5078 </table>
5079 </dd></dl>
5080
5081 <dl class="classmethod">
5082 <dt id="git.refs.remote.RemoteReference.iter_items">
5083 <em class="property">classmethod </em><code class="descname">iter_items</code><span class="sig-paren">(</span><em>repo</em>, <em>common_path=None</em>, <em>remote=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.remote.RemoteReference.iter_items" title="Permalink to this definition">¶</a></dt>
5084 <dd><p>Iterate remote references, and if given, constrain them to the given remote</p>
5085 </dd></dl>
5086
5087 </dd></dl>
5088
5089 </div>
5090 <div class="section" id="module-git.refs.log">
5091 <span id="refs-log"></span><h2>Refs.log<a class="headerlink" href="#module-git.refs.log" title="Permalink to this headline">¶</a></h2>
5092 <dl class="class">
5093 <dt id="git.refs.log.RefLog">
5094 <em class="property">class </em><code class="descclassname">git.refs.log.</code><code class="descname">RefLog</code><span class="sig-paren">(</span><em>filepath=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.log.RefLog" title="Permalink to this definition">¶</a></dt>
5095 <dd><p>A reflog contains reflog entries, each of which defines a certain state
5096 of the head in question. Custom query methods allow to retrieve log entries
5097 by date or by other criteria.</p>
5098 <p>Reflog entries are orded, the first added entry is first in the list, the last
5099 entry, i.e. the last change of the head or reference, is last in the list.</p>
5100 <dl class="method">
5101 <dt id="git.refs.log.RefLog.__init__">
5102 <code class="descname">__init__</code><span class="sig-paren">(</span><em>filepath=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.log.RefLog.__init__" title="Permalink to this definition">¶</a></dt>
5103 <dd><p>Initialize this instance with an optional filepath, from which we will
5104 initialize our data. The path is also used to write changes back using
5105 the write() method</p>
5106 </dd></dl>
5107
5108 <dl class="attribute">
5109 <dt id="git.refs.log.RefLog.__module__">
5110 <code class="descname">__module__</code><em class="property"> = 'git.refs.log'</em><a class="headerlink" href="#git.refs.log.RefLog.__module__" title="Permalink to this definition">¶</a></dt>
5111 <dd></dd></dl>
5112
5113 <dl class="staticmethod">
5114 <dt id="git.refs.log.RefLog.__new__">
5115 <em class="property">static </em><code class="descname">__new__</code><span class="sig-paren">(</span><em>filepath=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.log.RefLog.__new__" title="Permalink to this definition">¶</a></dt>
5116 <dd></dd></dl>
5117
5118 <dl class="attribute">
5119 <dt id="git.refs.log.RefLog.__slots__">
5120 <code class="descname">__slots__</code><em class="property"> = ('_path',)</em><a class="headerlink" href="#git.refs.log.RefLog.__slots__" title="Permalink to this definition">¶</a></dt>
5121 <dd></dd></dl>
5122
5123 <dl class="classmethod">
5124 <dt id="git.refs.log.RefLog.append_entry">
5125 <em class="property">classmethod </em><code class="descname">append_entry</code><span class="sig-paren">(</span><em>config_reader</em>, <em>filepath</em>, <em>oldbinsha</em>, <em>newbinsha</em>, <em>message</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.log.RefLog.append_entry" title="Permalink to this definition">¶</a></dt>
5126 <dd><p>Append a new log entry to the revlog at filepath.</p>
5127 <table class="docutils field-list" frame="void" rules="none">
5128 <col class="field-name" />
5129 <col class="field-body" />
5130 <tbody valign="top">
5131 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
5132 <li><strong>config_reader</strong> &#8211; configuration reader of the repository - used to obtain
5133 user information. May also be an Actor instance identifying the committer directly.
5134 May also be None</li>
5135 <li><strong>filepath</strong> &#8211; full path to the log file</li>
5136 <li><strong>oldbinsha</strong> &#8211; binary sha of the previous commit</li>
5137 <li><strong>newbinsha</strong> &#8211; binary sha of the current commit</li>
5138 <li><strong>message</strong> &#8211; message describing the change to the reference</li>
5139 <li><strong>write</strong> &#8211; If True, the changes will be written right away. Otherwise
5140 the change will not be written</li>
5141 </ul>
5142 </td>
5143 </tr>
5144 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">RefLogEntry objects which was appended to the log</p>
5145 </td>
5146 </tr>
5147 <tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body"><p class="first last">As we are append-only, concurrent access is not a problem as we
5148 do not interfere with readers.</p>
5149 </td>
5150 </tr>
5151 </tbody>
5152 </table>
5153 </dd></dl>
5154
5155 <dl class="classmethod">
5156 <dt id="git.refs.log.RefLog.entry_at">
5157 <em class="property">classmethod </em><code class="descname">entry_at</code><span class="sig-paren">(</span><em>filepath</em>, <em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.log.RefLog.entry_at" title="Permalink to this definition">¶</a></dt>
5158 <dd><table class="docutils field-list" frame="void" rules="none">
5159 <col class="field-name" />
5160 <col class="field-body" />
5161 <tbody valign="top">
5162 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">RefLogEntry at the given index</p>
5163 </td>
5164 </tr>
5165 <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
5166 <li><strong>filepath</strong> &#8211; full path to the index file from which to read the entry</li>
5167 <li><strong>index</strong> &#8211; python list compatible index, i.e. it may be negative to
5168 specifiy an entry counted from the end of the list</li>
5169 </ul>
5170 </td>
5171 </tr>
5172 <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><strong>IndexError</strong> &#8211; If the entry didn&#8217;t exist</p>
5173 </td>
5174 </tr>
5175 </tbody>
5176 </table>
5177 <div class="admonition note">
5178 <p class="first admonition-title">Note</p>
5179 <p class="last">This method is faster as it only parses the entry at index, skipping
5180 all other lines. Nonetheless, the whole file has to be read if
5181 the index is negative</p>
5182 </div>
5183 </dd></dl>
5184
5185 <dl class="classmethod">
5186 <dt id="git.refs.log.RefLog.from_file">
5187 <em class="property">classmethod </em><code class="descname">from_file</code><span class="sig-paren">(</span><em>filepath</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.log.RefLog.from_file" title="Permalink to this definition">¶</a></dt>
5188 <dd><table class="docutils field-list" frame="void" rules="none">
5189 <col class="field-name" />
5190 <col class="field-body" />
5191 <tbody valign="top">
5192 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">a new RefLog instance containing all entries from the reflog
5193 at the given filepath</td>
5194 </tr>
5195 <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filepath</strong> &#8211; path to reflog</td>
5196 </tr>
5197 <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><strong>ValueError</strong> &#8211; If the file could not be read or was corrupted in some way</td>
5198 </tr>
5199 </tbody>
5200 </table>
5201 </dd></dl>
5202
5203 <dl class="classmethod">
5204 <dt id="git.refs.log.RefLog.iter_entries">
5205 <em class="property">classmethod </em><code class="descname">iter_entries</code><span class="sig-paren">(</span><em>stream</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.log.RefLog.iter_entries" title="Permalink to this definition">¶</a></dt>
5206 <dd><table class="docutils field-list" frame="void" rules="none">
5207 <col class="field-name" />
5208 <col class="field-body" />
5209 <tbody valign="top">
5210 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Iterator yielding RefLogEntry instances, one for each line read
5211 sfrom the given stream.</td>
5212 </tr>
5213 <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>stream</strong> &#8211; file-like object containing the revlog in its native format
5214 or basestring instance pointing to a file to read</td>
5215 </tr>
5216 </tbody>
5217 </table>
5218 </dd></dl>
5219
5220 <dl class="classmethod">
5221 <dt id="git.refs.log.RefLog.path">
5222 <em class="property">classmethod </em><code class="descname">path</code><span class="sig-paren">(</span><em>ref</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.log.RefLog.path" title="Permalink to this definition">¶</a></dt>
5223 <dd><table class="docutils field-list" frame="void" rules="none">
5224 <col class="field-name" />
5225 <col class="field-body" />
5226 <tbody valign="top">
5227 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">string to absolute path at which the reflog of the given ref
5228 instance would be found. The path is not guaranteed to point to a valid
5229 file though.</td>
5230 </tr>
5231 <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>ref</strong> &#8211; SymbolicReference instance</td>
5232 </tr>
5233 </tbody>
5234 </table>
5235 </dd></dl>
5236
5237 <dl class="method">
5238 <dt id="git.refs.log.RefLog.to_file">
5239 <code class="descname">to_file</code><span class="sig-paren">(</span><em>filepath</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.log.RefLog.to_file" title="Permalink to this definition">¶</a></dt>
5240 <dd><p>Write the contents of the reflog instance to a file at the given filepath.
5241 :param filepath: path to file, parent directories are assumed to exist</p>
5242 </dd></dl>
5243
5244 <dl class="method">
5245 <dt id="git.refs.log.RefLog.write">
5246 <code class="descname">write</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.log.RefLog.write" title="Permalink to this definition">¶</a></dt>
5247 <dd><p>Write this instance&#8217;s data to the file we are originating from
5248 :return: self</p>
5249 </dd></dl>
5250
5251 </dd></dl>
5252
5253 <dl class="class">
5254 <dt id="git.refs.log.RefLogEntry">
5255 <em class="property">class </em><code class="descclassname">git.refs.log.</code><code class="descname">RefLogEntry</code><a class="headerlink" href="#git.refs.log.RefLogEntry" title="Permalink to this definition">¶</a></dt>
5256 <dd><p>Named tuple allowing easy access to the revlog data fields</p>
5257 <dl class="attribute">
5258 <dt id="git.refs.log.RefLogEntry.__module__">
5259 <code class="descname">__module__</code><em class="property"> = 'git.refs.log'</em><a class="headerlink" href="#git.refs.log.RefLogEntry.__module__" title="Permalink to this definition">¶</a></dt>
5260 <dd></dd></dl>
5261
5262 <dl class="method">
5263 <dt id="git.refs.log.RefLogEntry.__repr__">
5264 <code class="descname">__repr__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.log.RefLogEntry.__repr__" title="Permalink to this definition">¶</a></dt>
5265 <dd><p>Representation of ourselves in git reflog format</p>
5266 </dd></dl>
5267
5268 <dl class="attribute">
5269 <dt id="git.refs.log.RefLogEntry.__slots__">
5270 <code class="descname">__slots__</code><em class="property"> = ()</em><a class="headerlink" href="#git.refs.log.RefLogEntry.__slots__" title="Permalink to this definition">¶</a></dt>
5271 <dd></dd></dl>
5272
5273 <dl class="attribute">
5274 <dt id="git.refs.log.RefLogEntry.actor">
5275 <code class="descname">actor</code><a class="headerlink" href="#git.refs.log.RefLogEntry.actor" title="Permalink to this definition">¶</a></dt>
5276 <dd><p>Actor instance, providing access</p>
5277 </dd></dl>
5278
5279 <dl class="method">
5280 <dt id="git.refs.log.RefLogEntry.format">
5281 <code class="descname">format</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.log.RefLogEntry.format" title="Permalink to this definition">¶</a></dt>
5282 <dd><table class="docutils field-list" frame="void" rules="none">
5283 <col class="field-name" />
5284 <col class="field-body" />
5285 <tbody valign="top">
5286 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">a string suitable to be placed in a reflog file</td>
5287 </tr>
5288 </tbody>
5289 </table>
5290 </dd></dl>
5291
5292 <dl class="classmethod">
5293 <dt id="git.refs.log.RefLogEntry.from_line">
5294 <em class="property">classmethod </em><code class="descname">from_line</code><span class="sig-paren">(</span><em>line</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.log.RefLogEntry.from_line" title="Permalink to this definition">¶</a></dt>
5295 <dd><table class="docutils field-list" frame="void" rules="none">
5296 <col class="field-name" />
5297 <col class="field-body" />
5298 <tbody valign="top">
5299 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">New RefLogEntry instance from the given revlog line.</td>
5300 </tr>
5301 <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>line</strong> &#8211; line bytes without trailing newline</td>
5302 </tr>
5303 <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><strong>ValueError</strong> &#8211; If line could not be parsed</td>
5304 </tr>
5305 </tbody>
5306 </table>
5307 </dd></dl>
5308
5309 <dl class="attribute">
5310 <dt id="git.refs.log.RefLogEntry.message">
5311 <code class="descname">message</code><a class="headerlink" href="#git.refs.log.RefLogEntry.message" title="Permalink to this definition">¶</a></dt>
5312 <dd><p>Message describing the operation that acted on the reference</p>
5313 </dd></dl>
5314
5315 <dl class="classmethod">
5316 <dt id="git.refs.log.RefLogEntry.new">
5317 <em class="property">classmethod </em><code class="descname">new</code><span class="sig-paren">(</span><em>oldhexsha</em>, <em>newhexsha</em>, <em>actor</em>, <em>time</em>, <em>tz_offset</em>, <em>message</em><span class="sig-paren">)</span><a class="headerlink" href="#git.refs.log.RefLogEntry.new" title="Permalink to this definition">¶</a></dt>
5318 <dd><table class="docutils field-list" frame="void" rules="none">
5319 <col class="field-name" />
5320 <col class="field-body" />
5321 <tbody valign="top">
5322 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">New instance of a RefLogEntry</td>
5323 </tr>
5324 </tbody>
5325 </table>
5326 </dd></dl>
5327
5328 <dl class="attribute">
5329 <dt id="git.refs.log.RefLogEntry.newhexsha">
5330 <code class="descname">newhexsha</code><a class="headerlink" href="#git.refs.log.RefLogEntry.newhexsha" title="Permalink to this definition">¶</a></dt>
5331 <dd><p>The hexsha to the commit the ref now points to, after the change</p>
5332 </dd></dl>
5333
5334 <dl class="attribute">
5335 <dt id="git.refs.log.RefLogEntry.oldhexsha">
5336 <code class="descname">oldhexsha</code><a class="headerlink" href="#git.refs.log.RefLogEntry.oldhexsha" title="Permalink to this definition">¶</a></dt>
5337 <dd><p>The hexsha to the commit the ref pointed to before the change</p>
5338 </dd></dl>
5339
5340 <dl class="attribute">
5341 <dt id="git.refs.log.RefLogEntry.time">
5342 <code class="descname">time</code><a class="headerlink" href="#git.refs.log.RefLogEntry.time" title="Permalink to this definition">¶</a></dt>
5343 <dd><p>time as tuple:</p>
5344 <ul class="simple">
5345 <li>[0] = int(time)</li>
5346 <li>[1] = int(timezone_offset) in time.altzone format</li>
5347 </ul>
5348 </dd></dl>
5349
5350 </dd></dl>
5351
5352 </div>
5353 <div class="section" id="module-git.remote">
5354 <span id="remote"></span><h2>Remote<a class="headerlink" href="#module-git.remote" title="Permalink to this headline">¶</a></h2>
5355 <dl class="class">
5356 <dt id="git.remote.RemoteProgress">
5357 <em class="property">class </em><code class="descclassname">git.remote.</code><code class="descname">RemoteProgress</code><a class="headerlink" href="#git.remote.RemoteProgress" title="Permalink to this definition">¶</a></dt>
5358 <dd><p>Handler providing an interface to parse progress information emitted by git-push
5359 and git-fetch and to dispatch callbacks allowing subclasses to react to the progress.</p>
5360 <dl class="attribute">
5361 <dt id="git.remote.RemoteProgress.BEGIN">
5362 <code class="descname">BEGIN</code><em class="property"> = 1</em><a class="headerlink" href="#git.remote.RemoteProgress.BEGIN" title="Permalink to this definition">¶</a></dt>
5363 <dd></dd></dl>
5364
5365 <dl class="attribute">
5366 <dt id="git.remote.RemoteProgress.CHECKING_OUT">
5367 <code class="descname">CHECKING_OUT</code><em class="property"> = 256</em><a class="headerlink" href="#git.remote.RemoteProgress.CHECKING_OUT" title="Permalink to this definition">¶</a></dt>
5368 <dd></dd></dl>
5369
5370 <dl class="attribute">
5371 <dt id="git.remote.RemoteProgress.COMPRESSING">
5372 <code class="descname">COMPRESSING</code><em class="property"> = 8</em><a class="headerlink" href="#git.remote.RemoteProgress.COMPRESSING" title="Permalink to this definition">¶</a></dt>
5373 <dd></dd></dl>
5374
5375 <dl class="attribute">
5376 <dt id="git.remote.RemoteProgress.COUNTING">
5377 <code class="descname">COUNTING</code><em class="property"> = 4</em><a class="headerlink" href="#git.remote.RemoteProgress.COUNTING" title="Permalink to this definition">¶</a></dt>
5378 <dd></dd></dl>
5379
5380 <dl class="attribute">
5381 <dt id="git.remote.RemoteProgress.DONE_TOKEN">
5382 <code class="descname">DONE_TOKEN</code><em class="property"> = 'done.'</em><a class="headerlink" href="#git.remote.RemoteProgress.DONE_TOKEN" title="Permalink to this definition">¶</a></dt>
5383 <dd></dd></dl>
5384
5385 <dl class="attribute">
5386 <dt id="git.remote.RemoteProgress.END">
5387 <code class="descname">END</code><em class="property"> = 2</em><a class="headerlink" href="#git.remote.RemoteProgress.END" title="Permalink to this definition">¶</a></dt>
5388 <dd></dd></dl>
5389
5390 <dl class="attribute">
5391 <dt id="git.remote.RemoteProgress.FINDING_SOURCES">
5392 <code class="descname">FINDING_SOURCES</code><em class="property"> = 128</em><a class="headerlink" href="#git.remote.RemoteProgress.FINDING_SOURCES" title="Permalink to this definition">¶</a></dt>
5393 <dd></dd></dl>
5394
5395 <dl class="attribute">
5396 <dt id="git.remote.RemoteProgress.OP_MASK">
5397 <code class="descname">OP_MASK</code><em class="property"> = -4</em><a class="headerlink" href="#git.remote.RemoteProgress.OP_MASK" title="Permalink to this definition">¶</a></dt>
5398 <dd></dd></dl>
5399
5400 <dl class="attribute">
5401 <dt id="git.remote.RemoteProgress.RECEIVING">
5402 <code class="descname">RECEIVING</code><em class="property"> = 32</em><a class="headerlink" href="#git.remote.RemoteProgress.RECEIVING" title="Permalink to this definition">¶</a></dt>
5403 <dd></dd></dl>
5404
5405 <dl class="attribute">
5406 <dt id="git.remote.RemoteProgress.RESOLVING">
5407 <code class="descname">RESOLVING</code><em class="property"> = 64</em><a class="headerlink" href="#git.remote.RemoteProgress.RESOLVING" title="Permalink to this definition">¶</a></dt>
5408 <dd></dd></dl>
5409
5410 <dl class="attribute">
5411 <dt id="git.remote.RemoteProgress.STAGE_MASK">
5412 <code class="descname">STAGE_MASK</code><em class="property"> = 3</em><a class="headerlink" href="#git.remote.RemoteProgress.STAGE_MASK" title="Permalink to this definition">¶</a></dt>
5413 <dd></dd></dl>
5414
5415 <dl class="attribute">
5416 <dt id="git.remote.RemoteProgress.TOKEN_SEPARATOR">
5417 <code class="descname">TOKEN_SEPARATOR</code><em class="property"> = ', '</em><a class="headerlink" href="#git.remote.RemoteProgress.TOKEN_SEPARATOR" title="Permalink to this definition">¶</a></dt>
5418 <dd></dd></dl>
5419
5420 <dl class="attribute">
5421 <dt id="git.remote.RemoteProgress.WRITING">
5422 <code class="descname">WRITING</code><em class="property"> = 16</em><a class="headerlink" href="#git.remote.RemoteProgress.WRITING" title="Permalink to this definition">¶</a></dt>
5423 <dd></dd></dl>
5424
5425 <dl class="method">
5426 <dt id="git.remote.RemoteProgress.__init__">
5427 <code class="descname">__init__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.RemoteProgress.__init__" title="Permalink to this definition">¶</a></dt>
5428 <dd></dd></dl>
5429
5430 <dl class="attribute">
5431 <dt id="git.remote.RemoteProgress.__module__">
5432 <code class="descname">__module__</code><em class="property"> = 'git.util'</em><a class="headerlink" href="#git.remote.RemoteProgress.__module__" title="Permalink to this definition">¶</a></dt>
5433 <dd></dd></dl>
5434
5435 <dl class="attribute">
5436 <dt id="git.remote.RemoteProgress.__slots__">
5437 <code class="descname">__slots__</code><em class="property"> = ('_cur_line', '_seen_ops', '_error_lines')</em><a class="headerlink" href="#git.remote.RemoteProgress.__slots__" title="Permalink to this definition">¶</a></dt>
5438 <dd></dd></dl>
5439
5440 <dl class="method">
5441 <dt id="git.remote.RemoteProgress.error_lines">
5442 <code class="descname">error_lines</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.RemoteProgress.error_lines" title="Permalink to this definition">¶</a></dt>
5443 <dd><p>Returns all lines that started with error: or fatal:</p>
5444 </dd></dl>
5445
5446 <dl class="method">
5447 <dt id="git.remote.RemoteProgress.line_dropped">
5448 <code class="descname">line_dropped</code><span class="sig-paren">(</span><em>line</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.RemoteProgress.line_dropped" title="Permalink to this definition">¶</a></dt>
5449 <dd><p>Called whenever a line could not be understood and was therefore dropped.</p>
5450 </dd></dl>
5451
5452 <dl class="method">
5453 <dt id="git.remote.RemoteProgress.new_message_handler">
5454 <code class="descname">new_message_handler</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.RemoteProgress.new_message_handler" title="Permalink to this definition">¶</a></dt>
5455 <dd><table class="docutils field-list" frame="void" rules="none">
5456 <col class="field-name" />
5457 <col class="field-body" />
5458 <tbody valign="top">
5459 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">a progress handler suitable for handle_process_output(), passing lines on to this Progress
5460 handler in a suitable format</td>
5461 </tr>
5462 </tbody>
5463 </table>
5464 </dd></dl>
5465
5466 <dl class="attribute">
5467 <dt id="git.remote.RemoteProgress.re_op_absolute">
5468 <code class="descname">re_op_absolute</code><em class="property"> = &lt;_sre.SRE_Pattern object&gt;</em><a class="headerlink" href="#git.remote.RemoteProgress.re_op_absolute" title="Permalink to this definition">¶</a></dt>
5469 <dd></dd></dl>
5470
5471 <dl class="attribute">
5472 <dt id="git.remote.RemoteProgress.re_op_relative">
5473 <code class="descname">re_op_relative</code><em class="property"> = &lt;_sre.SRE_Pattern object&gt;</em><a class="headerlink" href="#git.remote.RemoteProgress.re_op_relative" title="Permalink to this definition">¶</a></dt>
5474 <dd></dd></dl>
5475
5476 <dl class="method">
5477 <dt id="git.remote.RemoteProgress.update">
5478 <code class="descname">update</code><span class="sig-paren">(</span><em>op_code</em>, <em>cur_count</em>, <em>max_count=None</em>, <em>message=''</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.RemoteProgress.update" title="Permalink to this definition">¶</a></dt>
5479 <dd><p>Called whenever the progress changes</p>
5480 <table class="docutils field-list" frame="void" rules="none">
5481 <col class="field-name" />
5482 <col class="field-body" />
5483 <tbody valign="top">
5484 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
5485 <li><strong>op_code</strong> &#8211; <p>Integer allowing to be compared against Operation IDs and stage IDs.</p>
5486 <p>Stage IDs are BEGIN and END. BEGIN will only be set once for each Operation
5487 ID as well as END. It may be that BEGIN and END are set at once in case only
5488 one progress message was emitted due to the speed of the operation.
5489 Between BEGIN and END, none of these flags will be set</p>
5490 <p>Operation IDs are all held within the OP_MASK. Only one Operation ID will
5491 be active per call.</p>
5492 </li>
5493 <li><strong>cur_count</strong> &#8211; Current absolute count of items</li>
5494 <li><strong>max_count</strong> &#8211; The maximum count of items we expect. It may be None in case there is
5495 no maximum number of items or if it is (yet) unknown.</li>
5496 <li><strong>message</strong> &#8211; In case of the &#8216;WRITING&#8217; operation, it contains the amount of bytes
5497 transferred. It may possibly be used for other purposes as well.</li>
5498 </ul>
5499 </td>
5500 </tr>
5501 </tbody>
5502 </table>
5503 <p>You may read the contents of the current line in self._cur_line</p>
5504 </dd></dl>
5505
5506 <dl class="attribute">
5507 <dt id="git.remote.RemoteProgress.x">
5508 <code class="descname">x</code><em class="property"> = 8</em><a class="headerlink" href="#git.remote.RemoteProgress.x" title="Permalink to this definition">¶</a></dt>
5509 <dd></dd></dl>
5510
5511 </dd></dl>
5512
5513 <dl class="class">
5514 <dt id="git.remote.PushInfo">
5515 <em class="property">class </em><code class="descclassname">git.remote.</code><code class="descname">PushInfo</code><span class="sig-paren">(</span><em>flags</em>, <em>local_ref</em>, <em>remote_ref_string</em>, <em>remote</em>, <em>old_commit=None</em>, <em>summary=''</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.PushInfo" title="Permalink to this definition">¶</a></dt>
5516 <dd><p>Carries information about the result of a push operation of a single head:</p>
5517 <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">info</span> <span class="o">=</span> <span class="n">remote</span><span class="o">.</span><span class="n">push</span><span class="p">()[</span><span class="mi">0</span><span class="p">]</span>
5518 <span class="n">info</span><span class="o">.</span><span class="n">flags</span> <span class="c1"># bitflags providing more information about the result</span>
5519 <span class="n">info</span><span class="o">.</span><span class="n">local_ref</span> <span class="c1"># Reference pointing to the local reference that was pushed</span>
5520 <span class="c1"># It is None if the ref was deleted.</span>
5521 <span class="n">info</span><span class="o">.</span><span class="n">remote_ref_string</span> <span class="c1"># path to the remote reference located on the remote side</span>
5522 <span class="n">info</span><span class="o">.</span><span class="n">remote_ref</span> <span class="c1"># Remote Reference on the local side corresponding to</span>
5523 <span class="c1"># the remote_ref_string. It can be a TagReference as well.</span>
5524 <span class="n">info</span><span class="o">.</span><span class="n">old_commit</span> <span class="c1"># commit at which the remote_ref was standing before we pushed</span>
5525 <span class="c1"># it to local_ref.commit. Will be None if an error was indicated</span>
5526 <span class="n">info</span><span class="o">.</span><span class="n">summary</span> <span class="c1"># summary line providing human readable english text about the push</span>
5527 </pre></div>
5528 </div>
5529 <dl class="attribute">
5530 <dt id="git.remote.PushInfo.DELETED">
5531 <code class="descname">DELETED</code><em class="property"> = 64</em><a class="headerlink" href="#git.remote.PushInfo.DELETED" title="Permalink to this definition">¶</a></dt>
5532 <dd></dd></dl>
5533
5534 <dl class="attribute">
5535 <dt id="git.remote.PushInfo.ERROR">
5536 <code class="descname">ERROR</code><em class="property"> = 1024</em><a class="headerlink" href="#git.remote.PushInfo.ERROR" title="Permalink to this definition">¶</a></dt>
5537 <dd></dd></dl>
5538
5539 <dl class="attribute">
5540 <dt id="git.remote.PushInfo.FAST_FORWARD">
5541 <code class="descname">FAST_FORWARD</code><em class="property"> = 256</em><a class="headerlink" href="#git.remote.PushInfo.FAST_FORWARD" title="Permalink to this definition">¶</a></dt>
5542 <dd></dd></dl>
5543
5544 <dl class="attribute">
5545 <dt id="git.remote.PushInfo.FORCED_UPDATE">
5546 <code class="descname">FORCED_UPDATE</code><em class="property"> = 128</em><a class="headerlink" href="#git.remote.PushInfo.FORCED_UPDATE" title="Permalink to this definition">¶</a></dt>
5547 <dd></dd></dl>
5548
5549 <dl class="attribute">
5550 <dt id="git.remote.PushInfo.NEW_HEAD">
5551 <code class="descname">NEW_HEAD</code><em class="property"> = 2</em><a class="headerlink" href="#git.remote.PushInfo.NEW_HEAD" title="Permalink to this definition">¶</a></dt>
5552 <dd></dd></dl>
5553
5554 <dl class="attribute">
5555 <dt id="git.remote.PushInfo.NEW_TAG">
5556 <code class="descname">NEW_TAG</code><em class="property"> = 1</em><a class="headerlink" href="#git.remote.PushInfo.NEW_TAG" title="Permalink to this definition">¶</a></dt>
5557 <dd></dd></dl>
5558
5559 <dl class="attribute">
5560 <dt id="git.remote.PushInfo.NO_MATCH">
5561 <code class="descname">NO_MATCH</code><em class="property"> = 4</em><a class="headerlink" href="#git.remote.PushInfo.NO_MATCH" title="Permalink to this definition">¶</a></dt>
5562 <dd></dd></dl>
5563
5564 <dl class="attribute">
5565 <dt id="git.remote.PushInfo.REJECTED">
5566 <code class="descname">REJECTED</code><em class="property"> = 8</em><a class="headerlink" href="#git.remote.PushInfo.REJECTED" title="Permalink to this definition">¶</a></dt>
5567 <dd></dd></dl>
5568
5569 <dl class="attribute">
5570 <dt id="git.remote.PushInfo.REMOTE_FAILURE">
5571 <code class="descname">REMOTE_FAILURE</code><em class="property"> = 32</em><a class="headerlink" href="#git.remote.PushInfo.REMOTE_FAILURE" title="Permalink to this definition">¶</a></dt>
5572 <dd></dd></dl>
5573
5574 <dl class="attribute">
5575 <dt id="git.remote.PushInfo.REMOTE_REJECTED">
5576 <code class="descname">REMOTE_REJECTED</code><em class="property"> = 16</em><a class="headerlink" href="#git.remote.PushInfo.REMOTE_REJECTED" title="Permalink to this definition">¶</a></dt>
5577 <dd></dd></dl>
5578
5579 <dl class="attribute">
5580 <dt id="git.remote.PushInfo.UP_TO_DATE">
5581 <code class="descname">UP_TO_DATE</code><em class="property"> = 512</em><a class="headerlink" href="#git.remote.PushInfo.UP_TO_DATE" title="Permalink to this definition">¶</a></dt>
5582 <dd></dd></dl>
5583
5584 <dl class="method">
5585 <dt id="git.remote.PushInfo.__init__">
5586 <code class="descname">__init__</code><span class="sig-paren">(</span><em>flags</em>, <em>local_ref</em>, <em>remote_ref_string</em>, <em>remote</em>, <em>old_commit=None</em>, <em>summary=''</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.PushInfo.__init__" title="Permalink to this definition">¶</a></dt>
5587 <dd><p>Initialize a new instance</p>
5588 </dd></dl>
5589
5590 <dl class="attribute">
5591 <dt id="git.remote.PushInfo.__module__">
5592 <code class="descname">__module__</code><em class="property"> = 'git.remote'</em><a class="headerlink" href="#git.remote.PushInfo.__module__" title="Permalink to this definition">¶</a></dt>
5593 <dd></dd></dl>
5594
5595 <dl class="attribute">
5596 <dt id="git.remote.PushInfo.__slots__">
5597 <code class="descname">__slots__</code><em class="property"> = ('local_ref', 'remote_ref_string', 'flags', '_old_commit_sha', '_remote', 'summary')</em><a class="headerlink" href="#git.remote.PushInfo.__slots__" title="Permalink to this definition">¶</a></dt>
5598 <dd></dd></dl>
5599
5600 <dl class="attribute">
5601 <dt id="git.remote.PushInfo.flags">
5602 <code class="descname">flags</code><a class="headerlink" href="#git.remote.PushInfo.flags" title="Permalink to this definition">¶</a></dt>
5603 <dd></dd></dl>
5604
5605 <dl class="attribute">
5606 <dt id="git.remote.PushInfo.local_ref">
5607 <code class="descname">local_ref</code><a class="headerlink" href="#git.remote.PushInfo.local_ref" title="Permalink to this definition">¶</a></dt>
5608 <dd></dd></dl>
5609
5610 <dl class="attribute">
5611 <dt id="git.remote.PushInfo.old_commit">
5612 <code class="descname">old_commit</code><a class="headerlink" href="#git.remote.PushInfo.old_commit" title="Permalink to this definition">¶</a></dt>
5613 <dd></dd></dl>
5614
5615 <dl class="attribute">
5616 <dt id="git.remote.PushInfo.remote_ref">
5617 <code class="descname">remote_ref</code><a class="headerlink" href="#git.remote.PushInfo.remote_ref" title="Permalink to this definition">¶</a></dt>
5618 <dd><table class="docutils field-list" frame="void" rules="none">
5619 <col class="field-name" />
5620 <col class="field-body" />
5621 <tbody valign="top">
5622 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Remote Reference or TagReference in the local repository corresponding
5623 to the remote_ref_string kept in this instance.</td>
5624 </tr>
5625 </tbody>
5626 </table>
5627 </dd></dl>
5628
5629 <dl class="attribute">
5630 <dt id="git.remote.PushInfo.remote_ref_string">
5631 <code class="descname">remote_ref_string</code><a class="headerlink" href="#git.remote.PushInfo.remote_ref_string" title="Permalink to this definition">¶</a></dt>
5632 <dd></dd></dl>
5633
5634 <dl class="attribute">
5635 <dt id="git.remote.PushInfo.summary">
5636 <code class="descname">summary</code><a class="headerlink" href="#git.remote.PushInfo.summary" title="Permalink to this definition">¶</a></dt>
5637 <dd></dd></dl>
5638
5639 <dl class="attribute">
5640 <dt id="git.remote.PushInfo.x">
5641 <code class="descname">x</code><em class="property"> = 10</em><a class="headerlink" href="#git.remote.PushInfo.x" title="Permalink to this definition">¶</a></dt>
5642 <dd></dd></dl>
5643
5644 </dd></dl>
5645
5646 <dl class="class">
5647 <dt id="git.remote.FetchInfo">
5648 <em class="property">class </em><code class="descclassname">git.remote.</code><code class="descname">FetchInfo</code><span class="sig-paren">(</span><em>ref</em>, <em>flags</em>, <em>note=''</em>, <em>old_commit=None</em>, <em>remote_ref_path=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.FetchInfo" title="Permalink to this definition">¶</a></dt>
5649 <dd><p>Carries information about the results of a fetch operation of a single head:</p>
5650 <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">info</span> <span class="o">=</span> <span class="n">remote</span><span class="o">.</span><span class="n">fetch</span><span class="p">()[</span><span class="mi">0</span><span class="p">]</span>
5651 <span class="n">info</span><span class="o">.</span><span class="n">ref</span> <span class="c1"># Symbolic Reference or RemoteReference to the changed</span>
5652 <span class="c1"># remote head or FETCH_HEAD</span>
5653 <span class="n">info</span><span class="o">.</span><span class="n">flags</span> <span class="c1"># additional flags to be &amp; with enumeration members,</span>
5654 <span class="c1"># i.e. info.flags &amp; info.REJECTED</span>
5655 <span class="c1"># is 0 if ref is SymbolicReference</span>
5656 <span class="n">info</span><span class="o">.</span><span class="n">note</span> <span class="c1"># additional notes given by git-fetch intended for the user</span>
5657 <span class="n">info</span><span class="o">.</span><span class="n">old_commit</span> <span class="c1"># if info.flags &amp; info.FORCED_UPDATE|info.FAST_FORWARD,</span>
5658 <span class="c1"># field is set to the previous location of ref, otherwise None</span>
5659 <span class="n">info</span><span class="o">.</span><span class="n">remote_ref_path</span> <span class="c1"># The path from which we fetched on the remote. It&#39;s the remote&#39;s version of our info.ref</span>
5660 </pre></div>
5661 </div>
5662 <dl class="attribute">
5663 <dt id="git.remote.FetchInfo.ERROR">
5664 <code class="descname">ERROR</code><em class="property"> = 128</em><a class="headerlink" href="#git.remote.FetchInfo.ERROR" title="Permalink to this definition">¶</a></dt>
5665 <dd></dd></dl>
5666
5667 <dl class="attribute">
5668 <dt id="git.remote.FetchInfo.FAST_FORWARD">
5669 <code class="descname">FAST_FORWARD</code><em class="property"> = 64</em><a class="headerlink" href="#git.remote.FetchInfo.FAST_FORWARD" title="Permalink to this definition">¶</a></dt>
5670 <dd></dd></dl>
5671
5672 <dl class="attribute">
5673 <dt id="git.remote.FetchInfo.FORCED_UPDATE">
5674 <code class="descname">FORCED_UPDATE</code><em class="property"> = 32</em><a class="headerlink" href="#git.remote.FetchInfo.FORCED_UPDATE" title="Permalink to this definition">¶</a></dt>
5675 <dd></dd></dl>
5676
5677 <dl class="attribute">
5678 <dt id="git.remote.FetchInfo.HEAD_UPTODATE">
5679 <code class="descname">HEAD_UPTODATE</code><em class="property"> = 4</em><a class="headerlink" href="#git.remote.FetchInfo.HEAD_UPTODATE" title="Permalink to this definition">¶</a></dt>
5680 <dd></dd></dl>
5681
5682 <dl class="attribute">
5683 <dt id="git.remote.FetchInfo.NEW_HEAD">
5684 <code class="descname">NEW_HEAD</code><em class="property"> = 2</em><a class="headerlink" href="#git.remote.FetchInfo.NEW_HEAD" title="Permalink to this definition">¶</a></dt>
5685 <dd></dd></dl>
5686
5687 <dl class="attribute">
5688 <dt id="git.remote.FetchInfo.NEW_TAG">
5689 <code class="descname">NEW_TAG</code><em class="property"> = 1</em><a class="headerlink" href="#git.remote.FetchInfo.NEW_TAG" title="Permalink to this definition">¶</a></dt>
5690 <dd></dd></dl>
5691
5692 <dl class="attribute">
5693 <dt id="git.remote.FetchInfo.REJECTED">
5694 <code class="descname">REJECTED</code><em class="property"> = 16</em><a class="headerlink" href="#git.remote.FetchInfo.REJECTED" title="Permalink to this definition">¶</a></dt>
5695 <dd></dd></dl>
5696
5697 <dl class="attribute">
5698 <dt id="git.remote.FetchInfo.TAG_UPDATE">
5699 <code class="descname">TAG_UPDATE</code><em class="property"> = 8</em><a class="headerlink" href="#git.remote.FetchInfo.TAG_UPDATE" title="Permalink to this definition">¶</a></dt>
5700 <dd></dd></dl>
5701
5702 <dl class="method">
5703 <dt id="git.remote.FetchInfo.__init__">
5704 <code class="descname">__init__</code><span class="sig-paren">(</span><em>ref</em>, <em>flags</em>, <em>note=''</em>, <em>old_commit=None</em>, <em>remote_ref_path=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.FetchInfo.__init__" title="Permalink to this definition">¶</a></dt>
5705 <dd><p>Initialize a new instance</p>
5706 </dd></dl>
5707
5708 <dl class="attribute">
5709 <dt id="git.remote.FetchInfo.__module__">
5710 <code class="descname">__module__</code><em class="property"> = 'git.remote'</em><a class="headerlink" href="#git.remote.FetchInfo.__module__" title="Permalink to this definition">¶</a></dt>
5711 <dd></dd></dl>
5712
5713 <dl class="attribute">
5714 <dt id="git.remote.FetchInfo.__slots__">
5715 <code class="descname">__slots__</code><em class="property"> = ('ref', 'old_commit', 'flags', 'note', 'remote_ref_path')</em><a class="headerlink" href="#git.remote.FetchInfo.__slots__" title="Permalink to this definition">¶</a></dt>
5716 <dd></dd></dl>
5717
5718 <dl class="method">
5719 <dt id="git.remote.FetchInfo.__str__">
5720 <code class="descname">__str__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.FetchInfo.__str__" title="Permalink to this definition">¶</a></dt>
5721 <dd></dd></dl>
5722
5723 <dl class="attribute">
5724 <dt id="git.remote.FetchInfo.commit">
5725 <code class="descname">commit</code><a class="headerlink" href="#git.remote.FetchInfo.commit" title="Permalink to this definition">¶</a></dt>
5726 <dd><table class="docutils field-list" frame="void" rules="none">
5727 <col class="field-name" />
5728 <col class="field-body" />
5729 <tbody valign="top">
5730 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Commit of our remote ref</td>
5731 </tr>
5732 </tbody>
5733 </table>
5734 </dd></dl>
5735
5736 <dl class="attribute">
5737 <dt id="git.remote.FetchInfo.flags">
5738 <code class="descname">flags</code><a class="headerlink" href="#git.remote.FetchInfo.flags" title="Permalink to this definition">¶</a></dt>
5739 <dd></dd></dl>
5740
5741 <dl class="attribute">
5742 <dt id="git.remote.FetchInfo.name">
5743 <code class="descname">name</code><a class="headerlink" href="#git.remote.FetchInfo.name" title="Permalink to this definition">¶</a></dt>
5744 <dd><table class="docutils field-list" frame="void" rules="none">
5745 <col class="field-name" />
5746 <col class="field-body" />
5747 <tbody valign="top">
5748 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Name of our remote ref</td>
5749 </tr>
5750 </tbody>
5751 </table>
5752 </dd></dl>
5753
5754 <dl class="attribute">
5755 <dt id="git.remote.FetchInfo.note">
5756 <code class="descname">note</code><a class="headerlink" href="#git.remote.FetchInfo.note" title="Permalink to this definition">¶</a></dt>
5757 <dd></dd></dl>
5758
5759 <dl class="attribute">
5760 <dt id="git.remote.FetchInfo.old_commit">
5761 <code class="descname">old_commit</code><a class="headerlink" href="#git.remote.FetchInfo.old_commit" title="Permalink to this definition">¶</a></dt>
5762 <dd></dd></dl>
5763
5764 <dl class="attribute">
5765 <dt id="git.remote.FetchInfo.re_fetch_result">
5766 <code class="descname">re_fetch_result</code><em class="property"> = &lt;_sre.SRE_Pattern object&gt;</em><a class="headerlink" href="#git.remote.FetchInfo.re_fetch_result" title="Permalink to this definition">¶</a></dt>
5767 <dd></dd></dl>
5768
5769 <dl class="attribute">
5770 <dt id="git.remote.FetchInfo.ref">
5771 <code class="descname">ref</code><a class="headerlink" href="#git.remote.FetchInfo.ref" title="Permalink to this definition">¶</a></dt>
5772 <dd></dd></dl>
5773
5774 <dl class="attribute">
5775 <dt id="git.remote.FetchInfo.remote_ref_path">
5776 <code class="descname">remote_ref_path</code><a class="headerlink" href="#git.remote.FetchInfo.remote_ref_path" title="Permalink to this definition">¶</a></dt>
5777 <dd></dd></dl>
5778
5779 <dl class="attribute">
5780 <dt id="git.remote.FetchInfo.x">
5781 <code class="descname">x</code><em class="property"> = 7</em><a class="headerlink" href="#git.remote.FetchInfo.x" title="Permalink to this definition">¶</a></dt>
5782 <dd></dd></dl>
5783
5784 </dd></dl>
5785
5786 <dl class="class">
5787 <dt id="git.remote.Remote">
5788 <em class="property">class </em><code class="descclassname">git.remote.</code><code class="descname">Remote</code><span class="sig-paren">(</span><em>repo</em>, <em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote" title="Permalink to this definition">¶</a></dt>
5789 <dd><p>Provides easy read and write access to a git remote.</p>
5790 <p>Everything not part of this interface is considered an option for the current
5791 remote, allowing constructs like remote.pushurl to query the pushurl.</p>
5792 <p>NOTE: When querying configuration, the configuration accessor will be cached
5793 to speed up subsequent accesses.</p>
5794 <dl class="method">
5795 <dt id="git.remote.Remote.__eq__">
5796 <code class="descname">__eq__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.__eq__" title="Permalink to this definition">¶</a></dt>
5797 <dd></dd></dl>
5798
5799 <dl class="method">
5800 <dt id="git.remote.Remote.__getattr__">
5801 <code class="descname">__getattr__</code><span class="sig-paren">(</span><em>attr</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.__getattr__" title="Permalink to this definition">¶</a></dt>
5802 <dd><p>Allows to call this instance like
5803 remote.special( *args, **kwargs) to call git-remote special self.name</p>
5804 </dd></dl>
5805
5806 <dl class="method">
5807 <dt id="git.remote.Remote.__hash__">
5808 <code class="descname">__hash__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.__hash__" title="Permalink to this definition">¶</a></dt>
5809 <dd></dd></dl>
5810
5811 <dl class="method">
5812 <dt id="git.remote.Remote.__init__">
5813 <code class="descname">__init__</code><span class="sig-paren">(</span><em>repo</em>, <em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.__init__" title="Permalink to this definition">¶</a></dt>
5814 <dd><p>Initialize a remote instance</p>
5815 <table class="docutils field-list" frame="void" rules="none">
5816 <col class="field-name" />
5817 <col class="field-body" />
5818 <tbody valign="top">
5819 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
5820 <li><strong>repo</strong> &#8211; The repository we are a remote of</li>
5821 <li><strong>name</strong> &#8211; the name of the remote, i.e. &#8216;origin&#8217;</li>
5822 </ul>
5823 </td>
5824 </tr>
5825 </tbody>
5826 </table>
5827 </dd></dl>
5828
5829 <dl class="attribute">
5830 <dt id="git.remote.Remote.__module__">
5831 <code class="descname">__module__</code><em class="property"> = 'git.remote'</em><a class="headerlink" href="#git.remote.Remote.__module__" title="Permalink to this definition">¶</a></dt>
5832 <dd></dd></dl>
5833
5834 <dl class="method">
5835 <dt id="git.remote.Remote.__ne__">
5836 <code class="descname">__ne__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.__ne__" title="Permalink to this definition">¶</a></dt>
5837 <dd></dd></dl>
5838
5839 <dl class="method">
5840 <dt id="git.remote.Remote.__repr__">
5841 <code class="descname">__repr__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.__repr__" title="Permalink to this definition">¶</a></dt>
5842 <dd></dd></dl>
5843
5844 <dl class="attribute">
5845 <dt id="git.remote.Remote.__slots__">
5846 <code class="descname">__slots__</code><em class="property"> = ('repo', 'name', '_config_reader')</em><a class="headerlink" href="#git.remote.Remote.__slots__" title="Permalink to this definition">¶</a></dt>
5847 <dd></dd></dl>
5848
5849 <dl class="method">
5850 <dt id="git.remote.Remote.__str__">
5851 <code class="descname">__str__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.__str__" title="Permalink to this definition">¶</a></dt>
5852 <dd></dd></dl>
5853
5854 <dl class="classmethod">
5855 <dt id="git.remote.Remote.add">
5856 <em class="property">classmethod </em><code class="descname">add</code><span class="sig-paren">(</span><em>repo</em>, <em>name</em>, <em>url</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.add" title="Permalink to this definition">¶</a></dt>
5857 <dd><p>Create a new remote to the given repository
5858 :param repo: Repository instance that is to receive the new remote
5859 :param name: Desired name of the remote
5860 :param url: URL which corresponds to the remote&#8217;s name
5861 :param kwargs: Additional arguments to be passed to the git-remote add command
5862 :return: New Remote instance
5863 :raise GitCommandError: in case an origin with that name already exists</p>
5864 </dd></dl>
5865
5866 <dl class="method">
5867 <dt id="git.remote.Remote.add_url">
5868 <code class="descname">add_url</code><span class="sig-paren">(</span><em>url</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.add_url" title="Permalink to this definition">¶</a></dt>
5869 <dd><p>Adds a new url on current remote (special case of git remote set_url)</p>
5870 <p>This command adds new URLs to a given remote, making it possible to have
5871 multiple URLs for a single remote.</p>
5872 <table class="docutils field-list" frame="void" rules="none">
5873 <col class="field-name" />
5874 <col class="field-body" />
5875 <tbody valign="top">
5876 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>url</strong> &#8211; string being the URL to add as an extra remote URL</td>
5877 </tr>
5878 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">self</td>
5879 </tr>
5880 </tbody>
5881 </table>
5882 </dd></dl>
5883
5884 <dl class="attribute">
5885 <dt id="git.remote.Remote.config_reader">
5886 <code class="descname">config_reader</code><a class="headerlink" href="#git.remote.Remote.config_reader" title="Permalink to this definition">¶</a></dt>
5887 <dd><table class="docutils field-list" frame="void" rules="none">
5888 <col class="field-name" />
5889 <col class="field-body" />
5890 <tbody valign="top">
5891 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">GitConfigParser compatible object able to read options for only our remote.
5892 Hence you may simple type config.get(&#8220;pushurl&#8221;) to obtain the information</td>
5893 </tr>
5894 </tbody>
5895 </table>
5896 </dd></dl>
5897
5898 <dl class="attribute">
5899 <dt id="git.remote.Remote.config_writer">
5900 <code class="descname">config_writer</code><a class="headerlink" href="#git.remote.Remote.config_writer" title="Permalink to this definition">¶</a></dt>
5901 <dd><table class="docutils field-list" frame="void" rules="none">
5902 <col class="field-name" />
5903 <col class="field-body" />
5904 <tbody valign="top">
5905 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">GitConfigParser compatible object able to write options for this remote.</p>
5906 </td>
5907 </tr>
5908 <tr class="field-even field"><th class="field-name">Note:</th><td class="field-body"><p class="first">You can only own one writer at a time - delete it to release the
5909 configuration file and make it useable by others.</p>
5910 <p class="last">To assure consistent results, you should only query options through the
5911 writer. Once you are done writing, you are free to use the config reader
5912 once again.</p>
5913 </td>
5914 </tr>
5915 </tbody>
5916 </table>
5917 </dd></dl>
5918
5919 <dl class="classmethod">
5920 <dt id="git.remote.Remote.create">
5921 <em class="property">classmethod </em><code class="descname">create</code><span class="sig-paren">(</span><em>repo</em>, <em>name</em>, <em>url</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.create" title="Permalink to this definition">¶</a></dt>
5922 <dd><p>Create a new remote to the given repository
5923 :param repo: Repository instance that is to receive the new remote
5924 :param name: Desired name of the remote
5925 :param url: URL which corresponds to the remote&#8217;s name
5926 :param kwargs: Additional arguments to be passed to the git-remote add command
5927 :return: New Remote instance
5928 :raise GitCommandError: in case an origin with that name already exists</p>
5929 </dd></dl>
5930
5931 <dl class="method">
5932 <dt id="git.remote.Remote.delete_url">
5933 <code class="descname">delete_url</code><span class="sig-paren">(</span><em>url</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.delete_url" title="Permalink to this definition">¶</a></dt>
5934 <dd><p>Deletes a new url on current remote (special case of git remote set_url)</p>
5935 <p>This command deletes new URLs to a given remote, making it possible to have
5936 multiple URLs for a single remote.</p>
5937 <table class="docutils field-list" frame="void" rules="none">
5938 <col class="field-name" />
5939 <col class="field-body" />
5940 <tbody valign="top">
5941 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>url</strong> &#8211; string being the URL to delete from the remote</td>
5942 </tr>
5943 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">self</td>
5944 </tr>
5945 </tbody>
5946 </table>
5947 </dd></dl>
5948
5949 <dl class="method">
5950 <dt id="git.remote.Remote.exists">
5951 <code class="descname">exists</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.exists" title="Permalink to this definition">¶</a></dt>
5952 <dd><table class="docutils field-list" frame="void" rules="none">
5953 <col class="field-name" />
5954 <col class="field-body" />
5955 <tbody valign="top">
5956 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True if this is a valid, existing remote.
5957 Valid remotes have an entry in the repository&#8217;s configuration</td>
5958 </tr>
5959 </tbody>
5960 </table>
5961 </dd></dl>
5962
5963 <dl class="method">
5964 <dt id="git.remote.Remote.fetch">
5965 <code class="descname">fetch</code><span class="sig-paren">(</span><em>refspec=None</em>, <em>progress=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.fetch" title="Permalink to this definition">¶</a></dt>
5966 <dd><p>Fetch the latest changes for this remote</p>
5967 <table class="docutils field-list" frame="void" rules="none">
5968 <col class="field-name" />
5969 <col class="field-body" />
5970 <tbody valign="top">
5971 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
5972 <li><strong>refspec</strong> &#8211; <p>A &#8220;refspec&#8221; is used by fetch and push to describe the mapping
5973 between remote ref and local ref. They are combined with a colon in
5974 the format &lt;src&gt;:&lt;dst&gt;, preceded by an optional plus sign, +.
5975 For example: git fetch $URL refs/heads/master:refs/heads/origin means
5976 &#8220;grab the master branch head from the $URL and store it as my origin
5977 branch head&#8221;. And git push $URL refs/heads/master:refs/heads/to-upstream
5978 means &#8220;publish my master branch head as to-upstream branch at $URL&#8221;.
5979 See also git-push(1).</p>
5980 <p>Taken from the git manual</p>
5981 <p>Fetch supports multiple refspecs (as the
5982 underlying git-fetch does) - supplying a list rather than a string
5983 for &#8216;refspec&#8217; will make use of this facility.</p>
5984 </li>
5985 <li><strong>progress</strong> &#8211; See &#8216;push&#8217; method</li>
5986 <li><strong>kwargs</strong> &#8211; Additional arguments to be passed to git-fetch</li>
5987 </ul>
5988 </td>
5989 </tr>
5990 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">IterableList(FetchInfo, ...) list of FetchInfo instances providing detailed
5991 information about the fetch results</p>
5992 </td>
5993 </tr>
5994 <tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body"><p class="first last">As fetch does not provide progress information to non-ttys, we cannot make
5995 it available here unfortunately as in the &#8216;push&#8217; method.</p>
5996 </td>
5997 </tr>
5998 </tbody>
5999 </table>
6000 </dd></dl>
6001
6002 <dl class="classmethod">
6003 <dt id="git.remote.Remote.iter_items">
6004 <em class="property">classmethod </em><code class="descname">iter_items</code><span class="sig-paren">(</span><em>repo</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.iter_items" title="Permalink to this definition">¶</a></dt>
6005 <dd><table class="docutils field-list" frame="void" rules="none">
6006 <col class="field-name" />
6007 <col class="field-body" />
6008 <tbody valign="top">
6009 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Iterator yielding Remote objects of the given repository</td>
6010 </tr>
6011 </tbody>
6012 </table>
6013 </dd></dl>
6014
6015 <dl class="attribute">
6016 <dt id="git.remote.Remote.name">
6017 <code class="descname">name</code><a class="headerlink" href="#git.remote.Remote.name" title="Permalink to this definition">¶</a></dt>
6018 <dd></dd></dl>
6019
6020 <dl class="method">
6021 <dt id="git.remote.Remote.pull">
6022 <code class="descname">pull</code><span class="sig-paren">(</span><em>refspec=None</em>, <em>progress=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.pull" title="Permalink to this definition">¶</a></dt>
6023 <dd><p>Pull changes from the given branch, being the same as a fetch followed
6024 by a merge of branch with your local branch.</p>
6025 <table class="docutils field-list" frame="void" rules="none">
6026 <col class="field-name" />
6027 <col class="field-body" />
6028 <tbody valign="top">
6029 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
6030 <li><strong>refspec</strong> &#8211; see &#8216;fetch&#8217; method</li>
6031 <li><strong>progress</strong> &#8211; see &#8216;push&#8217; method</li>
6032 <li><strong>kwargs</strong> &#8211; Additional arguments to be passed to git-pull</li>
6033 </ul>
6034 </td>
6035 </tr>
6036 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Please see &#8216;fetch&#8217; method</p>
6037 </td>
6038 </tr>
6039 </tbody>
6040 </table>
6041 </dd></dl>
6042
6043 <dl class="method">
6044 <dt id="git.remote.Remote.push">
6045 <code class="descname">push</code><span class="sig-paren">(</span><em>refspec=None</em>, <em>progress=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.push" title="Permalink to this definition">¶</a></dt>
6046 <dd><p>Push changes from source branch in refspec to target branch in refspec.</p>
6047 <table class="docutils field-list" frame="void" rules="none">
6048 <col class="field-name" />
6049 <col class="field-body" />
6050 <tbody valign="top">
6051 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
6052 <li><strong>refspec</strong> &#8211; see &#8216;fetch&#8217; method</li>
6053 <li><strong>progress</strong> &#8211; <p>Can take one of many value types:</p>
6054 <ul>
6055 <li>None to discard progress information</li>
6056 <li>A function (callable) that is called with the progress infomation.<p>Signature: <code class="docutils literal"><span class="pre">progress(op_code,</span> <span class="pre">cur_count,</span> <span class="pre">max_count=None,</span> <span class="pre">message='')</span></code>.</p>
6057 </li>
6058 </ul>
6059 <blockquote>
6060 <div><dl class="docutils">
6061 <dt><a class="reference external" href="http://goo.gl/NPa7st">Click here</a> for a description of all arguments</dt>
6062 <dd>given to the function.</dd>
6063 </dl>
6064 </div></blockquote>
6065 <ul>
6066 <li>An instance of a class derived from <code class="docutils literal"><span class="pre">git.RemoteProgress</span></code> that
6067 overrides the <code class="docutils literal"><span class="pre">update()</span></code> function.</li>
6068 </ul>
6069 </li>
6070 <li><strong>kwargs</strong> &#8211; Additional arguments to be passed to git-push</li>
6071 </ul>
6072 </td>
6073 </tr>
6074 <tr class="field-even field"><th class="field-name">Note:</th><td class="field-body"><p class="first">No further progress information is returned after push returns.</p>
6075 </td>
6076 </tr>
6077 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">IterableList(PushInfo, ...) iterable list of PushInfo instances, each
6078 one informing about an individual head which had been updated on the remote
6079 side.
6080 If the push contains rejected heads, these will have the PushInfo.ERROR bit set
6081 in their flags.
6082 If the operation fails completely, the length of the returned IterableList will
6083 be null.</p>
6084 </td>
6085 </tr>
6086 </tbody>
6087 </table>
6088 </dd></dl>
6089
6090 <dl class="attribute">
6091 <dt id="git.remote.Remote.refs">
6092 <code class="descname">refs</code><a class="headerlink" href="#git.remote.Remote.refs" title="Permalink to this definition">¶</a></dt>
6093 <dd><table class="docutils field-list" frame="void" rules="none">
6094 <col class="field-name" />
6095 <col class="field-body" />
6096 <tbody valign="top">
6097 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">IterableList of RemoteReference objects. It is prefixed, allowing
6098 you to omit the remote path portion, i.e.::
6099 remote.refs.master # yields RemoteReference(&#8216;/refs/remotes/origin/master&#8217;)</td>
6100 </tr>
6101 </tbody>
6102 </table>
6103 </dd></dl>
6104
6105 <dl class="classmethod">
6106 <dt id="git.remote.Remote.remove">
6107 <em class="property">classmethod </em><code class="descname">remove</code><span class="sig-paren">(</span><em>repo</em>, <em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.remove" title="Permalink to this definition">¶</a></dt>
6108 <dd><p>Remove the remote with the given name
6109 :return: the passed remote name to remove</p>
6110 </dd></dl>
6111
6112 <dl class="method">
6113 <dt id="git.remote.Remote.rename">
6114 <code class="descname">rename</code><span class="sig-paren">(</span><em>new_name</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.rename" title="Permalink to this definition">¶</a></dt>
6115 <dd><p>Rename self to the given new_name
6116 :return: self</p>
6117 </dd></dl>
6118
6119 <dl class="attribute">
6120 <dt id="git.remote.Remote.repo">
6121 <code class="descname">repo</code><a class="headerlink" href="#git.remote.Remote.repo" title="Permalink to this definition">¶</a></dt>
6122 <dd></dd></dl>
6123
6124 <dl class="classmethod">
6125 <dt id="git.remote.Remote.rm">
6126 <em class="property">classmethod </em><code class="descname">rm</code><span class="sig-paren">(</span><em>repo</em>, <em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.rm" title="Permalink to this definition">¶</a></dt>
6127 <dd><p>Remove the remote with the given name
6128 :return: the passed remote name to remove</p>
6129 </dd></dl>
6130
6131 <dl class="method">
6132 <dt id="git.remote.Remote.set_url">
6133 <code class="descname">set_url</code><span class="sig-paren">(</span><em>new_url</em>, <em>old_url=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.set_url" title="Permalink to this definition">¶</a></dt>
6134 <dd><p>Configure URLs on current remote (cf command git remote set_url)</p>
6135 <p>This command manages URLs on the remote.</p>
6136 <table class="docutils field-list" frame="void" rules="none">
6137 <col class="field-name" />
6138 <col class="field-body" />
6139 <tbody valign="top">
6140 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
6141 <li><strong>new_url</strong> &#8211; string being the URL to add as an extra remote URL</li>
6142 <li><strong>old_url</strong> &#8211; when set, replaces this URL with new_url for the remote</li>
6143 </ul>
6144 </td>
6145 </tr>
6146 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">self</p>
6147 </td>
6148 </tr>
6149 </tbody>
6150 </table>
6151 </dd></dl>
6152
6153 <dl class="attribute">
6154 <dt id="git.remote.Remote.stale_refs">
6155 <code class="descname">stale_refs</code><a class="headerlink" href="#git.remote.Remote.stale_refs" title="Permalink to this definition">¶</a></dt>
6156 <dd><table class="docutils field-list" frame="void" rules="none">
6157 <col class="field-name" />
6158 <col class="field-body" />
6159 <tbody valign="top">
6160 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">IterableList RemoteReference objects that do not have a corresponding
6161 head in the remote reference anymore as they have been deleted on the
6162 remote side, but are still available locally.<p>The IterableList is prefixed, hence the &#8216;origin&#8217; must be omitted. See
6163 &#8216;refs&#8217; property for an example.</p>
6164 <p>To make things more complicated, it can be possble for the list to include
6165 other kinds of references, for example, tag references, if these are stale
6166 as well. This is a fix for the issue described here:
6167 <a class="reference external" href="https://github.com/gitpython-developers/GitPython/issues/260">https://github.com/gitpython-developers/GitPython/issues/260</a></p>
6168 </td>
6169 </tr>
6170 </tbody>
6171 </table>
6172 </dd></dl>
6173
6174 <dl class="method">
6175 <dt id="git.remote.Remote.update">
6176 <code class="descname">update</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.remote.Remote.update" title="Permalink to this definition">¶</a></dt>
6177 <dd><p>Fetch all changes for this remote, including new branches which will
6178 be forced in ( in case your local remote branch is not part the new remote branches
6179 ancestry anymore ).</p>
6180 <table class="docutils field-list" frame="void" rules="none">
6181 <col class="field-name" />
6182 <col class="field-body" />
6183 <tbody valign="top">
6184 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>kwargs</strong> &#8211; Additional arguments passed to git-remote update</td>
6185 </tr>
6186 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">self</td>
6187 </tr>
6188 </tbody>
6189 </table>
6190 </dd></dl>
6191
6192 <dl class="attribute">
6193 <dt id="git.remote.Remote.urls">
6194 <code class="descname">urls</code><a class="headerlink" href="#git.remote.Remote.urls" title="Permalink to this definition">¶</a></dt>
6195 <dd><table class="docutils field-list" frame="void" rules="none">
6196 <col class="field-name" />
6197 <col class="field-body" />
6198 <tbody valign="top">
6199 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Iterator yielding all configured URL targets on a remote</td>
6200 </tr>
6201 </tbody>
6202 </table>
6203 <p>as strings</p>
6204 </dd></dl>
6205
6206 </dd></dl>
6207
6208 </div>
6209 <div class="section" id="module-git.repo.base">
6210 <span id="repo-base"></span><h2>Repo.Base<a class="headerlink" href="#module-git.repo.base" title="Permalink to this headline">¶</a></h2>
6211 <dl class="class">
6212 <dt id="git.repo.base.Repo">
6213 <em class="property">class </em><code class="descclassname">git.repo.base.</code><code class="descname">Repo</code><span class="sig-paren">(</span><em>path=None</em>, <em>odbt=&lt;class 'git.db.GitCmdObjectDB'&gt;</em>, <em>search_parent_directories=False</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo" title="Permalink to this definition">¶</a></dt>
6214 <dd><p>Represents a git repository and allows you to query references,
6215 gather commit information, generate diffs, create and clone repositories query
6216 the log.</p>
6217 <p>The following attributes are worth using:</p>
6218 <p>&#8216;working_dir&#8217; is the working directory of the git command, which is the working tree
6219 directory if available or the .git directory in case of bare repositories</p>
6220 <p>&#8216;working_tree_dir&#8217; is the working tree directory, but will raise AssertionError
6221 if we are a bare repository.</p>
6222 <p>&#8216;git_dir&#8217; is the .git repository directory, which is always set.</p>
6223 <dl class="attribute">
6224 <dt id="git.repo.base.Repo.DAEMON_EXPORT_FILE">
6225 <code class="descname">DAEMON_EXPORT_FILE</code><em class="property"> = 'git-daemon-export-ok'</em><a class="headerlink" href="#git.repo.base.Repo.DAEMON_EXPORT_FILE" title="Permalink to this definition">¶</a></dt>
6226 <dd></dd></dl>
6227
6228 <dl class="attribute">
6229 <dt id="git.repo.base.Repo.GitCommandWrapperType">
6230 <code class="descname">GitCommandWrapperType</code><a class="headerlink" href="#git.repo.base.Repo.GitCommandWrapperType" title="Permalink to this definition">¶</a></dt>
6231 <dd><p>alias of <code class="xref py py-class docutils literal"><span class="pre">Git</span></code></p>
6232 </dd></dl>
6233
6234 <dl class="method">
6235 <dt id="git.repo.base.Repo.__del__">
6236 <code class="descname">__del__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.__del__" title="Permalink to this definition">¶</a></dt>
6237 <dd></dd></dl>
6238
6239 <dl class="attribute">
6240 <dt id="git.repo.base.Repo.__dict__">
6241 <code class="descname">__dict__</code><em class="property"> = dict_proxy({'create_submodule': &lt;function create_submodule at 0x10f6a8de8&gt;, 'config_reader': &lt;function config_reader at 0x10f6a5410&gt;, 're_author_committer_start': &lt;_sre.SRE_Pattern object at 0x10fde0b70&gt;, 're_hexsha_shortened': &lt;_sre.SRE_Pattern object at 0x10fe7a0f8&gt;, 'is_dirty': &lt;function is_dirty at 0x10f6a59b0&gt;, 'references': &lt;property object at 0x10fd81998&gt;, 'merge_base': &lt;function merge_base at 0x10f6a56e0&gt;, '_clone': &lt;classmethod object at 0x10ff4eef8&gt;, '__weakref__': &lt;attribute '__weakref__' of 'Repo' objects&gt;, 'submodule': &lt;function submodule at 0x10f6a8d70&gt;, 'heads': &lt;property object at 0x10fd81940&gt;, 'iter_commits': &lt;function iter_commits at 0x10f6a5668&gt;, '__eq__': &lt;function __eq__ at 0x10f6a86e0&gt;, 'create_tag': &lt;function create_tag at 0x10f6a51b8&gt;, 'init': &lt;classmethod object at 0x10ff4eec0&gt;, 'active_branch': &lt;property object at 0x10fd81cb0&gt;, '__doc__': &quot;Represents a git repository and allows you to query references,\n gather commit information, generate diffs, create and clone repositories query\n the log.\n\n The following attributes are worth using:\n\n 'working_dir' is the working directory of the git command, which is the working tree\n directory if available or the .git directory in case of bare repositories\n\n 'working_tree_dir' is the working tree directory, but will raise AssertionError\n if we are a bare repository.\n\n 'git_dir' is the .git repository directory, which is always set.&quot;, 'head': &lt;property object at 0x10fd81a48&gt;, 'submodule_update': &lt;function submodule_update at 0x10f6a8ed8&gt;, '__del__': &lt;function __del__ at 0x10f6a8668&gt;, 'untracked_files': &lt;property object at 0x10fd81c58&gt;, 'create_remote': &lt;function create_remote at 0x10f6a52a8&gt;, 'remotes': &lt;property object at 0x10fd81aa0&gt;, 'remote': &lt;function remote at 0x10f6a8c80&gt;, '_get_config_path': &lt;function _get_config_path at 0x10f6a5398&gt;, 'GitCommandWrapperType': &lt;class 'git.cmd.Git'&gt;, 'DAEMON_EXPORT_FILE': 'git-daemon-export-ok', 'delete_tag': &lt;function delete_tag at 0x10f6a5230&gt;, 'blame_incremental': &lt;function blame_incremental at 0x10f6a5b90&gt;, 'tree': &lt;function tree at 0x10f6a55f0&gt;, 'working_tree_dir': &lt;property object at 0x10fd81890&gt;, '__hash__': &lt;function __hash__ at 0x10f6a87d0&gt;, 'rev_parse': &lt;function rev_parse at 0x10f6a8140&gt;, '__module__': 'git.repo.base', 're_hexsha_only': &lt;_sre.SRE_Pattern object at 0x10fdec990&gt;, 'submodules': &lt;property object at 0x10fd81af8&gt;, 'refs': &lt;property object at 0x10fd81998&gt;, 'iter_submodules': &lt;function iter_submodules at 0x10f6a8e60&gt;, '__dict__': &lt;attribute '__dict__' of 'Repo' objects&gt;, 'tag': &lt;function tag at 0x10f6a5050&gt;, 'bare': &lt;property object at 0x10fd818e8&gt;, 'daemon_export': &lt;property object at 0x10fd81ba8&gt;, 'archive': &lt;function archive at 0x10f6a5e60&gt;, '__init__': &lt;function __init__ at 0x10f6a85f0&gt;, 'alternates': &lt;property object at 0x10fd81c00&gt;, 'index': &lt;property object at 0x10fd819f0&gt;, 're_whitespace': &lt;_sre.SRE_Pattern object at 0x10fc01030&gt;, '_set_alternates': &lt;function _set_alternates at 0x10f6a5938&gt;, 'delete_head': &lt;function delete_head at 0x10f6a5140&gt;, 'has_separate_working_tree': &lt;function has_separate_working_tree at 0x10f6a5ed8&gt;, '_get_untracked_files': &lt;function _get_untracked_files at 0x10f6a5aa0&gt;, '__ne__': &lt;function __ne__ at 0x10f6a8758&gt;, 're_tab_full_line': &lt;_sre.SRE_Pattern object at 0x10fe6e2f0&gt;, 'description': &lt;property object at 0x10fd81838&gt;, 'tags': &lt;property object at 0x10fd81b50&gt;, 'clone': &lt;function clone at 0x10f6a5d70&gt;, 'create_head': &lt;function create_head at 0x10f6a50c8&gt;, 'blame': &lt;function blame at 0x10f6a5c08&gt;, 'delete_remote': &lt;function delete_remote at 0x10f6a5320&gt;, 'iter_trees': &lt;function iter_trees at 0x10f6a5578&gt;, 'config_writer': &lt;function config_writer at 0x10f6a5488&gt;, 'branches': &lt;property object at 0x10fd81940&gt;, 'is_ancestor': &lt;function is_ancestor at 0x10f6a5758&gt;, '__repr__': &lt;function __repr__ at 0x10f6a5f50&gt;, 'commit': &lt;function commit at 0x10f6a5500&gt;, '_get_alternates': &lt;function _get_alternates at 0x10f6a58c0&gt;, 'clone_from': &lt;classmethod object at 0x10ff4ef30&gt;, 'config_level': ('system', 'user', 'global', 'repository')})</em><a class="headerlink" href="#git.repo.base.Repo.__dict__" title="Permalink to this definition">¶</a></dt>
6242 <dd></dd></dl>
6243
6244 <dl class="method">
6245 <dt id="git.repo.base.Repo.__eq__">
6246 <code class="descname">__eq__</code><span class="sig-paren">(</span><em>rhs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.__eq__" title="Permalink to this definition">¶</a></dt>
6247 <dd></dd></dl>
6248
6249 <dl class="method">
6250 <dt id="git.repo.base.Repo.__hash__">
6251 <code class="descname">__hash__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.__hash__" title="Permalink to this definition">¶</a></dt>
6252 <dd></dd></dl>
6253
6254 <dl class="method">
6255 <dt id="git.repo.base.Repo.__init__">
6256 <code class="descname">__init__</code><span class="sig-paren">(</span><em>path=None</em>, <em>odbt=&lt;class 'git.db.GitCmdObjectDB'&gt;</em>, <em>search_parent_directories=False</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.__init__" title="Permalink to this definition">¶</a></dt>
6257 <dd><p>Create a new Repo instance</p>
6258 <table class="docutils field-list" frame="void" rules="none">
6259 <col class="field-name" />
6260 <col class="field-body" />
6261 <tbody valign="top">
6262 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
6263 <li><strong>path</strong> &#8211; <p>the path to either the root git directory or the bare git repo:</p>
6264 <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">repo</span> <span class="o">=</span> <span class="n">Repo</span><span class="p">(</span><span class="s2">&quot;/Users/mtrier/Development/git-python&quot;</span><span class="p">)</span>
6265 <span class="n">repo</span> <span class="o">=</span> <span class="n">Repo</span><span class="p">(</span><span class="s2">&quot;/Users/mtrier/Development/git-python.git&quot;</span><span class="p">)</span>
6266 <span class="n">repo</span> <span class="o">=</span> <span class="n">Repo</span><span class="p">(</span><span class="s2">&quot;~/Development/git-python.git&quot;</span><span class="p">)</span>
6267 <span class="n">repo</span> <span class="o">=</span> <span class="n">Repo</span><span class="p">(</span><span class="s2">&quot;$REPOSITORIES/Development/git-python.git&quot;</span><span class="p">)</span>
6268 </pre></div>
6269 </div>
6270 </li>
6271 <li><strong>odbt</strong> &#8211; Object DataBase type - a type which is constructed by providing
6272 the directory containing the database objects, i.e. .git/objects. It will
6273 be used to access all object data</li>
6274 <li><strong>search_parent_directories</strong> &#8211; <p>if True, all parent directories will be searched for a valid repo as well.</p>
6275 <p>Please note that this was the default behaviour in older versions of GitPython,
6276 which is considered a bug though.</p>
6277 </li>
6278 </ul>
6279 </td>
6280 </tr>
6281 <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first simple">
6282 <li><strong>InvalidGitRepositoryError</strong> &#8211; </li>
6283 <li><strong>NoSuchPathError</strong> &#8211; </li>
6284 </ul>
6285 </td>
6286 </tr>
6287 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">git.Repo</p>
6288 </td>
6289 </tr>
6290 </tbody>
6291 </table>
6292 </dd></dl>
6293
6294 <dl class="attribute">
6295 <dt id="git.repo.base.Repo.__module__">
6296 <code class="descname">__module__</code><em class="property"> = 'git.repo.base'</em><a class="headerlink" href="#git.repo.base.Repo.__module__" title="Permalink to this definition">¶</a></dt>
6297 <dd></dd></dl>
6298
6299 <dl class="method">
6300 <dt id="git.repo.base.Repo.__ne__">
6301 <code class="descname">__ne__</code><span class="sig-paren">(</span><em>rhs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.__ne__" title="Permalink to this definition">¶</a></dt>
6302 <dd></dd></dl>
6303
6304 <dl class="method">
6305 <dt id="git.repo.base.Repo.__repr__">
6306 <code class="descname">__repr__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.__repr__" title="Permalink to this definition">¶</a></dt>
6307 <dd></dd></dl>
6308
6309 <dl class="attribute">
6310 <dt id="git.repo.base.Repo.__weakref__">
6311 <code class="descname">__weakref__</code><a class="headerlink" href="#git.repo.base.Repo.__weakref__" title="Permalink to this definition">¶</a></dt>
6312 <dd><p>list of weak references to the object (if defined)</p>
6313 </dd></dl>
6314
6315 <dl class="attribute">
6316 <dt id="git.repo.base.Repo.active_branch">
6317 <code class="descname">active_branch</code><a class="headerlink" href="#git.repo.base.Repo.active_branch" title="Permalink to this definition">¶</a></dt>
6318 <dd><p>The name of the currently active branch.</p>
6319 <table class="docutils field-list" frame="void" rules="none">
6320 <col class="field-name" />
6321 <col class="field-body" />
6322 <tbody valign="top">
6323 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Head to the active branch</td>
6324 </tr>
6325 </tbody>
6326 </table>
6327 </dd></dl>
6328
6329 <dl class="attribute">
6330 <dt id="git.repo.base.Repo.alternates">
6331 <code class="descname">alternates</code><a class="headerlink" href="#git.repo.base.Repo.alternates" title="Permalink to this definition">¶</a></dt>
6332 <dd><p>Retrieve a list of alternates paths or set a list paths to be used as alternates</p>
6333 </dd></dl>
6334
6335 <dl class="method">
6336 <dt id="git.repo.base.Repo.archive">
6337 <code class="descname">archive</code><span class="sig-paren">(</span><em>ostream</em>, <em>treeish=None</em>, <em>prefix=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.archive" title="Permalink to this definition">¶</a></dt>
6338 <dd><p>Archive the tree at the given revision.</p>
6339 <table class="docutils field-list" frame="void" rules="none">
6340 <col class="field-name" />
6341 <col class="field-body" />
6342 <tbody valign="top">
6343 <tr class="field-odd field"><th class="field-name">Parm ostream:</th><td class="field-body"><p class="first">file compatible stream object to which the archive will be written as bytes</p>
6344 </td>
6345 </tr>
6346 <tr class="field-even field"><th class="field-name">Parm treeish:</th><td class="field-body"><p class="first">is the treeish name/id, defaults to active branch</p>
6347 </td>
6348 </tr>
6349 <tr class="field-odd field"><th class="field-name">Parm prefix:</th><td class="field-body"><p class="first">is the optional prefix to prepend to each filename in the archive</p>
6350 </td>
6351 </tr>
6352 <tr class="field-even field"><th class="field-name">Parm kwargs:</th><td class="field-body"><p class="first">Additional arguments passed to git-archive</p>
6353 <ul class="simple">
6354 <li>Use the &#8216;format&#8217; argument to define the kind of format. Use
6355 specialized ostreams to write any format supported by python.</li>
6356 <li>You may specify the special <strong>path</strong> keyword, which may either be a repository-relative
6357 path to a directory or file to place into the archive, or a list or tuple of multipe paths.</li>
6358 </ul>
6359 </td>
6360 </tr>
6361 <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first"><strong>GitCommandError</strong> &#8211; in case something went wrong</p>
6362 </td>
6363 </tr>
6364 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">self</p>
6365 </td>
6366 </tr>
6367 </tbody>
6368 </table>
6369 </dd></dl>
6370
6371 <dl class="attribute">
6372 <dt id="git.repo.base.Repo.bare">
6373 <code class="descname">bare</code><a class="headerlink" href="#git.repo.base.Repo.bare" title="Permalink to this definition">¶</a></dt>
6374 <dd><table class="docutils field-list" frame="void" rules="none">
6375 <col class="field-name" />
6376 <col class="field-body" />
6377 <tbody valign="top">
6378 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True if the repository is bare</td>
6379 </tr>
6380 </tbody>
6381 </table>
6382 </dd></dl>
6383
6384 <dl class="method">
6385 <dt id="git.repo.base.Repo.blame">
6386 <code class="descname">blame</code><span class="sig-paren">(</span><em>rev</em>, <em>file</em>, <em>incremental=False</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.blame" title="Permalink to this definition">¶</a></dt>
6387 <dd><p>The blame information for the given file at the given revision.</p>
6388 <table class="docutils field-list" frame="void" rules="none">
6389 <col class="field-name" />
6390 <col class="field-body" />
6391 <tbody valign="top">
6392 <tr class="field-odd field"><th class="field-name">Parm rev:</th><td class="field-body">revision specifier, see git-rev-parse for viable options.</td>
6393 </tr>
6394 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">list: [git.Commit, list: [&lt;line&gt;]]
6395 A list of tuples associating a Commit object with a list of lines that
6396 changed within the given commit. The Commit objects will be given in order
6397 of appearance.</td>
6398 </tr>
6399 </tbody>
6400 </table>
6401 </dd></dl>
6402
6403 <dl class="method">
6404 <dt id="git.repo.base.Repo.blame_incremental">
6405 <code class="descname">blame_incremental</code><span class="sig-paren">(</span><em>rev</em>, <em>file</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.blame_incremental" title="Permalink to this definition">¶</a></dt>
6406 <dd><p>Iterator for blame information for the given file at the given revision.</p>
6407 <p>Unlike .blame(), this does not return the actual file&#8217;s contents, only
6408 a stream of BlameEntry tuples.</p>
6409 <table class="docutils field-list" frame="void" rules="none">
6410 <col class="field-name" />
6411 <col class="field-body" />
6412 <tbody valign="top">
6413 <tr class="field-odd field"><th class="field-name">Parm rev:</th><td class="field-body">revision specifier, see git-rev-parse for viable options.</td>
6414 </tr>
6415 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">lazy iterator of BlameEntry tuples, where the commit
6416 indicates the commit to blame for the line, and range
6417 indicates a span of line numbers in the resulting file.</td>
6418 </tr>
6419 </tbody>
6420 </table>
6421 <p>If you combine all line number ranges outputted by this command, you
6422 should get a continuous range spanning all line numbers in the file.</p>
6423 </dd></dl>
6424
6425 <dl class="attribute">
6426 <dt id="git.repo.base.Repo.branches">
6427 <code class="descname">branches</code><a class="headerlink" href="#git.repo.base.Repo.branches" title="Permalink to this definition">¶</a></dt>
6428 <dd><p>A list of <code class="docutils literal"><span class="pre">Head</span></code> objects representing the branch heads in
6429 this repo</p>
6430 <table class="docutils field-list" frame="void" rules="none">
6431 <col class="field-name" />
6432 <col class="field-body" />
6433 <tbody valign="top">
6434 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><code class="docutils literal"><span class="pre">git.IterableList(Head,</span> <span class="pre">...)</span></code></td>
6435 </tr>
6436 </tbody>
6437 </table>
6438 </dd></dl>
6439
6440 <dl class="method">
6441 <dt id="git.repo.base.Repo.clone">
6442 <code class="descname">clone</code><span class="sig-paren">(</span><em>path</em>, <em>progress=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.clone" title="Permalink to this definition">¶</a></dt>
6443 <dd><p>Create a clone from this repository.</p>
6444 <table class="docutils field-list" frame="void" rules="none">
6445 <col class="field-name" />
6446 <col class="field-body" />
6447 <tbody valign="top">
6448 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
6449 <li><strong>path</strong> &#8211; is the full path of the new repo (traditionally ends with ./&lt;name&gt;.git).</li>
6450 <li><strong>progress</strong> &#8211; See &#8216;git.remote.Remote.push&#8217;.</li>
6451 <li><strong>kwargs</strong> &#8211; <ul>
6452 <li>odbt = ObjectDatabase Type, allowing to determine the object database
6453 implementation used by the returned Repo instance</li>
6454 <li>All remaining keyword arguments are given to the git-clone command</li>
6455 </ul>
6456 </li>
6457 </ul>
6458 </td>
6459 </tr>
6460 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><code class="docutils literal"><span class="pre">git.Repo</span></code> (the newly cloned repo)</p>
6461 </td>
6462 </tr>
6463 </tbody>
6464 </table>
6465 </dd></dl>
6466
6467 <dl class="classmethod">
6468 <dt id="git.repo.base.Repo.clone_from">
6469 <em class="property">classmethod </em><code class="descname">clone_from</code><span class="sig-paren">(</span><em>url</em>, <em>to_path</em>, <em>progress=None</em>, <em>env=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.clone_from" title="Permalink to this definition">¶</a></dt>
6470 <dd><p>Create a clone from the given URL</p>
6471 <table class="docutils field-list" frame="void" rules="none">
6472 <col class="field-name" />
6473 <col class="field-body" />
6474 <tbody valign="top">
6475 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
6476 <li><strong>url</strong> &#8211; valid git url, see <a class="reference external" href="http://www.kernel.org/pub/software/scm/git/docs/git-clone.html#URLS">http://www.kernel.org/pub/software/scm/git/docs/git-clone.html#URLS</a></li>
6477 <li><strong>to_path</strong> &#8211; Path to which the repository should be cloned to</li>
6478 <li><strong>progress</strong> &#8211; See &#8216;git.remote.Remote.push&#8217;.</li>
6479 <li><strong>env</strong> &#8211; Optional dictionary containing the desired environment variables.</li>
6480 <li><strong>kwargs</strong> &#8211; see the <code class="docutils literal"><span class="pre">clone</span></code> method</li>
6481 </ul>
6482 </td>
6483 </tr>
6484 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Repo instance pointing to the cloned directory</p>
6485 </td>
6486 </tr>
6487 </tbody>
6488 </table>
6489 </dd></dl>
6490
6491 <dl class="method">
6492 <dt id="git.repo.base.Repo.commit">
6493 <code class="descname">commit</code><span class="sig-paren">(</span><em>rev=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.commit" title="Permalink to this definition">¶</a></dt>
6494 <dd><p>The Commit object for the specified revision
6495 :param rev: revision specifier, see git-rev-parse for viable options.
6496 :return: <code class="docutils literal"><span class="pre">git.Commit</span></code></p>
6497 </dd></dl>
6498
6499 <dl class="attribute">
6500 <dt id="git.repo.base.Repo.config_level">
6501 <code class="descname">config_level</code><em class="property"> = ('system', 'user', 'global', 'repository')</em><a class="headerlink" href="#git.repo.base.Repo.config_level" title="Permalink to this definition">¶</a></dt>
6502 <dd></dd></dl>
6503
6504 <dl class="method">
6505 <dt id="git.repo.base.Repo.config_reader">
6506 <code class="descname">config_reader</code><span class="sig-paren">(</span><em>config_level=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.config_reader" title="Permalink to this definition">¶</a></dt>
6507 <dd><table class="docutils field-list" frame="void" rules="none">
6508 <col class="field-name" />
6509 <col class="field-body" />
6510 <tbody valign="top">
6511 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">GitConfigParser allowing to read the full git configuration, but not to write it<p>The configuration will include values from the system, user and repository
6512 configuration files.</p>
6513 </td>
6514 </tr>
6515 <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>config_level</strong> &#8211; For possible values, see config_writer method
6516 If None, all applicable levels will be used. Specify a level in case
6517 you know which exact file you whish to read to prevent reading multiple files for
6518 instance</td>
6519 </tr>
6520 <tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">On windows, system configuration cannot currently be read as the path is
6521 unknown, instead the global path will be used.</td>
6522 </tr>
6523 </tbody>
6524 </table>
6525 </dd></dl>
6526
6527 <dl class="method">
6528 <dt id="git.repo.base.Repo.config_writer">
6529 <code class="descname">config_writer</code><span class="sig-paren">(</span><em>config_level='repository'</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.config_writer" title="Permalink to this definition">¶</a></dt>
6530 <dd><table class="docutils field-list" frame="void" rules="none">
6531 <col class="field-name" />
6532 <col class="field-body" />
6533 <tbody valign="top">
6534 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">GitConfigParser allowing to write values of the specified configuration file level.
6535 Config writers should be retrieved, used to change the configuration, and written
6536 right away as they will lock the configuration file in question and prevent other&#8217;s
6537 to write it.</td>
6538 </tr>
6539 <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>config_level</strong> &#8211; One of the following values
6540 system = sytem wide configuration file
6541 global = user level configuration file
6542 repository = configuration file for this repostory only</td>
6543 </tr>
6544 </tbody>
6545 </table>
6546 </dd></dl>
6547
6548 <dl class="method">
6549 <dt id="git.repo.base.Repo.create_head">
6550 <code class="descname">create_head</code><span class="sig-paren">(</span><em>path</em>, <em>commit='HEAD'</em>, <em>force=False</em>, <em>logmsg=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.create_head" title="Permalink to this definition">¶</a></dt>
6551 <dd><p>Create a new head within the repository.
6552 For more documentation, please see the Head.create method.</p>
6553 <table class="docutils field-list" frame="void" rules="none">
6554 <col class="field-name" />
6555 <col class="field-body" />
6556 <tbody valign="top">
6557 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">newly created Head Reference</td>
6558 </tr>
6559 </tbody>
6560 </table>
6561 </dd></dl>
6562
6563 <dl class="method">
6564 <dt id="git.repo.base.Repo.create_remote">
6565 <code class="descname">create_remote</code><span class="sig-paren">(</span><em>name</em>, <em>url</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.create_remote" title="Permalink to this definition">¶</a></dt>
6566 <dd><p>Create a new remote.</p>
6567 <p>For more information, please see the documentation of the Remote.create
6568 methods</p>
6569 <table class="docutils field-list" frame="void" rules="none">
6570 <col class="field-name" />
6571 <col class="field-body" />
6572 <tbody valign="top">
6573 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Remote reference</td>
6574 </tr>
6575 </tbody>
6576 </table>
6577 </dd></dl>
6578
6579 <dl class="method">
6580 <dt id="git.repo.base.Repo.create_submodule">
6581 <code class="descname">create_submodule</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.create_submodule" title="Permalink to this definition">¶</a></dt>
6582 <dd><p>Create a new submodule</p>
6583 <table class="docutils field-list" frame="void" rules="none">
6584 <col class="field-name" />
6585 <col class="field-body" />
6586 <tbody valign="top">
6587 <tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">See the documentation of Submodule.add for a description of the
6588 applicable parameters</td>
6589 </tr>
6590 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">created submodules</td>
6591 </tr>
6592 </tbody>
6593 </table>
6594 </dd></dl>
6595
6596 <dl class="method">
6597 <dt id="git.repo.base.Repo.create_tag">
6598 <code class="descname">create_tag</code><span class="sig-paren">(</span><em>path</em>, <em>ref='HEAD'</em>, <em>message=None</em>, <em>force=False</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.create_tag" title="Permalink to this definition">¶</a></dt>
6599 <dd><p>Create a new tag reference.
6600 For more documentation, please see the TagReference.create method.</p>
6601 <table class="docutils field-list" frame="void" rules="none">
6602 <col class="field-name" />
6603 <col class="field-body" />
6604 <tbody valign="top">
6605 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">TagReference object</td>
6606 </tr>
6607 </tbody>
6608 </table>
6609 </dd></dl>
6610
6611 <dl class="attribute">
6612 <dt id="git.repo.base.Repo.daemon_export">
6613 <code class="descname">daemon_export</code><a class="headerlink" href="#git.repo.base.Repo.daemon_export" title="Permalink to this definition">¶</a></dt>
6614 <dd><p>If True, git-daemon may export this repository</p>
6615 </dd></dl>
6616
6617 <dl class="method">
6618 <dt id="git.repo.base.Repo.delete_head">
6619 <code class="descname">delete_head</code><span class="sig-paren">(</span><em>*heads</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.delete_head" title="Permalink to this definition">¶</a></dt>
6620 <dd><p>Delete the given heads</p>
6621 <table class="docutils field-list" frame="void" rules="none">
6622 <col class="field-name" />
6623 <col class="field-body" />
6624 <tbody valign="top">
6625 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>kwargs</strong> &#8211; Additional keyword arguments to be passed to git-branch</td>
6626 </tr>
6627 </tbody>
6628 </table>
6629 </dd></dl>
6630
6631 <dl class="method">
6632 <dt id="git.repo.base.Repo.delete_remote">
6633 <code class="descname">delete_remote</code><span class="sig-paren">(</span><em>remote</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.delete_remote" title="Permalink to this definition">¶</a></dt>
6634 <dd><p>Delete the given remote.</p>
6635 </dd></dl>
6636
6637 <dl class="method">
6638 <dt id="git.repo.base.Repo.delete_tag">
6639 <code class="descname">delete_tag</code><span class="sig-paren">(</span><em>*tags</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.delete_tag" title="Permalink to this definition">¶</a></dt>
6640 <dd><p>Delete the given tag references</p>
6641 </dd></dl>
6642
6643 <dl class="attribute">
6644 <dt id="git.repo.base.Repo.description">
6645 <code class="descname">description</code><a class="headerlink" href="#git.repo.base.Repo.description" title="Permalink to this definition">¶</a></dt>
6646 <dd><p>the project&#8217;s description</p>
6647 </dd></dl>
6648
6649 <dl class="method">
6650 <dt id="git.repo.base.Repo.has_separate_working_tree">
6651 <code class="descname">has_separate_working_tree</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.has_separate_working_tree" title="Permalink to this definition">¶</a></dt>
6652 <dd><table class="docutils field-list" frame="void" rules="none">
6653 <col class="field-name" />
6654 <col class="field-body" />
6655 <tbody valign="top">
6656 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True if our git_dir is not at the root of our working_tree_dir, but a .git file with a
6657 platform agnositic symbolic link. Our git_dir will be whereever the .git file points to</td>
6658 </tr>
6659 <tr class="field-even field"><th class="field-name">Note:</th><td class="field-body">bare repositories will always return False here</td>
6660 </tr>
6661 </tbody>
6662 </table>
6663 </dd></dl>
6664
6665 <dl class="attribute">
6666 <dt id="git.repo.base.Repo.head">
6667 <code class="descname">head</code><a class="headerlink" href="#git.repo.base.Repo.head" title="Permalink to this definition">¶</a></dt>
6668 <dd><table class="docutils field-list" frame="void" rules="none">
6669 <col class="field-name" />
6670 <col class="field-body" />
6671 <tbody valign="top">
6672 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">HEAD Object pointing to the current head reference</td>
6673 </tr>
6674 </tbody>
6675 </table>
6676 </dd></dl>
6677
6678 <dl class="attribute">
6679 <dt id="git.repo.base.Repo.heads">
6680 <code class="descname">heads</code><a class="headerlink" href="#git.repo.base.Repo.heads" title="Permalink to this definition">¶</a></dt>
6681 <dd><p>A list of <code class="docutils literal"><span class="pre">Head</span></code> objects representing the branch heads in
6682 this repo</p>
6683 <table class="docutils field-list" frame="void" rules="none">
6684 <col class="field-name" />
6685 <col class="field-body" />
6686 <tbody valign="top">
6687 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><code class="docutils literal"><span class="pre">git.IterableList(Head,</span> <span class="pre">...)</span></code></td>
6688 </tr>
6689 </tbody>
6690 </table>
6691 </dd></dl>
6692
6693 <dl class="attribute">
6694 <dt id="git.repo.base.Repo.index">
6695 <code class="descname">index</code><a class="headerlink" href="#git.repo.base.Repo.index" title="Permalink to this definition">¶</a></dt>
6696 <dd><table class="docutils field-list" frame="void" rules="none">
6697 <col class="field-name" />
6698 <col class="field-body" />
6699 <tbody valign="top">
6700 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">IndexFile representing this repository&#8217;s index.</td>
6701 </tr>
6702 <tr class="field-even field"><th class="field-name">Note:</th><td class="field-body">This property can be expensive, as the returned <code class="docutils literal"><span class="pre">IndexFile</span></code> will be
6703 reinitialized. It&#8217;s recommended to re-use the object.</td>
6704 </tr>
6705 </tbody>
6706 </table>
6707 </dd></dl>
6708
6709 <dl class="classmethod">
6710 <dt id="git.repo.base.Repo.init">
6711 <em class="property">classmethod </em><code class="descname">init</code><span class="sig-paren">(</span><em>path=None</em>, <em>mkdir=True</em>, <em>odbt=&lt;class 'git.db.GitCmdObjectDB'&gt;</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.init" title="Permalink to this definition">¶</a></dt>
6712 <dd><p>Initialize a git repository at the given path if specified</p>
6713 <table class="docutils field-list" frame="void" rules="none">
6714 <col class="field-name" />
6715 <col class="field-body" />
6716 <tbody valign="top">
6717 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
6718 <li><strong>path</strong> &#8211; is the full path to the repo (traditionally ends with /&lt;name&gt;.git)
6719 or None in which case the repository will be created in the current
6720 working directory</li>
6721 <li><strong>odbt</strong> &#8211; Object DataBase type - a type which is constructed by providing
6722 the directory containing the database objects, i.e. .git/objects.
6723 It will be used to access all object data</li>
6724 </ul>
6725 </td>
6726 </tr>
6727 <tr class="field-even field"><th class="field-name">Parm mkdir:</th><td class="field-body"><p class="first">if specified will create the repository directory if it doesn&#8217;t
6728 already exists. Creates the directory with a mode=0755.
6729 Only effective if a path is explicitly given</p>
6730 </td>
6731 </tr>
6732 <tr class="field-odd field"><th class="field-name">Parm kwargs:</th><td class="field-body"><p class="first">keyword arguments serving as additional options to the git-init command</p>
6733 </td>
6734 </tr>
6735 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><code class="docutils literal"><span class="pre">git.Repo</span></code> (the newly created repo)</p>
6736 </td>
6737 </tr>
6738 </tbody>
6739 </table>
6740 </dd></dl>
6741
6742 <dl class="method">
6743 <dt id="git.repo.base.Repo.is_ancestor">
6744 <code class="descname">is_ancestor</code><span class="sig-paren">(</span><em>ancestor_rev</em>, <em>rev</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.is_ancestor" title="Permalink to this definition">¶</a></dt>
6745 <dd><p>Check if a commit is an ancestor of another</p>
6746 <table class="docutils field-list" frame="void" rules="none">
6747 <col class="field-name" />
6748 <col class="field-body" />
6749 <tbody valign="top">
6750 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
6751 <li><strong>ancestor_rev</strong> &#8211; Rev which should be an ancestor</li>
6752 <li><strong>rev</strong> &#8211; Rev to test against ancestor_rev</li>
6753 </ul>
6754 </td>
6755 </tr>
6756 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><code class="docutils literal"><span class="pre">True</span></code>, ancestor_rev is an accestor to rev.</p>
6757 </td>
6758 </tr>
6759 </tbody>
6760 </table>
6761 </dd></dl>
6762
6763 <dl class="method">
6764 <dt id="git.repo.base.Repo.is_dirty">
6765 <code class="descname">is_dirty</code><span class="sig-paren">(</span><em>index=True</em>, <em>working_tree=True</em>, <em>untracked_files=False</em>, <em>submodules=True</em>, <em>path=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.is_dirty" title="Permalink to this definition">¶</a></dt>
6766 <dd><table class="docutils field-list" frame="void" rules="none">
6767 <col class="field-name" />
6768 <col class="field-body" />
6769 <tbody valign="top">
6770 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><code class="docutils literal"><span class="pre">True</span></code>, the repository is considered dirty. By default it will react
6771 like a git-status without untracked files, hence it is dirty if the
6772 index or the working copy have changes.</td>
6773 </tr>
6774 </tbody>
6775 </table>
6776 </dd></dl>
6777
6778 <dl class="method">
6779 <dt id="git.repo.base.Repo.iter_commits">
6780 <code class="descname">iter_commits</code><span class="sig-paren">(</span><em>rev=None</em>, <em>paths=''</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.iter_commits" title="Permalink to this definition">¶</a></dt>
6781 <dd><p>A list of Commit objects representing the history of a given ref/commit</p>
6782 <table class="docutils field-list" frame="void" rules="none">
6783 <col class="field-name" />
6784 <col class="field-body" />
6785 <tbody valign="top">
6786 <tr class="field-odd field"><th class="field-name">Parm rev:</th><td class="field-body">revision specifier, see git-rev-parse for viable options.
6787 If None, the active branch will be used.</td>
6788 </tr>
6789 <tr class="field-even field"><th class="field-name">Parm paths:</th><td class="field-body">is an optional path or a list of paths to limit the returned commits to
6790 Commits that do not contain that path or the paths will not be returned.</td>
6791 </tr>
6792 <tr class="field-odd field"><th class="field-name">Parm kwargs:</th><td class="field-body">Arguments to be passed to git-rev-list - common ones are
6793 max_count and skip</td>
6794 </tr>
6795 <tr class="field-even field"><th class="field-name">Note:</th><td class="field-body">to receive only commits between two named revisions, use the
6796 &#8220;revA...revB&#8221; revision specifier</td>
6797 </tr>
6798 </tbody>
6799 </table>
6800 <p>:return <code class="docutils literal"><span class="pre">git.Commit[]</span></code></p>
6801 </dd></dl>
6802
6803 <dl class="method">
6804 <dt id="git.repo.base.Repo.iter_submodules">
6805 <code class="descname">iter_submodules</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.iter_submodules" title="Permalink to this definition">¶</a></dt>
6806 <dd><p>An iterator yielding Submodule instances, see Traversable interface
6807 for a description of args and kwargs
6808 :return: Iterator</p>
6809 </dd></dl>
6810
6811 <dl class="method">
6812 <dt id="git.repo.base.Repo.iter_trees">
6813 <code class="descname">iter_trees</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.iter_trees" title="Permalink to this definition">¶</a></dt>
6814 <dd><table class="docutils field-list" frame="void" rules="none">
6815 <col class="field-name" />
6816 <col class="field-body" />
6817 <tbody valign="top">
6818 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Iterator yielding Tree objects</td>
6819 </tr>
6820 <tr class="field-even field"><th class="field-name">Note:</th><td class="field-body">Takes all arguments known to iter_commits method</td>
6821 </tr>
6822 </tbody>
6823 </table>
6824 </dd></dl>
6825
6826 <dl class="method">
6827 <dt id="git.repo.base.Repo.merge_base">
6828 <code class="descname">merge_base</code><span class="sig-paren">(</span><em>*rev</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.merge_base" title="Permalink to this definition">¶</a></dt>
6829 <dd><p>Find the closest common ancestor for the given revision (e.g. Commits, Tags, References, etc)</p>
6830 <table class="docutils field-list" frame="void" rules="none">
6831 <col class="field-name" />
6832 <col class="field-body" />
6833 <tbody valign="top">
6834 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
6835 <li><strong>rev</strong> &#8211; At least two revs to find the common ancestor for.</li>
6836 <li><strong>kwargs</strong> &#8211; Additional arguments to be passed to the repo.git.merge_base() command which does all the work.</li>
6837 </ul>
6838 </td>
6839 </tr>
6840 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">A list of Commit objects. If &#8211;all was not specified as kwarg, the list will have at max one Commit,
6841 or is empty if no common merge base exists.</p>
6842 </td>
6843 </tr>
6844 <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><strong>ValueError</strong> &#8211; If not at least two revs are provided</p>
6845 </td>
6846 </tr>
6847 </tbody>
6848 </table>
6849 </dd></dl>
6850
6851 <dl class="attribute">
6852 <dt id="git.repo.base.Repo.re_author_committer_start">
6853 <code class="descname">re_author_committer_start</code><em class="property"> = &lt;_sre.SRE_Pattern object&gt;</em><a class="headerlink" href="#git.repo.base.Repo.re_author_committer_start" title="Permalink to this definition">¶</a></dt>
6854 <dd></dd></dl>
6855
6856 <dl class="attribute">
6857 <dt id="git.repo.base.Repo.re_hexsha_only">
6858 <code class="descname">re_hexsha_only</code><em class="property"> = &lt;_sre.SRE_Pattern object&gt;</em><a class="headerlink" href="#git.repo.base.Repo.re_hexsha_only" title="Permalink to this definition">¶</a></dt>
6859 <dd></dd></dl>
6860
6861 <dl class="attribute">
6862 <dt id="git.repo.base.Repo.re_hexsha_shortened">
6863 <code class="descname">re_hexsha_shortened</code><em class="property"> = &lt;_sre.SRE_Pattern object&gt;</em><a class="headerlink" href="#git.repo.base.Repo.re_hexsha_shortened" title="Permalink to this definition">¶</a></dt>
6864 <dd></dd></dl>
6865
6866 <dl class="attribute">
6867 <dt id="git.repo.base.Repo.re_tab_full_line">
6868 <code class="descname">re_tab_full_line</code><em class="property"> = &lt;_sre.SRE_Pattern object&gt;</em><a class="headerlink" href="#git.repo.base.Repo.re_tab_full_line" title="Permalink to this definition">¶</a></dt>
6869 <dd></dd></dl>
6870
6871 <dl class="attribute">
6872 <dt id="git.repo.base.Repo.re_whitespace">
6873 <code class="descname">re_whitespace</code><em class="property"> = &lt;_sre.SRE_Pattern object&gt;</em><a class="headerlink" href="#git.repo.base.Repo.re_whitespace" title="Permalink to this definition">¶</a></dt>
6874 <dd></dd></dl>
6875
6876 <dl class="attribute">
6877 <dt id="git.repo.base.Repo.references">
6878 <code class="descname">references</code><a class="headerlink" href="#git.repo.base.Repo.references" title="Permalink to this definition">¶</a></dt>
6879 <dd><p>A list of Reference objects representing tags, heads and remote references.</p>
6880 <table class="docutils field-list" frame="void" rules="none">
6881 <col class="field-name" />
6882 <col class="field-body" />
6883 <tbody valign="top">
6884 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">IterableList(Reference, ...)</td>
6885 </tr>
6886 </tbody>
6887 </table>
6888 </dd></dl>
6889
6890 <dl class="attribute">
6891 <dt id="git.repo.base.Repo.refs">
6892 <code class="descname">refs</code><a class="headerlink" href="#git.repo.base.Repo.refs" title="Permalink to this definition">¶</a></dt>
6893 <dd><p>A list of Reference objects representing tags, heads and remote references.</p>
6894 <table class="docutils field-list" frame="void" rules="none">
6895 <col class="field-name" />
6896 <col class="field-body" />
6897 <tbody valign="top">
6898 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">IterableList(Reference, ...)</td>
6899 </tr>
6900 </tbody>
6901 </table>
6902 </dd></dl>
6903
6904 <dl class="method">
6905 <dt id="git.repo.base.Repo.remote">
6906 <code class="descname">remote</code><span class="sig-paren">(</span><em>name='origin'</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.remote" title="Permalink to this definition">¶</a></dt>
6907 <dd><table class="docutils field-list" frame="void" rules="none">
6908 <col class="field-name" />
6909 <col class="field-body" />
6910 <tbody valign="top">
6911 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Remote with the specified name</td>
6912 </tr>
6913 <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><strong>ValueError</strong> &#8211; if no remote with such a name exists</td>
6914 </tr>
6915 </tbody>
6916 </table>
6917 </dd></dl>
6918
6919 <dl class="attribute">
6920 <dt id="git.repo.base.Repo.remotes">
6921 <code class="descname">remotes</code><a class="headerlink" href="#git.repo.base.Repo.remotes" title="Permalink to this definition">¶</a></dt>
6922 <dd><p>A list of Remote objects allowing to access and manipulate remotes
6923 :return: <code class="docutils literal"><span class="pre">git.IterableList(Remote,</span> <span class="pre">...)</span></code></p>
6924 </dd></dl>
6925
6926 <dl class="method">
6927 <dt id="git.repo.base.Repo.rev_parse">
6928 <code class="descname">rev_parse</code><span class="sig-paren">(</span><em>repo</em>, <em>rev</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.rev_parse" title="Permalink to this definition">¶</a></dt>
6929 <dd><table class="docutils field-list" frame="void" rules="none">
6930 <col class="field-name" />
6931 <col class="field-body" />
6932 <tbody valign="top">
6933 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Object at the given revision, either Commit, Tag, Tree or Blob</p>
6934 </td>
6935 </tr>
6936 <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>rev</strong> &#8211; git-rev-parse compatible revision specification as string, please see
6937 <a class="reference external" href="http://www.kernel.org/pub/software/scm/git/docs/git-rev-parse.html">http://www.kernel.org/pub/software/scm/git/docs/git-rev-parse.html</a>
6938 for details</p>
6939 </td>
6940 </tr>
6941 <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple">
6942 <li><strong>BadObject</strong> &#8211; if the given revision could not be found</li>
6943 <li><strong>ValueError</strong> &#8211; If rev couldn&#8217;t be parsed</li>
6944 <li><strong>IndexError</strong> &#8211; If invalid reflog index is specified</li>
6945 </ul>
6946 </td>
6947 </tr>
6948 </tbody>
6949 </table>
6950 </dd></dl>
6951
6952 <dl class="method">
6953 <dt id="git.repo.base.Repo.submodule">
6954 <code class="descname">submodule</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.submodule" title="Permalink to this definition">¶</a></dt>
6955 <dd><table class="docutils field-list" frame="void" rules="none">
6956 <col class="field-name" />
6957 <col class="field-body" />
6958 <tbody valign="top">
6959 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Submodule with the given name</td>
6960 </tr>
6961 <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><strong>ValueError</strong> &#8211; If no such submodule exists</td>
6962 </tr>
6963 </tbody>
6964 </table>
6965 </dd></dl>
6966
6967 <dl class="method">
6968 <dt id="git.repo.base.Repo.submodule_update">
6969 <code class="descname">submodule_update</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.submodule_update" title="Permalink to this definition">¶</a></dt>
6970 <dd><p>Update the submodules, keeping the repository consistent as it will
6971 take the previous state into consideration. For more information, please
6972 see the documentation of RootModule.update</p>
6973 </dd></dl>
6974
6975 <dl class="attribute">
6976 <dt id="git.repo.base.Repo.submodules">
6977 <code class="descname">submodules</code><a class="headerlink" href="#git.repo.base.Repo.submodules" title="Permalink to this definition">¶</a></dt>
6978 <dd><table class="docutils field-list" frame="void" rules="none">
6979 <col class="field-name" />
6980 <col class="field-body" />
6981 <tbody valign="top">
6982 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">git.IterableList(Submodule, ...) of direct submodules
6983 available from the current head</td>
6984 </tr>
6985 </tbody>
6986 </table>
6987 </dd></dl>
6988
6989 <dl class="method">
6990 <dt id="git.repo.base.Repo.tag">
6991 <code class="descname">tag</code><span class="sig-paren">(</span><em>path</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.tag" title="Permalink to this definition">¶</a></dt>
6992 <dd><table class="docutils field-list" frame="void" rules="none">
6993 <col class="field-name" />
6994 <col class="field-body" />
6995 <tbody valign="top">
6996 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">TagReference Object, reference pointing to a Commit or Tag</td>
6997 </tr>
6998 <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>path</strong> &#8211; path to the tag reference, i.e. 0.1.5 or tags/0.1.5</td>
6999 </tr>
7000 </tbody>
7001 </table>
7002 </dd></dl>
7003
7004 <dl class="attribute">
7005 <dt id="git.repo.base.Repo.tags">
7006 <code class="descname">tags</code><a class="headerlink" href="#git.repo.base.Repo.tags" title="Permalink to this definition">¶</a></dt>
7007 <dd><p>A list of <code class="docutils literal"><span class="pre">Tag</span></code> objects that are available in this repo
7008 :return: <code class="docutils literal"><span class="pre">git.IterableList(TagReference,</span> <span class="pre">...)</span></code></p>
7009 </dd></dl>
7010
7011 <dl class="method">
7012 <dt id="git.repo.base.Repo.tree">
7013 <code class="descname">tree</code><span class="sig-paren">(</span><em>rev=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.base.Repo.tree" title="Permalink to this definition">¶</a></dt>
7014 <dd><p>The Tree object for the given treeish revision
7015 Examples:</p>
7016 <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">repo</span><span class="o">.</span><span class="n">tree</span><span class="p">(</span><span class="n">repo</span><span class="o">.</span><span class="n">heads</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span>
7017 </pre></div>
7018 </div>
7019 <table class="docutils field-list" frame="void" rules="none">
7020 <col class="field-name" />
7021 <col class="field-body" />
7022 <tbody valign="top">
7023 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>rev</strong> &#8211; is a revision pointing to a Treeish ( being a commit or tree )</td>
7024 </tr>
7025 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><code class="docutils literal"><span class="pre">git.Tree</span></code></td>
7026 </tr>
7027 <tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">If you need a non-root level tree, find it by iterating the root tree. Otherwise
7028 it cannot know about its path relative to the repository root and subsequent
7029 operations might have unexpected results.</td>
7030 </tr>
7031 </tbody>
7032 </table>
7033 </dd></dl>
7034
7035 <dl class="attribute">
7036 <dt id="git.repo.base.Repo.untracked_files">
7037 <code class="descname">untracked_files</code><a class="headerlink" href="#git.repo.base.Repo.untracked_files" title="Permalink to this definition">¶</a></dt>
7038 <dd><table class="docutils field-list" frame="void" rules="none">
7039 <col class="field-name" />
7040 <col class="field-body" />
7041 <tbody valign="top">
7042 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">list(str,...)<p>Files currently untracked as they have not been staged yet. Paths
7043 are relative to the current working directory of the git command.</p>
7044 </td>
7045 </tr>
7046 <tr class="field-even field"><th class="field-name">Note:</th><td class="field-body">ignored files will not appear here, i.e. files mentioned in .gitignore</td>
7047 </tr>
7048 <tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">This property is expensive, as no cache is involved. To process the result, please
7049 consider caching it yourself.</td>
7050 </tr>
7051 </tbody>
7052 </table>
7053 </dd></dl>
7054
7055 <dl class="attribute">
7056 <dt id="git.repo.base.Repo.working_tree_dir">
7057 <code class="descname">working_tree_dir</code><a class="headerlink" href="#git.repo.base.Repo.working_tree_dir" title="Permalink to this definition">¶</a></dt>
7058 <dd><table class="docutils field-list" frame="void" rules="none">
7059 <col class="field-name" />
7060 <col class="field-body" />
7061 <tbody valign="top">
7062 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The working tree directory of our git repository. If this is a bare repository, None is returned.</td>
7063 </tr>
7064 </tbody>
7065 </table>
7066 </dd></dl>
7067
7068 </dd></dl>
7069
7070 </div>
7071 <div class="section" id="module-git.repo.fun">
7072 <span id="repo-functions"></span><h2>Repo.Functions<a class="headerlink" href="#module-git.repo.fun" title="Permalink to this headline">¶</a></h2>
7073 <p>Package with general repository related functions</p>
7074 <dl class="function">
7075 <dt id="git.repo.fun.rev_parse">
7076 <code class="descclassname">git.repo.fun.</code><code class="descname">rev_parse</code><span class="sig-paren">(</span><em>repo</em>, <em>rev</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.fun.rev_parse" title="Permalink to this definition">¶</a></dt>
7077 <dd><table class="docutils field-list" frame="void" rules="none">
7078 <col class="field-name" />
7079 <col class="field-body" />
7080 <tbody valign="top">
7081 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Object at the given revision, either Commit, Tag, Tree or Blob</p>
7082 </td>
7083 </tr>
7084 <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>rev</strong> &#8211; git-rev-parse compatible revision specification as string, please see
7085 <a class="reference external" href="http://www.kernel.org/pub/software/scm/git/docs/git-rev-parse.html">http://www.kernel.org/pub/software/scm/git/docs/git-rev-parse.html</a>
7086 for details</p>
7087 </td>
7088 </tr>
7089 <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple">
7090 <li><strong>BadObject</strong> &#8211; if the given revision could not be found</li>
7091 <li><strong>ValueError</strong> &#8211; If rev couldn&#8217;t be parsed</li>
7092 <li><strong>IndexError</strong> &#8211; If invalid reflog index is specified</li>
7093 </ul>
7094 </td>
7095 </tr>
7096 </tbody>
7097 </table>
7098 </dd></dl>
7099
7100 <dl class="function">
7101 <dt id="git.repo.fun.is_git_dir">
7102 <code class="descclassname">git.repo.fun.</code><code class="descname">is_git_dir</code><span class="sig-paren">(</span><em>d</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.fun.is_git_dir" title="Permalink to this definition">¶</a></dt>
7103 <dd><p>This is taken from the git setup.c:is_git_directory
7104 function.</p>
7105 <dl class="docutils">
7106 <dt>&#64;throws WorkTreeRepositoryUnsupported if it sees a worktree directory. It&#8217;s quite hacky to do that here,</dt>
7107 <dd>but at least clearly indicates that we don&#8217;t support it.
7108 There is the unlikely danger to throw if we see directories which just look like a worktree dir,
7109 but are none.</dd>
7110 </dl>
7111 </dd></dl>
7112
7113 <dl class="function">
7114 <dt id="git.repo.fun.touch">
7115 <code class="descclassname">git.repo.fun.</code><code class="descname">touch</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.fun.touch" title="Permalink to this definition">¶</a></dt>
7116 <dd></dd></dl>
7117
7118 <dl class="function">
7119 <dt id="git.repo.fun.find_git_dir">
7120 <code class="descclassname">git.repo.fun.</code><code class="descname">find_git_dir</code><span class="sig-paren">(</span><em>d</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.fun.find_git_dir" title="Permalink to this definition">¶</a></dt>
7121 <dd></dd></dl>
7122
7123 <dl class="function">
7124 <dt id="git.repo.fun.name_to_object">
7125 <code class="descclassname">git.repo.fun.</code><code class="descname">name_to_object</code><span class="sig-paren">(</span><em>repo</em>, <em>name</em>, <em>return_ref=False</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.fun.name_to_object" title="Permalink to this definition">¶</a></dt>
7126 <dd><table class="docutils field-list" frame="void" rules="none">
7127 <col class="field-name" />
7128 <col class="field-body" />
7129 <tbody valign="top">
7130 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">object specified by the given name, hexshas ( short and long )
7131 as well as references are supported</td>
7132 </tr>
7133 <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>return_ref</strong> &#8211; if name specifies a reference, we will return the reference
7134 instead of the object. Otherwise it will raise BadObject or BadName</td>
7135 </tr>
7136 </tbody>
7137 </table>
7138 </dd></dl>
7139
7140 <dl class="function">
7141 <dt id="git.repo.fun.short_to_long">
7142 <code class="descclassname">git.repo.fun.</code><code class="descname">short_to_long</code><span class="sig-paren">(</span><em>odb</em>, <em>hexsha</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.fun.short_to_long" title="Permalink to this definition">¶</a></dt>
7143 <dd><table class="docutils field-list" frame="void" rules="none">
7144 <col class="field-name" />
7145 <col class="field-body" />
7146 <tbody valign="top">
7147 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">long hexadecimal sha1 from the given less-than-40 byte hexsha
7148 or None if no candidate could be found.</td>
7149 </tr>
7150 <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>hexsha</strong> &#8211; hexsha with less than 40 byte</td>
7151 </tr>
7152 </tbody>
7153 </table>
7154 </dd></dl>
7155
7156 <dl class="function">
7157 <dt id="git.repo.fun.deref_tag">
7158 <code class="descclassname">git.repo.fun.</code><code class="descname">deref_tag</code><span class="sig-paren">(</span><em>tag</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.fun.deref_tag" title="Permalink to this definition">¶</a></dt>
7159 <dd><p>Recursively dereference a tag and return the resulting object</p>
7160 </dd></dl>
7161
7162 <dl class="function">
7163 <dt id="git.repo.fun.to_commit">
7164 <code class="descclassname">git.repo.fun.</code><code class="descname">to_commit</code><span class="sig-paren">(</span><em>obj</em><span class="sig-paren">)</span><a class="headerlink" href="#git.repo.fun.to_commit" title="Permalink to this definition">¶</a></dt>
7165 <dd><p>Convert the given object to a commit if possible and return it</p>
7166 </dd></dl>
7167
7168 </div>
7169 <div class="section" id="util">
7170 <h2>Util<a class="headerlink" href="#util" title="Permalink to this headline">¶</a></h2>
7171 <span class="target" id="module-git.util"></span><dl class="function">
7172 <dt id="git.util.stream_copy">
7173 <code class="descclassname">git.util.</code><code class="descname">stream_copy</code><span class="sig-paren">(</span><em>source</em>, <em>destination</em>, <em>chunk_size=524288</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.stream_copy" title="Permalink to this definition">¶</a></dt>
7174 <dd><p>Copy all data from the source stream into the destination stream in chunks
7175 of size chunk_size</p>
7176 <table class="docutils field-list" frame="void" rules="none">
7177 <col class="field-name" />
7178 <col class="field-body" />
7179 <tbody valign="top">
7180 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">amount of bytes written</td>
7181 </tr>
7182 </tbody>
7183 </table>
7184 </dd></dl>
7185
7186 <dl class="function">
7187 <dt id="git.util.join_path">
7188 <code class="descclassname">git.util.</code><code class="descname">join_path</code><span class="sig-paren">(</span><em>a</em>, <em>*p</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.join_path" title="Permalink to this definition">¶</a></dt>
7189 <dd><p>Join path tokens together similar to os.path.join, but always use
7190 &#8216;/&#8217; instead of possibly &#8216;&#8217; on windows.</p>
7191 </dd></dl>
7192
7193 <dl class="function">
7194 <dt id="git.util.to_native_path_linux">
7195 <code class="descclassname">git.util.</code><code class="descname">to_native_path_linux</code><span class="sig-paren">(</span><em>path</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.to_native_path_linux" title="Permalink to this definition">¶</a></dt>
7196 <dd></dd></dl>
7197
7198 <dl class="function">
7199 <dt id="git.util.join_path_native">
7200 <code class="descclassname">git.util.</code><code class="descname">join_path_native</code><span class="sig-paren">(</span><em>a</em>, <em>*p</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.join_path_native" title="Permalink to this definition">¶</a></dt>
7201 <dd><dl class="docutils">
7202 <dt>As join path, but makes sure an OS native path is returned. This is only</dt>
7203 <dd>needed to play it safe on my dear windows and to assure nice paths that only
7204 use &#8216;&#8217;</dd>
7205 </dl>
7206 </dd></dl>
7207
7208 <dl class="class">
7209 <dt id="git.util.Stats">
7210 <em class="property">class </em><code class="descclassname">git.util.</code><code class="descname">Stats</code><span class="sig-paren">(</span><em>total</em>, <em>files</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.Stats" title="Permalink to this definition">¶</a></dt>
7211 <dd><p>Represents stat information as presented by git at the end of a merge. It is
7212 created from the output of a diff operation.</p>
7213 <p><code class="docutils literal"><span class="pre">Example</span></code>:</p>
7214 <div class="highlight-default"><div class="highlight"><pre><span></span><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>
7215 <span class="n">s</span> <span class="o">=</span> <span class="n">c</span><span class="o">.</span><span class="n">stats</span>
7216 <span class="n">s</span><span class="o">.</span><span class="n">total</span> <span class="c1"># full-stat-dict</span>
7217 <span class="n">s</span><span class="o">.</span><span class="n">files</span> <span class="c1"># dict( filepath : stat-dict )</span>
7218 </pre></div>
7219 </div>
7220 <p><code class="docutils literal"><span class="pre">stat-dict</span></code></p>
7221 <p>A dictionary with the following keys and values:</p>
7222 <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">deletions</span> <span class="o">=</span> <span class="n">number</span> <span class="n">of</span> <span class="n">deleted</span> <span class="n">lines</span> <span class="k">as</span> <span class="nb">int</span>
7223 <span class="n">insertions</span> <span class="o">=</span> <span class="n">number</span> <span class="n">of</span> <span class="n">inserted</span> <span class="n">lines</span> <span class="k">as</span> <span class="nb">int</span>
7224 <span class="n">lines</span> <span class="o">=</span> <span class="n">total</span> <span class="n">number</span> <span class="n">of</span> <span class="n">lines</span> <span class="n">changed</span> <span class="k">as</span> <span class="nb">int</span><span class="p">,</span> <span class="ow">or</span> <span class="n">deletions</span> <span class="o">+</span> <span class="n">insertions</span>
7225 </pre></div>
7226 </div>
7227 <p><code class="docutils literal"><span class="pre">full-stat-dict</span></code></p>
7228 <p>In addition to the items in the stat-dict, it features additional information:</p>
7229 <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">files</span> <span class="o">=</span> <span class="n">number</span> <span class="n">of</span> <span class="n">changed</span> <span class="n">files</span> <span class="k">as</span> <span class="nb">int</span>
7230 </pre></div>
7231 </div>
7232 <dl class="method">
7233 <dt id="git.util.Stats.__init__">
7234 <code class="descname">__init__</code><span class="sig-paren">(</span><em>total</em>, <em>files</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.Stats.__init__" title="Permalink to this definition">¶</a></dt>
7235 <dd></dd></dl>
7236
7237 <dl class="attribute">
7238 <dt id="git.util.Stats.__module__">
7239 <code class="descname">__module__</code><em class="property"> = 'git.util'</em><a class="headerlink" href="#git.util.Stats.__module__" title="Permalink to this definition">¶</a></dt>
7240 <dd></dd></dl>
7241
7242 <dl class="attribute">
7243 <dt id="git.util.Stats.__slots__">
7244 <code class="descname">__slots__</code><em class="property"> = ('total', 'files')</em><a class="headerlink" href="#git.util.Stats.__slots__" title="Permalink to this definition">¶</a></dt>
7245 <dd></dd></dl>
7246
7247 <dl class="attribute">
7248 <dt id="git.util.Stats.files">
7249 <code class="descname">files</code><a class="headerlink" href="#git.util.Stats.files" title="Permalink to this definition">¶</a></dt>
7250 <dd></dd></dl>
7251
7252 <dl class="attribute">
7253 <dt id="git.util.Stats.total">
7254 <code class="descname">total</code><a class="headerlink" href="#git.util.Stats.total" title="Permalink to this definition">¶</a></dt>
7255 <dd></dd></dl>
7256
7257 </dd></dl>
7258
7259 <dl class="class">
7260 <dt id="git.util.IndexFileSHA1Writer">
7261 <em class="property">class </em><code class="descclassname">git.util.</code><code class="descname">IndexFileSHA1Writer</code><span class="sig-paren">(</span><em>f</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.IndexFileSHA1Writer" title="Permalink to this definition">¶</a></dt>
7262 <dd><p>Wrapper around a file-like object that remembers the SHA1 of
7263 the data written to it. It will write a sha when the stream is closed
7264 or if the asked for explicitly usign write_sha.</p>
7265 <p>Only useful to the indexfile</p>
7266 <table class="docutils field-list" frame="void" rules="none">
7267 <col class="field-name" />
7268 <col class="field-body" />
7269 <tbody valign="top">
7270 <tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">Based on the dulwich project</td>
7271 </tr>
7272 </tbody>
7273 </table>
7274 <dl class="method">
7275 <dt id="git.util.IndexFileSHA1Writer.__init__">
7276 <code class="descname">__init__</code><span class="sig-paren">(</span><em>f</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.IndexFileSHA1Writer.__init__" title="Permalink to this definition">¶</a></dt>
7277 <dd></dd></dl>
7278
7279 <dl class="attribute">
7280 <dt id="git.util.IndexFileSHA1Writer.__module__">
7281 <code class="descname">__module__</code><em class="property"> = 'git.util'</em><a class="headerlink" href="#git.util.IndexFileSHA1Writer.__module__" title="Permalink to this definition">¶</a></dt>
7282 <dd></dd></dl>
7283
7284 <dl class="attribute">
7285 <dt id="git.util.IndexFileSHA1Writer.__slots__">
7286 <code class="descname">__slots__</code><em class="property"> = ('f', 'sha1')</em><a class="headerlink" href="#git.util.IndexFileSHA1Writer.__slots__" title="Permalink to this definition">¶</a></dt>
7287 <dd></dd></dl>
7288
7289 <dl class="method">
7290 <dt id="git.util.IndexFileSHA1Writer.close">
7291 <code class="descname">close</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.util.IndexFileSHA1Writer.close" title="Permalink to this definition">¶</a></dt>
7292 <dd></dd></dl>
7293
7294 <dl class="attribute">
7295 <dt id="git.util.IndexFileSHA1Writer.f">
7296 <code class="descname">f</code><a class="headerlink" href="#git.util.IndexFileSHA1Writer.f" title="Permalink to this definition">¶</a></dt>
7297 <dd></dd></dl>
7298
7299 <dl class="attribute">
7300 <dt id="git.util.IndexFileSHA1Writer.sha1">
7301 <code class="descname">sha1</code><a class="headerlink" href="#git.util.IndexFileSHA1Writer.sha1" title="Permalink to this definition">¶</a></dt>
7302 <dd></dd></dl>
7303
7304 <dl class="method">
7305 <dt id="git.util.IndexFileSHA1Writer.tell">
7306 <code class="descname">tell</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.util.IndexFileSHA1Writer.tell" title="Permalink to this definition">¶</a></dt>
7307 <dd></dd></dl>
7308
7309 <dl class="method">
7310 <dt id="git.util.IndexFileSHA1Writer.write">
7311 <code class="descname">write</code><span class="sig-paren">(</span><em>data</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.IndexFileSHA1Writer.write" title="Permalink to this definition">¶</a></dt>
7312 <dd></dd></dl>
7313
7314 <dl class="method">
7315 <dt id="git.util.IndexFileSHA1Writer.write_sha">
7316 <code class="descname">write_sha</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.util.IndexFileSHA1Writer.write_sha" title="Permalink to this definition">¶</a></dt>
7317 <dd></dd></dl>
7318
7319 </dd></dl>
7320
7321 <dl class="class">
7322 <dt id="git.util.Iterable">
7323 <em class="property">class </em><code class="descclassname">git.util.</code><code class="descname">Iterable</code><a class="headerlink" href="#git.util.Iterable" title="Permalink to this definition">¶</a></dt>
7324 <dd><p>Defines an interface for iterable items which is to assure a uniform
7325 way to retrieve and iterate items within the git repository</p>
7326 <dl class="attribute">
7327 <dt id="git.util.Iterable.__module__">
7328 <code class="descname">__module__</code><em class="property"> = 'git.util'</em><a class="headerlink" href="#git.util.Iterable.__module__" title="Permalink to this definition">¶</a></dt>
7329 <dd></dd></dl>
7330
7331 <dl class="attribute">
7332 <dt id="git.util.Iterable.__slots__">
7333 <code class="descname">__slots__</code><em class="property"> = ()</em><a class="headerlink" href="#git.util.Iterable.__slots__" title="Permalink to this definition">¶</a></dt>
7334 <dd></dd></dl>
7335
7336 <dl class="classmethod">
7337 <dt id="git.util.Iterable.iter_items">
7338 <em class="property">classmethod </em><code class="descname">iter_items</code><span class="sig-paren">(</span><em>repo</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.Iterable.iter_items" title="Permalink to this definition">¶</a></dt>
7339 <dd><p>For more information about the arguments, see list_items
7340 :return: iterator yielding Items</p>
7341 </dd></dl>
7342
7343 <dl class="classmethod">
7344 <dt id="git.util.Iterable.list_items">
7345 <em class="property">classmethod </em><code class="descname">list_items</code><span class="sig-paren">(</span><em>repo</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.Iterable.list_items" title="Permalink to this definition">¶</a></dt>
7346 <dd><p>Find all items of this type - subclasses can specify args and kwargs differently.
7347 If no args are given, subclasses are obliged to return all items if no additional
7348 arguments arg given.</p>
7349 <table class="docutils field-list" frame="void" rules="none">
7350 <col class="field-name" />
7351 <col class="field-body" />
7352 <tbody valign="top">
7353 <tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">Favor the iter_items method as it will</td>
7354 </tr>
7355 </tbody>
7356 </table>
7357 <p>:return:list(Item,...) list of item instances</p>
7358 </dd></dl>
7359
7360 </dd></dl>
7361
7362 <dl class="class">
7363 <dt id="git.util.IterableList">
7364 <em class="property">class </em><code class="descclassname">git.util.</code><code class="descname">IterableList</code><span class="sig-paren">(</span><em>id_attr</em>, <em>prefix=''</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.IterableList" title="Permalink to this definition">¶</a></dt>
7365 <dd><p>List of iterable objects allowing to query an object by id or by named index:</p>
7366 <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">heads</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">heads</span>
7367 <span class="n">heads</span><span class="o">.</span><span class="n">master</span>
7368 <span class="n">heads</span><span class="p">[</span><span class="s1">&#39;master&#39;</span><span class="p">]</span>
7369 <span class="n">heads</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
7370 </pre></div>
7371 </div>
7372 <p>It requires an id_attribute name to be set which will be queried from its
7373 contained items to have a means for comparison.</p>
7374 <p>A prefix can be specified which is to be used in case the id returned by the
7375 items always contains a prefix that does not matter to the user, so it
7376 can be left out.</p>
7377 <dl class="method">
7378 <dt id="git.util.IterableList.__contains__">
7379 <code class="descname">__contains__</code><span class="sig-paren">(</span><em>attr</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.IterableList.__contains__" title="Permalink to this definition">¶</a></dt>
7380 <dd></dd></dl>
7381
7382 <dl class="method">
7383 <dt id="git.util.IterableList.__delitem__">
7384 <code class="descname">__delitem__</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.IterableList.__delitem__" title="Permalink to this definition">¶</a></dt>
7385 <dd></dd></dl>
7386
7387 <dl class="method">
7388 <dt id="git.util.IterableList.__getattr__">
7389 <code class="descname">__getattr__</code><span class="sig-paren">(</span><em>attr</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.IterableList.__getattr__" title="Permalink to this definition">¶</a></dt>
7390 <dd></dd></dl>
7391
7392 <dl class="method">
7393 <dt id="git.util.IterableList.__getitem__">
7394 <code class="descname">__getitem__</code><span class="sig-paren">(</span><em>index</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.IterableList.__getitem__" title="Permalink to this definition">¶</a></dt>
7395 <dd></dd></dl>
7396
7397 <dl class="method">
7398 <dt id="git.util.IterableList.__init__">
7399 <code class="descname">__init__</code><span class="sig-paren">(</span><em>id_attr</em>, <em>prefix=''</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.IterableList.__init__" title="Permalink to this definition">¶</a></dt>
7400 <dd></dd></dl>
7401
7402 <dl class="attribute">
7403 <dt id="git.util.IterableList.__module__">
7404 <code class="descname">__module__</code><em class="property"> = 'git.util'</em><a class="headerlink" href="#git.util.IterableList.__module__" title="Permalink to this definition">¶</a></dt>
7405 <dd></dd></dl>
7406
7407 <dl class="staticmethod">
7408 <dt id="git.util.IterableList.__new__">
7409 <em class="property">static </em><code class="descname">__new__</code><span class="sig-paren">(</span><em>id_attr</em>, <em>prefix=''</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.IterableList.__new__" title="Permalink to this definition">¶</a></dt>
7410 <dd></dd></dl>
7411
7412 <dl class="attribute">
7413 <dt id="git.util.IterableList.__slots__">
7414 <code class="descname">__slots__</code><em class="property"> = ('_id_attr', '_prefix')</em><a class="headerlink" href="#git.util.IterableList.__slots__" title="Permalink to this definition">¶</a></dt>
7415 <dd></dd></dl>
7416
7417 </dd></dl>
7418
7419 <dl class="class">
7420 <dt id="git.util.BlockingLockFile">
7421 <em class="property">class </em><code class="descclassname">git.util.</code><code class="descname">BlockingLockFile</code><span class="sig-paren">(</span><em>file_path</em>, <em>check_interval_s=0.3</em>, <em>max_block_time_s=9223372036854775807</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.BlockingLockFile" title="Permalink to this definition">¶</a></dt>
7422 <dd><p>The lock file will block until a lock could be obtained, or fail after
7423 a specified timeout.</p>
7424 <table class="docutils field-list" frame="void" rules="none">
7425 <col class="field-name" />
7426 <col class="field-body" />
7427 <tbody valign="top">
7428 <tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">If the directory containing the lock was removed, an exception will
7429 be raised during the blocking period, preventing hangs as the lock
7430 can never be obtained.</td>
7431 </tr>
7432 </tbody>
7433 </table>
7434 <dl class="method">
7435 <dt id="git.util.BlockingLockFile.__init__">
7436 <code class="descname">__init__</code><span class="sig-paren">(</span><em>file_path</em>, <em>check_interval_s=0.3</em>, <em>max_block_time_s=9223372036854775807</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.BlockingLockFile.__init__" title="Permalink to this definition">¶</a></dt>
7437 <dd><p>Configure the instance</p>
7438 <table class="docutils field-list" frame="void" rules="none">
7439 <col class="field-name" />
7440 <col class="field-body" />
7441 <tbody valign="top">
7442 <tr class="field-odd field"><th class="field-name" colspan="2">Parm check_interval_s:</th></tr>
7443 <tr class="field-odd field"><td>&nbsp;</td><td class="field-body">Period of time to sleep until the lock is checked the next time.
7444 By default, it waits a nearly unlimited time</td>
7445 </tr>
7446 <tr class="field-even field"><th class="field-name" colspan="2">Parm max_block_time_s:</th></tr>
7447 <tr class="field-even field"><td>&nbsp;</td><td class="field-body">Maximum amount of seconds we may lock</td>
7448 </tr>
7449 </tbody>
7450 </table>
7451 </dd></dl>
7452
7453 <dl class="attribute">
7454 <dt id="git.util.BlockingLockFile.__module__">
7455 <code class="descname">__module__</code><em class="property"> = 'git.util'</em><a class="headerlink" href="#git.util.BlockingLockFile.__module__" title="Permalink to this definition">¶</a></dt>
7456 <dd></dd></dl>
7457
7458 <dl class="attribute">
7459 <dt id="git.util.BlockingLockFile.__slots__">
7460 <code class="descname">__slots__</code><em class="property"> = ('_check_interval', '_max_block_time')</em><a class="headerlink" href="#git.util.BlockingLockFile.__slots__" title="Permalink to this definition">¶</a></dt>
7461 <dd></dd></dl>
7462
7463 </dd></dl>
7464
7465 <dl class="class">
7466 <dt id="git.util.LockFile">
7467 <em class="property">class </em><code class="descclassname">git.util.</code><code class="descname">LockFile</code><span class="sig-paren">(</span><em>file_path</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.LockFile" title="Permalink to this definition">¶</a></dt>
7468 <dd><p>Provides methods to obtain, check for, and release a file based lock which
7469 should be used to handle concurrent access to the same file.</p>
7470 <p>As we are a utility class to be derived from, we only use protected methods.</p>
7471 <p>Locks will automatically be released on destruction</p>
7472 <dl class="method">
7473 <dt id="git.util.LockFile.__del__">
7474 <code class="descname">__del__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.util.LockFile.__del__" title="Permalink to this definition">¶</a></dt>
7475 <dd></dd></dl>
7476
7477 <dl class="method">
7478 <dt id="git.util.LockFile.__init__">
7479 <code class="descname">__init__</code><span class="sig-paren">(</span><em>file_path</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.LockFile.__init__" title="Permalink to this definition">¶</a></dt>
7480 <dd></dd></dl>
7481
7482 <dl class="attribute">
7483 <dt id="git.util.LockFile.__module__">
7484 <code class="descname">__module__</code><em class="property"> = 'git.util'</em><a class="headerlink" href="#git.util.LockFile.__module__" title="Permalink to this definition">¶</a></dt>
7485 <dd></dd></dl>
7486
7487 <dl class="attribute">
7488 <dt id="git.util.LockFile.__slots__">
7489 <code class="descname">__slots__</code><em class="property"> = ('_file_path', '_owns_lock')</em><a class="headerlink" href="#git.util.LockFile.__slots__" title="Permalink to this definition">¶</a></dt>
7490 <dd></dd></dl>
7491
7492 </dd></dl>
7493
7494 <dl class="class">
7495 <dt id="git.util.Actor">
7496 <em class="property">class </em><code class="descclassname">git.util.</code><code class="descname">Actor</code><span class="sig-paren">(</span><em>name</em>, <em>email</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.Actor" title="Permalink to this definition">¶</a></dt>
7497 <dd><p>Actors hold information about a person acting on the repository. They
7498 can be committers and authors or anything with a name and an email as
7499 mentioned in the git log entries.</p>
7500 <dl class="method">
7501 <dt id="git.util.Actor.__eq__">
7502 <code class="descname">__eq__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.Actor.__eq__" title="Permalink to this definition">¶</a></dt>
7503 <dd></dd></dl>
7504
7505 <dl class="method">
7506 <dt id="git.util.Actor.__hash__">
7507 <code class="descname">__hash__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.util.Actor.__hash__" title="Permalink to this definition">¶</a></dt>
7508 <dd></dd></dl>
7509
7510 <dl class="method">
7511 <dt id="git.util.Actor.__init__">
7512 <code class="descname">__init__</code><span class="sig-paren">(</span><em>name</em>, <em>email</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.Actor.__init__" title="Permalink to this definition">¶</a></dt>
7513 <dd></dd></dl>
7514
7515 <dl class="attribute">
7516 <dt id="git.util.Actor.__module__">
7517 <code class="descname">__module__</code><em class="property"> = 'git.util'</em><a class="headerlink" href="#git.util.Actor.__module__" title="Permalink to this definition">¶</a></dt>
7518 <dd></dd></dl>
7519
7520 <dl class="method">
7521 <dt id="git.util.Actor.__ne__">
7522 <code class="descname">__ne__</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.Actor.__ne__" title="Permalink to this definition">¶</a></dt>
7523 <dd></dd></dl>
7524
7525 <dl class="method">
7526 <dt id="git.util.Actor.__repr__">
7527 <code class="descname">__repr__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.util.Actor.__repr__" title="Permalink to this definition">¶</a></dt>
7528 <dd></dd></dl>
7529
7530 <dl class="attribute">
7531 <dt id="git.util.Actor.__slots__">
7532 <code class="descname">__slots__</code><em class="property"> = ('name', 'email')</em><a class="headerlink" href="#git.util.Actor.__slots__" title="Permalink to this definition">¶</a></dt>
7533 <dd></dd></dl>
7534
7535 <dl class="method">
7536 <dt id="git.util.Actor.__str__">
7537 <code class="descname">__str__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.util.Actor.__str__" title="Permalink to this definition">¶</a></dt>
7538 <dd></dd></dl>
7539
7540 <dl class="classmethod">
7541 <dt id="git.util.Actor.author">
7542 <em class="property">classmethod </em><code class="descname">author</code><span class="sig-paren">(</span><em>config_reader=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.Actor.author" title="Permalink to this definition">¶</a></dt>
7543 <dd><p>Same as committer(), but defines the main author. It may be specified in the environment,
7544 but defaults to the committer</p>
7545 </dd></dl>
7546
7547 <dl class="classmethod">
7548 <dt id="git.util.Actor.committer">
7549 <em class="property">classmethod </em><code class="descname">committer</code><span class="sig-paren">(</span><em>config_reader=None</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.Actor.committer" title="Permalink to this definition">¶</a></dt>
7550 <dd><table class="docutils field-list" frame="void" rules="none">
7551 <col class="field-name" />
7552 <col class="field-body" />
7553 <tbody valign="top">
7554 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Actor instance corresponding to the configured committer. It behaves
7555 similar to the git implementation, such that the environment will override
7556 configuration values of config_reader. If no value is set at all, it will be
7557 generated</td>
7558 </tr>
7559 <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><strong>config_reader</strong> &#8211; ConfigReader to use to retrieve the values from in case
7560 they are not set in the environment</td>
7561 </tr>
7562 </tbody>
7563 </table>
7564 </dd></dl>
7565
7566 <dl class="attribute">
7567 <dt id="git.util.Actor.conf_email">
7568 <code class="descname">conf_email</code><em class="property"> = 'email'</em><a class="headerlink" href="#git.util.Actor.conf_email" title="Permalink to this definition">¶</a></dt>
7569 <dd></dd></dl>
7570
7571 <dl class="attribute">
7572 <dt id="git.util.Actor.conf_name">
7573 <code class="descname">conf_name</code><em class="property"> = 'name'</em><a class="headerlink" href="#git.util.Actor.conf_name" title="Permalink to this definition">¶</a></dt>
7574 <dd></dd></dl>
7575
7576 <dl class="attribute">
7577 <dt id="git.util.Actor.email">
7578 <code class="descname">email</code><a class="headerlink" href="#git.util.Actor.email" title="Permalink to this definition">¶</a></dt>
7579 <dd></dd></dl>
7580
7581 <dl class="attribute">
7582 <dt id="git.util.Actor.env_author_email">
7583 <code class="descname">env_author_email</code><em class="property"> = 'GIT_AUTHOR_EMAIL'</em><a class="headerlink" href="#git.util.Actor.env_author_email" title="Permalink to this definition">¶</a></dt>
7584 <dd></dd></dl>
7585
7586 <dl class="attribute">
7587 <dt id="git.util.Actor.env_author_name">
7588 <code class="descname">env_author_name</code><em class="property"> = 'GIT_AUTHOR_NAME'</em><a class="headerlink" href="#git.util.Actor.env_author_name" title="Permalink to this definition">¶</a></dt>
7589 <dd></dd></dl>
7590
7591 <dl class="attribute">
7592 <dt id="git.util.Actor.env_committer_email">
7593 <code class="descname">env_committer_email</code><em class="property"> = 'GIT_COMMITTER_EMAIL'</em><a class="headerlink" href="#git.util.Actor.env_committer_email" title="Permalink to this definition">¶</a></dt>
7594 <dd></dd></dl>
7595
7596 <dl class="attribute">
7597 <dt id="git.util.Actor.env_committer_name">
7598 <code class="descname">env_committer_name</code><em class="property"> = 'GIT_COMMITTER_NAME'</em><a class="headerlink" href="#git.util.Actor.env_committer_name" title="Permalink to this definition">¶</a></dt>
7599 <dd></dd></dl>
7600
7601 <dl class="attribute">
7602 <dt id="git.util.Actor.name">
7603 <code class="descname">name</code><a class="headerlink" href="#git.util.Actor.name" title="Permalink to this definition">¶</a></dt>
7604 <dd></dd></dl>
7605
7606 <dl class="attribute">
7607 <dt id="git.util.Actor.name_email_regex">
7608 <code class="descname">name_email_regex</code><em class="property"> = &lt;_sre.SRE_Pattern object&gt;</em><a class="headerlink" href="#git.util.Actor.name_email_regex" title="Permalink to this definition">¶</a></dt>
7609 <dd></dd></dl>
7610
7611 <dl class="attribute">
7612 <dt id="git.util.Actor.name_only_regex">
7613 <code class="descname">name_only_regex</code><em class="property"> = &lt;_sre.SRE_Pattern object&gt;</em><a class="headerlink" href="#git.util.Actor.name_only_regex" title="Permalink to this definition">¶</a></dt>
7614 <dd></dd></dl>
7615
7616 </dd></dl>
7617
7618 <dl class="function">
7619 <dt id="git.util.get_user_id">
7620 <code class="descclassname">git.util.</code><code class="descname">get_user_id</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.util.get_user_id" title="Permalink to this definition">¶</a></dt>
7621 <dd><table class="docutils field-list" frame="void" rules="none">
7622 <col class="field-name" />
7623 <col class="field-body" />
7624 <tbody valign="top">
7625 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">string identifying the currently active system user as <a class="reference external" href="mailto:name&#37;&#52;&#48;node">name<span>&#64;</span>node</a></td>
7626 </tr>
7627 </tbody>
7628 </table>
7629 </dd></dl>
7630
7631 <dl class="function">
7632 <dt id="git.util.assure_directory_exists">
7633 <code class="descclassname">git.util.</code><code class="descname">assure_directory_exists</code><span class="sig-paren">(</span><em>path</em>, <em>is_file=False</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.assure_directory_exists" title="Permalink to this definition">¶</a></dt>
7634 <dd><p>Assure that the directory pointed to by path exists.</p>
7635 <table class="docutils field-list" frame="void" rules="none">
7636 <col class="field-name" />
7637 <col class="field-body" />
7638 <tbody valign="top">
7639 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>is_file</strong> &#8211; If True, path is assumed to be a file and handled correctly.
7640 Otherwise it must be a directory</td>
7641 </tr>
7642 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">True if the directory was created, False if it already existed</td>
7643 </tr>
7644 </tbody>
7645 </table>
7646 </dd></dl>
7647
7648 <dl class="class">
7649 <dt id="git.util.RemoteProgress">
7650 <em class="property">class </em><code class="descclassname">git.util.</code><code class="descname">RemoteProgress</code><a class="headerlink" href="#git.util.RemoteProgress" title="Permalink to this definition">¶</a></dt>
7651 <dd><p>Handler providing an interface to parse progress information emitted by git-push
7652 and git-fetch and to dispatch callbacks allowing subclasses to react to the progress.</p>
7653 <dl class="attribute">
7654 <dt id="git.util.RemoteProgress.BEGIN">
7655 <code class="descname">BEGIN</code><em class="property"> = 1</em><a class="headerlink" href="#git.util.RemoteProgress.BEGIN" title="Permalink to this definition">¶</a></dt>
7656 <dd></dd></dl>
7657
7658 <dl class="attribute">
7659 <dt id="git.util.RemoteProgress.CHECKING_OUT">
7660 <code class="descname">CHECKING_OUT</code><em class="property"> = 256</em><a class="headerlink" href="#git.util.RemoteProgress.CHECKING_OUT" title="Permalink to this definition">¶</a></dt>
7661 <dd></dd></dl>
7662
7663 <dl class="attribute">
7664 <dt id="git.util.RemoteProgress.COMPRESSING">
7665 <code class="descname">COMPRESSING</code><em class="property"> = 8</em><a class="headerlink" href="#git.util.RemoteProgress.COMPRESSING" title="Permalink to this definition">¶</a></dt>
7666 <dd></dd></dl>
7667
7668 <dl class="attribute">
7669 <dt id="git.util.RemoteProgress.COUNTING">
7670 <code class="descname">COUNTING</code><em class="property"> = 4</em><a class="headerlink" href="#git.util.RemoteProgress.COUNTING" title="Permalink to this definition">¶</a></dt>
7671 <dd></dd></dl>
7672
7673 <dl class="attribute">
7674 <dt id="git.util.RemoteProgress.DONE_TOKEN">
7675 <code class="descname">DONE_TOKEN</code><em class="property"> = 'done.'</em><a class="headerlink" href="#git.util.RemoteProgress.DONE_TOKEN" title="Permalink to this definition">¶</a></dt>
7676 <dd></dd></dl>
7677
7678 <dl class="attribute">
7679 <dt id="git.util.RemoteProgress.END">
7680 <code class="descname">END</code><em class="property"> = 2</em><a class="headerlink" href="#git.util.RemoteProgress.END" title="Permalink to this definition">¶</a></dt>
7681 <dd></dd></dl>
7682
7683 <dl class="attribute">
7684 <dt id="git.util.RemoteProgress.FINDING_SOURCES">
7685 <code class="descname">FINDING_SOURCES</code><em class="property"> = 128</em><a class="headerlink" href="#git.util.RemoteProgress.FINDING_SOURCES" title="Permalink to this definition">¶</a></dt>
7686 <dd></dd></dl>
7687
7688 <dl class="attribute">
7689 <dt id="git.util.RemoteProgress.OP_MASK">
7690 <code class="descname">OP_MASK</code><em class="property"> = -4</em><a class="headerlink" href="#git.util.RemoteProgress.OP_MASK" title="Permalink to this definition">¶</a></dt>
7691 <dd></dd></dl>
7692
7693 <dl class="attribute">
7694 <dt id="git.util.RemoteProgress.RECEIVING">
7695 <code class="descname">RECEIVING</code><em class="property"> = 32</em><a class="headerlink" href="#git.util.RemoteProgress.RECEIVING" title="Permalink to this definition">¶</a></dt>
7696 <dd></dd></dl>
7697
7698 <dl class="attribute">
7699 <dt id="git.util.RemoteProgress.RESOLVING">
7700 <code class="descname">RESOLVING</code><em class="property"> = 64</em><a class="headerlink" href="#git.util.RemoteProgress.RESOLVING" title="Permalink to this definition">¶</a></dt>
7701 <dd></dd></dl>
7702
7703 <dl class="attribute">
7704 <dt id="git.util.RemoteProgress.STAGE_MASK">
7705 <code class="descname">STAGE_MASK</code><em class="property"> = 3</em><a class="headerlink" href="#git.util.RemoteProgress.STAGE_MASK" title="Permalink to this definition">¶</a></dt>
7706 <dd></dd></dl>
7707
7708 <dl class="attribute">
7709 <dt id="git.util.RemoteProgress.TOKEN_SEPARATOR">
7710 <code class="descname">TOKEN_SEPARATOR</code><em class="property"> = ', '</em><a class="headerlink" href="#git.util.RemoteProgress.TOKEN_SEPARATOR" title="Permalink to this definition">¶</a></dt>
7711 <dd></dd></dl>
7712
7713 <dl class="attribute">
7714 <dt id="git.util.RemoteProgress.WRITING">
7715 <code class="descname">WRITING</code><em class="property"> = 16</em><a class="headerlink" href="#git.util.RemoteProgress.WRITING" title="Permalink to this definition">¶</a></dt>
7716 <dd></dd></dl>
7717
7718 <dl class="method">
7719 <dt id="git.util.RemoteProgress.__init__">
7720 <code class="descname">__init__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.util.RemoteProgress.__init__" title="Permalink to this definition">¶</a></dt>
7721 <dd></dd></dl>
7722
7723 <dl class="attribute">
7724 <dt id="git.util.RemoteProgress.__module__">
7725 <code class="descname">__module__</code><em class="property"> = 'git.util'</em><a class="headerlink" href="#git.util.RemoteProgress.__module__" title="Permalink to this definition">¶</a></dt>
7726 <dd></dd></dl>
7727
7728 <dl class="attribute">
7729 <dt id="git.util.RemoteProgress.__slots__">
7730 <code class="descname">__slots__</code><em class="property"> = ('_cur_line', '_seen_ops', '_error_lines')</em><a class="headerlink" href="#git.util.RemoteProgress.__slots__" title="Permalink to this definition">¶</a></dt>
7731 <dd></dd></dl>
7732
7733 <dl class="method">
7734 <dt id="git.util.RemoteProgress.error_lines">
7735 <code class="descname">error_lines</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.util.RemoteProgress.error_lines" title="Permalink to this definition">¶</a></dt>
7736 <dd><p>Returns all lines that started with error: or fatal:</p>
7737 </dd></dl>
7738
7739 <dl class="method">
7740 <dt id="git.util.RemoteProgress.line_dropped">
7741 <code class="descname">line_dropped</code><span class="sig-paren">(</span><em>line</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.RemoteProgress.line_dropped" title="Permalink to this definition">¶</a></dt>
7742 <dd><p>Called whenever a line could not be understood and was therefore dropped.</p>
7743 </dd></dl>
7744
7745 <dl class="method">
7746 <dt id="git.util.RemoteProgress.new_message_handler">
7747 <code class="descname">new_message_handler</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.util.RemoteProgress.new_message_handler" title="Permalink to this definition">¶</a></dt>
7748 <dd><table class="docutils field-list" frame="void" rules="none">
7749 <col class="field-name" />
7750 <col class="field-body" />
7751 <tbody valign="top">
7752 <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">a progress handler suitable for handle_process_output(), passing lines on to this Progress
7753 handler in a suitable format</td>
7754 </tr>
7755 </tbody>
7756 </table>
7757 </dd></dl>
7758
7759 <dl class="attribute">
7760 <dt id="git.util.RemoteProgress.re_op_absolute">
7761 <code class="descname">re_op_absolute</code><em class="property"> = &lt;_sre.SRE_Pattern object&gt;</em><a class="headerlink" href="#git.util.RemoteProgress.re_op_absolute" title="Permalink to this definition">¶</a></dt>
7762 <dd></dd></dl>
7763
7764 <dl class="attribute">
7765 <dt id="git.util.RemoteProgress.re_op_relative">
7766 <code class="descname">re_op_relative</code><em class="property"> = &lt;_sre.SRE_Pattern object&gt;</em><a class="headerlink" href="#git.util.RemoteProgress.re_op_relative" title="Permalink to this definition">¶</a></dt>
7767 <dd></dd></dl>
7768
7769 <dl class="method">
7770 <dt id="git.util.RemoteProgress.update">
7771 <code class="descname">update</code><span class="sig-paren">(</span><em>op_code</em>, <em>cur_count</em>, <em>max_count=None</em>, <em>message=''</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.RemoteProgress.update" title="Permalink to this definition">¶</a></dt>
7772 <dd><p>Called whenever the progress changes</p>
7773 <table class="docutils field-list" frame="void" rules="none">
7774 <col class="field-name" />
7775 <col class="field-body" />
7776 <tbody valign="top">
7777 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
7778 <li><strong>op_code</strong> &#8211; <p>Integer allowing to be compared against Operation IDs and stage IDs.</p>
7779 <p>Stage IDs are BEGIN and END. BEGIN will only be set once for each Operation
7780 ID as well as END. It may be that BEGIN and END are set at once in case only
7781 one progress message was emitted due to the speed of the operation.
7782 Between BEGIN and END, none of these flags will be set</p>
7783 <p>Operation IDs are all held within the OP_MASK. Only one Operation ID will
7784 be active per call.</p>
7785 </li>
7786 <li><strong>cur_count</strong> &#8211; Current absolute count of items</li>
7787 <li><strong>max_count</strong> &#8211; The maximum count of items we expect. It may be None in case there is
7788 no maximum number of items or if it is (yet) unknown.</li>
7789 <li><strong>message</strong> &#8211; In case of the &#8216;WRITING&#8217; operation, it contains the amount of bytes
7790 transferred. It may possibly be used for other purposes as well.</li>
7791 </ul>
7792 </td>
7793 </tr>
7794 </tbody>
7795 </table>
7796 <p>You may read the contents of the current line in self._cur_line</p>
7797 </dd></dl>
7798
7799 <dl class="attribute">
7800 <dt id="git.util.RemoteProgress.x">
7801 <code class="descname">x</code><em class="property"> = 8</em><a class="headerlink" href="#git.util.RemoteProgress.x" title="Permalink to this definition">¶</a></dt>
7802 <dd></dd></dl>
7803
7804 </dd></dl>
7805
7806 <dl class="class">
7807 <dt id="git.util.CallableRemoteProgress">
7808 <em class="property">class </em><code class="descclassname">git.util.</code><code class="descname">CallableRemoteProgress</code><span class="sig-paren">(</span><em>fn</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.CallableRemoteProgress" title="Permalink to this definition">¶</a></dt>
7809 <dd><p>An implementation forwarding updates to any callable</p>
7810 <dl class="method">
7811 <dt id="git.util.CallableRemoteProgress.__init__">
7812 <code class="descname">__init__</code><span class="sig-paren">(</span><em>fn</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.CallableRemoteProgress.__init__" title="Permalink to this definition">¶</a></dt>
7813 <dd></dd></dl>
7814
7815 <dl class="attribute">
7816 <dt id="git.util.CallableRemoteProgress.__module__">
7817 <code class="descname">__module__</code><em class="property"> = 'git.util'</em><a class="headerlink" href="#git.util.CallableRemoteProgress.__module__" title="Permalink to this definition">¶</a></dt>
7818 <dd></dd></dl>
7819
7820 <dl class="attribute">
7821 <dt id="git.util.CallableRemoteProgress.__slots__">
7822 <code class="descname">__slots__</code><em class="property"> = '_callable'</em><a class="headerlink" href="#git.util.CallableRemoteProgress.__slots__" title="Permalink to this definition">¶</a></dt>
7823 <dd></dd></dl>
7824
7825 <dl class="method">
7826 <dt id="git.util.CallableRemoteProgress.update">
7827 <code class="descname">update</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.CallableRemoteProgress.update" title="Permalink to this definition">¶</a></dt>
7828 <dd></dd></dl>
7829
7830 </dd></dl>
7831
7832 <dl class="function">
7833 <dt id="git.util.rmtree">
7834 <code class="descclassname">git.util.</code><code class="descname">rmtree</code><span class="sig-paren">(</span><em>path</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.rmtree" title="Permalink to this definition">¶</a></dt>
7835 <dd><p>Remove the given recursively.</p>
7836 <table class="docutils field-list" frame="void" rules="none">
7837 <col class="field-name" />
7838 <col class="field-body" />
7839 <tbody valign="top">
7840 <tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">we use shutil rmtree but adjust its behaviour to see whether files that
7841 couldn&#8217;t be deleted are read-only. Windows will not remove them in that case</td>
7842 </tr>
7843 </tbody>
7844 </table>
7845 </dd></dl>
7846
7847 <dl class="class">
7848 <dt id="git.util.WaitGroup">
7849 <em class="property">class </em><code class="descclassname">git.util.</code><code class="descname">WaitGroup</code><a class="headerlink" href="#git.util.WaitGroup" title="Permalink to this definition">¶</a></dt>
7850 <dd><p>WaitGroup is like Go sync.WaitGroup.</p>
7851 <p>Without all the useful corner cases.
7852 By Peter Teichman, taken from <a class="reference external" href="https://gist.github.com/pteichman/84b92ae7cef0ab98f5a8">https://gist.github.com/pteichman/84b92ae7cef0ab98f5a8</a></p>
7853 <dl class="attribute">
7854 <dt id="git.util.WaitGroup.__dict__">
7855 <code class="descname">__dict__</code><em class="property"> = dict_proxy({'__module__': 'git.util', 'done': &lt;function done at 0x10fdf6c80&gt;, '__dict__': &lt;attribute '__dict__' of 'WaitGroup' objects&gt;, 'wait': &lt;function wait at 0x10fdf6cf8&gt;, '__weakref__': &lt;attribute '__weakref__' of 'WaitGroup' objects&gt;, 'add': &lt;function add at 0x10fdf6c08&gt;, '__init__': &lt;function __init__ at 0x10fdf6b90&gt;, '__doc__': 'WaitGroup is like Go sync.WaitGroup.\n\n Without all the useful corner cases.\n By Peter Teichman, taken from https://gist.github.com/pteichman/84b92ae7cef0ab98f5a8\n '})</em><a class="headerlink" href="#git.util.WaitGroup.__dict__" title="Permalink to this definition">¶</a></dt>
7856 <dd></dd></dl>
7857
7858 <dl class="method">
7859 <dt id="git.util.WaitGroup.__init__">
7860 <code class="descname">__init__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.util.WaitGroup.__init__" title="Permalink to this definition">¶</a></dt>
7861 <dd></dd></dl>
7862
7863 <dl class="attribute">
7864 <dt id="git.util.WaitGroup.__module__">
7865 <code class="descname">__module__</code><em class="property"> = 'git.util'</em><a class="headerlink" href="#git.util.WaitGroup.__module__" title="Permalink to this definition">¶</a></dt>
7866 <dd></dd></dl>
7867
7868 <dl class="attribute">
7869 <dt id="git.util.WaitGroup.__weakref__">
7870 <code class="descname">__weakref__</code><a class="headerlink" href="#git.util.WaitGroup.__weakref__" title="Permalink to this definition">¶</a></dt>
7871 <dd><p>list of weak references to the object (if defined)</p>
7872 </dd></dl>
7873
7874 <dl class="method">
7875 <dt id="git.util.WaitGroup.add">
7876 <code class="descname">add</code><span class="sig-paren">(</span><em>n</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.WaitGroup.add" title="Permalink to this definition">¶</a></dt>
7877 <dd></dd></dl>
7878
7879 <dl class="method">
7880 <dt id="git.util.WaitGroup.done">
7881 <code class="descname">done</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#git.util.WaitGroup.done" title="Permalink to this definition">¶</a></dt>
7882 <dd></dd></dl>
7883
7884 <dl class="method">
7885 <dt id="git.util.WaitGroup.wait">
7886 <code class="descname">wait</code><span class="sig-paren">(</span><em>stderr=''</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.WaitGroup.wait" title="Permalink to this definition">¶</a></dt>
7887 <dd></dd></dl>
7888
7889 </dd></dl>
7890
7891 <dl class="function">
7892 <dt id="git.util.unbare_repo">
7893 <code class="descclassname">git.util.</code><code class="descname">unbare_repo</code><span class="sig-paren">(</span><em>func</em><span class="sig-paren">)</span><a class="headerlink" href="#git.util.unbare_repo" title="Permalink to this definition">¶</a></dt>
7894 <dd><p>Methods with this decorator raise InvalidGitRepositoryError if they
7895 encounter a bare repository</p>
7896 </dd></dl>
7897
7898 </div>
7899 </div>
7900
7901
7902 </div>
7903 </div>
7904 </div>
7905 <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
7906 <div class="sphinxsidebarwrapper">
7907 <h3><a href="index.html">Table Of Contents</a></h3>
7908 <ul>
7909 <li><a class="reference internal" href="#">API Reference</a><ul>
7910 <li><a class="reference internal" href="#module-git.objects.base">Objects.Base</a></li>
7911 <li><a class="reference internal" href="#module-git.objects.blob">Objects.Blob</a></li>
7912 <li><a class="reference internal" href="#module-git.objects.commit">Objects.Commit</a></li>
7913 <li><a class="reference internal" href="#module-git.objects.tag">Objects.Tag</a></li>
7914 <li><a class="reference internal" href="#module-git.objects.tree">Objects.Tree</a></li>
7915 <li><a class="reference internal" href="#module-git.objects.fun">Objects.Functions</a></li>
7916 <li><a class="reference internal" href="#module-git.objects.submodule.base">Objects.Submodule.base</a></li>
7917 <li><a class="reference internal" href="#module-git.objects.submodule.root">Objects.Submodule.root</a></li>
7918 <li><a class="reference internal" href="#module-git.objects.submodule.util">Objects.Submodule.util</a></li>
7919 <li><a class="reference internal" href="#module-git.objects.util">Objects.Util</a></li>
7920 <li><a class="reference internal" href="#module-git.index.base">Index.Base</a></li>
7921 <li><a class="reference internal" href="#module-git.index.fun">Index.Functions</a></li>
7922 <li><a class="reference internal" href="#module-git.index.typ">Index.Types</a></li>
7923 <li><a class="reference internal" href="#module-git.index.util">Index.Util</a></li>
7924 <li><a class="reference internal" href="#module-git.cmd">GitCmd</a></li>
7925 <li><a class="reference internal" href="#module-git.config">Config</a></li>
7926 <li><a class="reference internal" href="#module-git.diff">Diff</a></li>
7927 <li><a class="reference internal" href="#module-git.exc">Exceptions</a></li>
7928 <li><a class="reference internal" href="#module-git.refs.symbolic">Refs.symbolic</a></li>
7929 <li><a class="reference internal" href="#module-git.refs.reference">Refs.reference</a></li>
7930 <li><a class="reference internal" href="#module-git.refs.head">Refs.head</a></li>
7931 <li><a class="reference internal" href="#module-git.refs.tag">Refs.tag</a></li>
7932 <li><a class="reference internal" href="#module-git.refs.remote">Refs.remote</a></li>
7933 <li><a class="reference internal" href="#module-git.refs.log">Refs.log</a></li>
7934 <li><a class="reference internal" href="#module-git.remote">Remote</a></li>
7935 <li><a class="reference internal" href="#module-git.repo.base">Repo.Base</a></li>
7936 <li><a class="reference internal" href="#module-git.repo.fun">Repo.Functions</a></li>
7937 <li><a class="reference internal" href="#util">Util</a></li>
7938 </ul>
7939 </li>
7940 </ul>
7941 <div class="relations">
7942 <h3>Related Topics</h3>
7943 <ul>
7944 <li><a href="index.html">Documentation overview</a><ul>
7945 <li>Previous: <a href="tutorial.html" title="previous chapter">GitPython Tutorial</a></li>
7946 <li>Next: <a href="roadmap.html" title="next chapter">Roadmap</a></li>
7947 </ul></li>
7948 </ul>
7949 </div>
7950 <div role="note" aria-label="source link">
7951 <h3>This Page</h3>
7952 <ul class="this-page-menu">
7953 <li><a href="_sources/reference.txt"
7954 rel="nofollow">Show Source</a></li>
7955 </ul>
7956 </div>
7957 <div id="searchbox" style="display: none" role="search">
7958 <h3>Quick search</h3>
7959 <form class="search" action="search.html" method="get">
7960 <input type="text" name="q" />
7961 <input type="submit" value="Go" />
7962 <input type="hidden" name="check_keywords" value="yes" />
7963 <input type="hidden" name="area" value="default" />
7964 </form>
7965 </div>
7966 <script type="text/javascript">$('#searchbox').show(0);</script>
7967 </div>
7968 </div>
7969 <div class="clearer"></div>
7970 </div>
7971 <div class="footer">
7972 &copy;Copyright (C) 2008, 2009 Michael Trier and contributors, 2010-2015 Sebastian Thiel.
7973
7974 |
7975 Powered by <a href="http://sphinx-doc.org/">Sphinx 1.4.1</a>
7976 &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.7</a>
7977
7978 |
7979 <a href="_sources/reference.txt"
7980 rel="nofollow">Page source</a>
7981 </div>
7982
7983
7984
7985
7986 </body>
7987 </html>
+0
-99
doc/build/html/roadmap.html less more
0 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
1 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
3
4 <html xmlns="http://www.w3.org/1999/xhtml">
5 <head>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
8 <title>Roadmap &mdash; GitPython 2.0.9dev0 documentation</title>
9
10 <link rel="stylesheet" href="_static/default.css" type="text/css" />
11 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
12
13 <script type="text/javascript">
14 var DOCUMENTATION_OPTIONS = {
15 URL_ROOT: './',
16 VERSION: '2.0.9dev0',
17 COLLAPSE_INDEX: false,
18 FILE_SUFFIX: '.html',
19 HAS_SOURCE: true
20 };
21 </script>
22 <script type="text/javascript" src="_static/jquery.js"></script>
23 <script type="text/javascript" src="_static/underscore.js"></script>
24 <script type="text/javascript" src="_static/doctools.js"></script>
25 <link rel="top" title="GitPython 2.0.9dev0 documentation" href="index.html" />
26 <link rel="next" title="Changelog" href="changes.html" />
27 <link rel="prev" title="API Reference" href="reference.html" />
28
29
30 <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
31
32 </head>
33 <body role="document">
34
35 <div class="document">
36 <div class="documentwrapper">
37 <div class="bodywrapper">
38 <div class="body" role="main">
39
40 <div class="section" id="roadmap">
41 <h1>Roadmap<a class="headerlink" href="#roadmap" title="Permalink to this headline">¶</a></h1>
42 <p>The full list of milestones including associated tasks can be found on github:
43 <a class="reference external" href="https://github.com/gitpython-developers/GitPython/issues">https://github.com/gitpython-developers/GitPython/issues</a></p>
44 <p>Select the respective milestone to filter the list of issues accordingly.</p>
45 </div>
46
47
48 </div>
49 </div>
50 </div>
51 <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
52 <div class="sphinxsidebarwrapper"><div class="relations">
53 <h3>Related Topics</h3>
54 <ul>
55 <li><a href="index.html">Documentation overview</a><ul>
56 <li>Previous: <a href="reference.html" title="previous chapter">API Reference</a></li>
57 <li>Next: <a href="changes.html" title="next chapter">Changelog</a></li>
58 </ul></li>
59 </ul>
60 </div>
61 <div role="note" aria-label="source link">
62 <h3>This Page</h3>
63 <ul class="this-page-menu">
64 <li><a href="_sources/roadmap.txt"
65 rel="nofollow">Show Source</a></li>
66 </ul>
67 </div>
68 <div id="searchbox" style="display: none" role="search">
69 <h3>Quick search</h3>
70 <form class="search" action="search.html" method="get">
71 <input type="text" name="q" />
72 <input type="submit" value="Go" />
73 <input type="hidden" name="check_keywords" value="yes" />
74 <input type="hidden" name="area" value="default" />
75 </form>
76 </div>
77 <script type="text/javascript">$('#searchbox').show(0);</script>
78 </div>
79 </div>
80 <div class="clearer"></div>
81 </div>
82 <div class="footer">
83 &copy;Copyright (C) 2008, 2009 Michael Trier and contributors, 2010-2015 Sebastian Thiel.
84
85 |
86 Powered by <a href="http://sphinx-doc.org/">Sphinx 1.4.1</a>
87 &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.7</a>
88
89 |
90 <a href="_sources/roadmap.txt"
91 rel="nofollow">Page source</a>
92 </div>
93
94
95
96
97 </body>
98 </html>
+0
-99
doc/build/html/search.html less more
0 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
1 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
3
4 <html xmlns="http://www.w3.org/1999/xhtml">
5 <head>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
8 <title>Search &mdash; GitPython 2.0.9dev0 documentation</title>
9
10 <link rel="stylesheet" href="_static/default.css" type="text/css" />
11 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
12
13 <script type="text/javascript">
14 var DOCUMENTATION_OPTIONS = {
15 URL_ROOT: './',
16 VERSION: '2.0.9dev0',
17 COLLAPSE_INDEX: false,
18 FILE_SUFFIX: '.html',
19 HAS_SOURCE: true
20 };
21 </script>
22 <script type="text/javascript" src="_static/jquery.js"></script>
23 <script type="text/javascript" src="_static/underscore.js"></script>
24 <script type="text/javascript" src="_static/doctools.js"></script>
25 <script type="text/javascript" src="_static/searchtools.js"></script>
26 <link rel="top" title="GitPython 2.0.9dev0 documentation" href="index.html" />
27 <script type="text/javascript">
28 jQuery(function() { Search.loadIndex("searchindex.js"); });
29 </script>
30
31 <script type="text/javascript" id="searchindexloader"></script>
32
33
34
35 <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
36
37
38 </head>
39 <body role="document">
40
41 <div class="document">
42 <div class="documentwrapper">
43 <div class="bodywrapper">
44 <div class="body" role="main">
45
46 <h1 id="search-documentation">Search</h1>
47 <div id="fallback" class="admonition warning">
48 <script type="text/javascript">$('#fallback').hide();</script>
49 <p>
50 Please activate JavaScript to enable the search
51 functionality.
52 </p>
53 </div>
54 <p>
55 From here you can search these documents. Enter your search
56 words into the box below and click "search". Note that the search
57 function will automatically search for all of the words. Pages
58 containing fewer words won't appear in the result list.
59 </p>
60 <form action="" method="get">
61 <input type="text" name="q" value="" />
62 <input type="submit" value="search" />
63 <span id="search-progress" style="padding-left: 10px"></span>
64 </form>
65
66 <div id="search-results">
67
68 </div>
69
70 </div>
71 </div>
72 </div>
73 <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
74 <div class="sphinxsidebarwrapper"><div class="relations">
75 <h3>Related Topics</h3>
76 <ul>
77 <li><a href="index.html">Documentation overview</a><ul>
78 </ul></li>
79 </ul>
80 </div>
81 </div>
82 </div>
83 <div class="clearer"></div>
84 </div>
85 <div class="footer">
86 &copy;Copyright (C) 2008, 2009 Michael Trier and contributors, 2010-2015 Sebastian Thiel.
87
88 |
89 Powered by <a href="http://sphinx-doc.org/">Sphinx 1.4.1</a>
90 &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.7</a>
91
92 </div>
93
94
95
96
97 </body>
98 </html>
+0
-1
doc/build/html/searchindex.js less more
0 Search.setIndex({envversion:47,filenames:["changes","index","intro","reference","roadmap","tutorial"],objects:{"git.cmd":{Git:[3,1,1,""]},"git.cmd.Git":{"__call__":[3,2,1,""],"__getattr__":[3,2,1,""],"__getstate__":[3,2,1,""],"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__setstate__":[3,2,1,""],"__slots__":[3,3,1,""],AutoInterrupt:[3,1,1,""],CREATE_NO_WINDOW:[3,3,1,""],CatFileContentStream:[3,1,1,""],GIT_PYTHON_GIT_EXECUTABLE:[3,3,1,""],GIT_PYTHON_TRACE:[3,3,1,""],USE_SHELL:[3,3,1,""],cat_file_all:[3,3,1,""],cat_file_header:[3,3,1,""],clear_cache:[3,2,1,""],custom_environment:[3,2,1,""],environment:[3,2,1,""],execute:[3,2,1,""],get_object_data:[3,2,1,""],get_object_header:[3,2,1,""],git_exec_name:[3,3,1,""],git_exec_name_win:[3,3,1,""],max_chunk_size:[3,3,1,""],stream_object_data:[3,2,1,""],transform_kwarg:[3,2,1,""],transform_kwargs:[3,2,1,""],update_environment:[3,2,1,""],version_info:[3,3,1,""],working_dir:[3,3,1,""]},"git.cmd.Git.AutoInterrupt":{"__del__":[3,2,1,""],"__getattr__":[3,2,1,""],"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__slots__":[3,3,1,""],args:[3,3,1,""],proc:[3,3,1,""],wait:[3,2,1,""]},"git.cmd.Git.CatFileContentStream":{"__del__":[3,2,1,""],"__init__":[3,2,1,""],"__iter__":[3,2,1,""],"__module__":[3,3,1,""],"__slots__":[3,3,1,""],next:[3,2,1,""],read:[3,2,1,""],readline:[3,2,1,""],readlines:[3,2,1,""]},"git.config":{GitConfigParser:[3,3,1,""],SectionConstraint:[3,1,1,""]},"git.config.SectionConstraint":{"__del__":[3,2,1,""],"__enter__":[3,2,1,""],"__exit__":[3,2,1,""],"__getattr__":[3,2,1,""],"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__slots__":[3,3,1,""],config:[3,3,1,""],release:[3,2,1,""]},"git.diff":{Diff:[3,1,1,""],DiffIndex:[3,1,1,""],Diffable:[3,1,1,""]},"git.diff.Diff":{"__eq__":[3,2,1,""],"__hash__":[3,2,1,""],"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__ne__":[3,2,1,""],"__slots__":[3,3,1,""],"__str__":[3,2,1,""],NULL_BIN_SHA:[3,3,1,""],NULL_HEX_SHA:[3,3,1,""],a_blob:[3,3,1,""],a_mode:[3,3,1,""],a_path:[3,3,1,""],a_rawpath:[3,3,1,""],b_blob:[3,3,1,""],b_mode:[3,3,1,""],b_path:[3,3,1,""],b_rawpath:[3,3,1,""],change_type:[3,3,1,""],deleted_file:[3,3,1,""],diff:[3,3,1,""],new_file:[3,3,1,""],raw_rename_from:[3,3,1,""],raw_rename_to:[3,3,1,""],re_header:[3,3,1,""],rename_from:[3,3,1,""],rename_to:[3,3,1,""],renamed:[3,3,1,""],renamed_file:[3,3,1,""]},"git.diff.DiffIndex":{"__dict__":[3,3,1,""],"__module__":[3,3,1,""],"__weakref__":[3,3,1,""],change_type:[3,3,1,""],iter_change_type:[3,2,1,""]},"git.diff.Diffable":{"__module__":[3,3,1,""],"__slots__":[3,3,1,""],Index:[3,1,1,""],diff:[3,2,1,""]},"git.diff.Diffable.Index":{"__dict__":[3,3,1,""],"__module__":[3,3,1,""],"__weakref__":[3,3,1,""]},"git.exc":{CacheError:[3,4,1,""],CheckoutError:[3,4,1,""],GitCommandError:[3,4,1,""],GitCommandNotFound:[3,4,1,""],HookExecutionError:[3,4,1,""],InvalidGitRepositoryError:[3,4,1,""],NoSuchPathError:[3,4,1,""],RepositoryDirtyError:[3,4,1,""],UnmergedEntriesError:[3,4,1,""],WorkTreeRepositoryUnsupported:[3,4,1,""]},"git.exc.CacheError":{"__module__":[3,3,1,""],"__weakref__":[3,3,1,""]},"git.exc.CheckoutError":{"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__str__":[3,2,1,""],"__weakref__":[3,3,1,""]},"git.exc.GitCommandError":{"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__str__":[3,2,1,""],"__weakref__":[3,3,1,""]},"git.exc.GitCommandNotFound":{"__module__":[3,3,1,""],"__weakref__":[3,3,1,""]},"git.exc.HookExecutionError":{"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__str__":[3,2,1,""],"__weakref__":[3,3,1,""]},"git.exc.InvalidGitRepositoryError":{"__module__":[3,3,1,""],"__weakref__":[3,3,1,""]},"git.exc.NoSuchPathError":{"__module__":[3,3,1,""],"__weakref__":[3,3,1,""]},"git.exc.RepositoryDirtyError":{"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__str__":[3,2,1,""],"__weakref__":[3,3,1,""]},"git.exc.UnmergedEntriesError":{"__module__":[3,3,1,""]},"git.exc.WorkTreeRepositoryUnsupported":{"__module__":[3,3,1,""]},"git.index":{base:[3,0,0,"-"],fun:[3,0,0,"-"],typ:[3,0,0,"-"],util:[3,0,0,"-"]},"git.index.base":{CheckoutError:[3,4,1,""],IndexFile:[3,1,1,""]},"git.index.base.CheckoutError":{"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__str__":[3,2,1,""],"__weakref__":[3,3,1,""]},"git.index.base.IndexFile":{"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__slots__":[3,3,1,""],"new":[3,5,1,""],S_IFGITLINK:[3,3,1,""],add:[3,2,1,""],checkout:[3,2,1,""],commit:[3,2,1,""],diff:[3,2,1,""],entries:[3,3,1,""],entry_key:[3,5,1,""],from_tree:[3,5,1,""],iter_blobs:[3,2,1,""],merge_tree:[3,2,1,""],move:[3,2,1,""],path:[3,3,1,""],remove:[3,2,1,""],repo:[3,3,1,""],reset:[3,2,1,""],resolve_blobs:[3,2,1,""],unmerged_blobs:[3,2,1,""],update:[3,2,1,""],version:[3,3,1,""],write:[3,2,1,""],write_tree:[3,2,1,""]},"git.index.fun":{entry_key:[3,6,1,""],hook_path:[3,6,1,""],read_cache:[3,6,1,""],run_commit_hook:[3,6,1,""],stat_mode_to_index_mode:[3,6,1,""],write_cache:[3,6,1,""],write_tree_from_cache:[3,6,1,""]},"git.index.typ":{BaseIndexEntry:[3,1,1,""],BlobFilter:[3,1,1,""],IndexEntry:[3,1,1,""]},"git.index.typ.BaseIndexEntry":{"__dict__":[3,3,1,""],"__module__":[3,3,1,""],"__repr__":[3,2,1,""],"__str__":[3,2,1,""],binsha:[3,3,1,""],flags:[3,3,1,""],from_blob:[3,5,1,""],hexsha:[3,3,1,""],mode:[3,3,1,""],path:[3,3,1,""],stage:[3,3,1,""],to_blob:[3,2,1,""]},"git.index.typ.BlobFilter":{"__call__":[3,2,1,""],"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__slots__":[3,3,1,""],paths:[3,3,1,""]},"git.index.typ.IndexEntry":{"__module__":[3,3,1,""],ctime:[3,3,1,""],dev:[3,3,1,""],from_base:[3,5,1,""],from_blob:[3,5,1,""],gid:[3,3,1,""],inode:[3,3,1,""],mtime:[3,3,1,""],size:[3,3,1,""],uid:[3,3,1,""]},"git.index.util":{TemporaryFileSwap:[3,1,1,""],default_index:[3,6,1,""],git_working_dir:[3,6,1,""],post_clear_cache:[3,6,1,""]},"git.index.util.TemporaryFileSwap":{"__del__":[3,2,1,""],"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__slots__":[3,3,1,""],file_path:[3,3,1,""],tmp_file_path:[3,3,1,""]},"git.objects":{base:[3,0,0,"-"],blob:[3,0,0,"-"],commit:[3,0,0,"-"],fun:[3,0,0,"-"],tag:[3,0,0,"-"],tree:[3,0,0,"-"],util:[3,0,0,"-"]},"git.objects.base":{IndexObject:[3,1,1,""],Object:[3,1,1,""]},"git.objects.base.IndexObject":{"__hash__":[3,2,1,""],"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__slots__":[3,3,1,""],abspath:[3,3,1,""],mode:[3,3,1,""],name:[3,3,1,""],path:[3,3,1,""]},"git.objects.base.Object":{"__eq__":[3,2,1,""],"__hash__":[3,2,1,""],"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__ne__":[3,2,1,""],"__repr__":[3,2,1,""],"__slots__":[3,3,1,""],"__str__":[3,2,1,""],"new":[3,5,1,""],NULL_BIN_SHA:[3,3,1,""],NULL_HEX_SHA:[3,3,1,""],TYPES:[3,3,1,""],binsha:[3,3,1,""],data_stream:[3,3,1,""],hexsha:[3,3,1,""],new_from_sha:[3,5,1,""],repo:[3,3,1,""],size:[3,3,1,""],stream_data:[3,2,1,""],type:[3,3,1,""]},"git.objects.blob":{Blob:[3,1,1,""]},"git.objects.blob.Blob":{"__module__":[3,3,1,""],"__slots__":[3,3,1,""],DEFAULT_MIME_TYPE:[3,3,1,""],executable_mode:[3,3,1,""],file_mode:[3,3,1,""],link_mode:[3,3,1,""],mime_type:[3,3,1,""],type:[3,3,1,""]},"git.objects.commit":{Commit:[3,1,1,""]},"git.objects.commit.Commit":{"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__slots__":[3,3,1,""],author:[3,3,1,""],author_tz_offset:[3,3,1,""],authored_date:[3,3,1,""],authored_datetime:[3,3,1,""],committed_date:[3,3,1,""],committed_datetime:[3,3,1,""],committer:[3,3,1,""],committer_tz_offset:[3,3,1,""],conf_encoding:[3,3,1,""],count:[3,2,1,""],create_from_tree:[3,5,1,""],default_encoding:[3,3,1,""],encoding:[3,3,1,""],env_author_date:[3,3,1,""],env_committer_date:[3,3,1,""],gpgsig:[3,3,1,""],iter_items:[3,5,1,""],iter_parents:[3,2,1,""],message:[3,3,1,""],name_rev:[3,3,1,""],parents:[3,3,1,""],stats:[3,3,1,""],summary:[3,3,1,""],tree:[3,3,1,""],type:[3,3,1,""]},"git.objects.fun":{traverse_tree_recursive:[3,6,1,""],traverse_trees_recursive:[3,6,1,""],tree_entries_from_data:[3,6,1,""],tree_to_stream:[3,6,1,""]},"git.objects.submodule":{base:[3,0,0,"-"],root:[3,0,0,"-"],util:[3,0,0,"-"]},"git.objects.submodule.base":{Submodule:[3,1,1,""],UpdateProgress:[3,1,1,""]},"git.objects.submodule.base.Submodule":{"__eq__":[3,2,1,""],"__hash__":[3,2,1,""],"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__ne__":[3,2,1,""],"__repr__":[3,2,1,""],"__slots__":[3,3,1,""],"__str__":[3,2,1,""],"__weakref__":[3,3,1,""],add:[3,5,1,""],branch:[3,3,1,""],branch_name:[3,3,1,""],branch_path:[3,3,1,""],children:[3,2,1,""],config_reader:[3,2,1,""],config_writer:[3,2,1,""],exists:[3,2,1,""],iter_items:[3,5,1,""],k_default_mode:[3,3,1,""],k_head_default:[3,3,1,""],k_head_option:[3,3,1,""],k_modules_file:[3,3,1,""],module:[3,2,1,""],module_exists:[3,2,1,""],move:[3,2,1,""],name:[3,3,1,""],parent_commit:[3,3,1,""],remove:[3,2,1,""],rename:[3,2,1,""],set_parent_commit:[3,2,1,""],type:[3,3,1,""],update:[3,2,1,""],url:[3,3,1,""]},"git.objects.submodule.base.UpdateProgress":{"__module__":[3,3,1,""],"__slots__":[3,3,1,""],CLONE:[3,3,1,""],FETCH:[3,3,1,""],UPDWKTREE:[3,3,1,""],x:[3,3,1,""]},"git.objects.submodule.root":{RootModule:[3,1,1,""],RootUpdateProgress:[3,1,1,""]},"git.objects.submodule.root.RootModule":{"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__slots__":[3,3,1,""],k_root_name:[3,3,1,""],module:[3,2,1,""],update:[3,2,1,""]},"git.objects.submodule.root.RootUpdateProgress":{"__module__":[3,3,1,""],"__slots__":[3,3,1,""],BRANCHCHANGE:[3,3,1,""],PATHCHANGE:[3,3,1,""],REMOVE:[3,3,1,""],URLCHANGE:[3,3,1,""],x:[3,3,1,""]},"git.objects.submodule.util":{SubmoduleConfigParser:[3,1,1,""],find_first_remote_branch:[3,6,1,""],mkhead:[3,6,1,""],sm_name:[3,6,1,""],sm_section:[3,6,1,""]},"git.objects.submodule.util.SubmoduleConfigParser":{"__abstractmethods__":[3,3,1,""],"__init__":[3,2,1,""],"__module__":[3,3,1,""],flush_to_index:[3,2,1,""],set_submodule:[3,2,1,""],write:[3,2,1,""]},"git.objects.tag":{TagObject:[3,1,1,""]},"git.objects.tag.TagObject":{"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__slots__":[3,3,1,""],message:[3,3,1,""],object:[3,3,1,""],tag:[3,3,1,""],tagged_date:[3,3,1,""],tagger:[3,3,1,""],tagger_tz_offset:[3,3,1,""],type:[3,3,1,""]},"git.objects.tree":{Tree:[3,1,1,""],TreeModifier:[3,1,1,""]},"git.objects.tree.Tree":{"__contains__":[3,2,1,""],"__div__":[3,2,1,""],"__getitem__":[3,2,1,""],"__getslice__":[3,2,1,""],"__init__":[3,2,1,""],"__iter__":[3,2,1,""],"__len__":[3,2,1,""],"__module__":[3,3,1,""],"__reversed__":[3,2,1,""],"__slots__":[3,3,1,""],"__truediv__":[3,2,1,""],blob_id:[3,3,1,""],blobs:[3,3,1,""],cache:[3,3,1,""],commit_id:[3,3,1,""],join:[3,2,1,""],symlink_id:[3,3,1,""],traverse:[3,2,1,""],tree_id:[3,3,1,""],trees:[3,3,1,""],type:[3,3,1,""]},"git.objects.tree.TreeModifier":{"__delitem__":[3,2,1,""],"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__slots__":[3,3,1,""],add:[3,2,1,""],add_unchecked:[3,2,1,""],set_done:[3,2,1,""]},"git.objects.util":{Actor:[3,1,1,""],ProcessStreamAdapter:[3,1,1,""],Traversable:[3,1,1,""],altz_to_utctz_str:[3,6,1,""],get_object_type_by_name:[3,6,1,""],parse_actor_and_date:[3,6,1,""],parse_date:[3,6,1,""],tzoffset:[3,1,1,""],utctz_to_altz:[3,6,1,""],verify_utctz:[3,6,1,""]},"git.objects.util.Actor":{"__eq__":[3,2,1,""],"__hash__":[3,2,1,""],"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__ne__":[3,2,1,""],"__repr__":[3,2,1,""],"__slots__":[3,3,1,""],"__str__":[3,2,1,""],author:[3,5,1,""],committer:[3,5,1,""],conf_email:[3,3,1,""],conf_name:[3,3,1,""],email:[3,3,1,""],env_author_email:[3,3,1,""],env_author_name:[3,3,1,""],env_committer_email:[3,3,1,""],env_committer_name:[3,3,1,""],name:[3,3,1,""],name_email_regex:[3,3,1,""],name_only_regex:[3,3,1,""]},"git.objects.util.ProcessStreamAdapter":{"__getattr__":[3,2,1,""],"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__slots__":[3,3,1,""]},"git.objects.util.Traversable":{"__module__":[3,3,1,""],"__slots__":[3,3,1,""],list_traverse:[3,2,1,""],traverse:[3,2,1,""]},"git.objects.util.tzoffset":{"__dict__":[3,3,1,""],"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__weakref__":[3,3,1,""],dst:[3,2,1,""],tzname:[3,2,1,""],utcoffset:[3,2,1,""]},"git.refs":{head:[3,0,0,"-"],log:[3,0,0,"-"],reference:[3,0,0,"-"],remote:[3,0,0,"-"],symbolic:[3,0,0,"-"],tag:[3,0,0,"-"]},"git.refs.head":{HEAD:[3,1,1,""],Head:[3,1,1,""]},"git.refs.head.HEAD":{"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__slots__":[3,3,1,""],orig_head:[3,2,1,""],reset:[3,2,1,""]},"git.refs.head.Head":{"__dict__":[3,3,1,""],"__module__":[3,3,1,""],"__weakref__":[3,3,1,""],"delete":[3,5,1,""],checkout:[3,2,1,""],config_reader:[3,2,1,""],config_writer:[3,2,1,""],k_config_remote:[3,3,1,""],k_config_remote_ref:[3,3,1,""],rename:[3,2,1,""],set_tracking_branch:[3,2,1,""],tracking_branch:[3,2,1,""]},"git.refs.log":{RefLog:[3,1,1,""],RefLogEntry:[3,1,1,""]},"git.refs.log.RefLog":{"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__new__":[3,7,1,""],"__slots__":[3,3,1,""],append_entry:[3,5,1,""],entry_at:[3,5,1,""],from_file:[3,5,1,""],iter_entries:[3,5,1,""],path:[3,5,1,""],to_file:[3,2,1,""],write:[3,2,1,""]},"git.refs.log.RefLogEntry":{"__module__":[3,3,1,""],"__repr__":[3,2,1,""],"__slots__":[3,3,1,""],"new":[3,5,1,""],actor:[3,3,1,""],format:[3,2,1,""],from_line:[3,5,1,""],message:[3,3,1,""],newhexsha:[3,3,1,""],oldhexsha:[3,3,1,""],time:[3,3,1,""]},"git.refs.reference":{Reference:[3,1,1,""]},"git.refs.reference.Reference":{"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__slots__":[3,3,1,""],"__str__":[3,2,1,""],iter_items:[3,5,1,""],name:[3,3,1,""],remote_head:[3,3,1,""],remote_name:[3,3,1,""],set_object:[3,2,1,""]},"git.refs.remote":{RemoteReference:[3,1,1,""]},"git.refs.remote.RemoteReference":{"__module__":[3,3,1,""],"delete":[3,5,1,""],create:[3,5,1,""],iter_items:[3,5,1,""]},"git.refs.symbolic":{SymbolicReference:[3,1,1,""]},"git.refs.symbolic.SymbolicReference":{"__eq__":[3,2,1,""],"__hash__":[3,2,1,""],"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__ne__":[3,2,1,""],"__repr__":[3,2,1,""],"__slots__":[3,3,1,""],"__str__":[3,2,1,""],"delete":[3,5,1,""],abspath:[3,3,1,""],commit:[3,3,1,""],create:[3,5,1,""],dereference_recursive:[3,5,1,""],from_path:[3,5,1,""],is_detached:[3,3,1,""],is_remote:[3,2,1,""],is_valid:[3,2,1,""],iter_items:[3,5,1,""],log:[3,2,1,""],log_append:[3,2,1,""],log_entry:[3,2,1,""],name:[3,3,1,""],object:[3,3,1,""],path:[3,3,1,""],ref:[3,3,1,""],reference:[3,3,1,""],rename:[3,2,1,""],repo:[3,3,1,""],set_commit:[3,2,1,""],set_object:[3,2,1,""],set_reference:[3,2,1,""],to_full_path:[3,5,1,""]},"git.refs.tag":{Tag:[3,3,1,""],TagReference:[3,1,1,""]},"git.refs.tag.TagReference":{"__module__":[3,3,1,""],"__slots__":[3,3,1,""],"delete":[3,5,1,""],commit:[3,3,1,""],create:[3,5,1,""],object:[3,3,1,""],tag:[3,3,1,""]},"git.remote":{FetchInfo:[3,1,1,""],PushInfo:[3,1,1,""],Remote:[3,1,1,""],RemoteProgress:[3,1,1,""]},"git.remote.FetchInfo":{"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__slots__":[3,3,1,""],"__str__":[3,2,1,""],ERROR:[3,3,1,""],FAST_FORWARD:[3,3,1,""],FORCED_UPDATE:[3,3,1,""],HEAD_UPTODATE:[3,3,1,""],NEW_HEAD:[3,3,1,""],NEW_TAG:[3,3,1,""],REJECTED:[3,3,1,""],TAG_UPDATE:[3,3,1,""],commit:[3,3,1,""],flags:[3,3,1,""],name:[3,3,1,""],note:[3,3,1,""],old_commit:[3,3,1,""],re_fetch_result:[3,3,1,""],ref:[3,3,1,""],remote_ref_path:[3,3,1,""],x:[3,3,1,""]},"git.remote.PushInfo":{"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__slots__":[3,3,1,""],DELETED:[3,3,1,""],ERROR:[3,3,1,""],FAST_FORWARD:[3,3,1,""],FORCED_UPDATE:[3,3,1,""],NEW_HEAD:[3,3,1,""],NEW_TAG:[3,3,1,""],NO_MATCH:[3,3,1,""],REJECTED:[3,3,1,""],REMOTE_FAILURE:[3,3,1,""],REMOTE_REJECTED:[3,3,1,""],UP_TO_DATE:[3,3,1,""],flags:[3,3,1,""],local_ref:[3,3,1,""],old_commit:[3,3,1,""],remote_ref:[3,3,1,""],remote_ref_string:[3,3,1,""],summary:[3,3,1,""],x:[3,3,1,""]},"git.remote.Remote":{"__eq__":[3,2,1,""],"__getattr__":[3,2,1,""],"__hash__":[3,2,1,""],"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__ne__":[3,2,1,""],"__repr__":[3,2,1,""],"__slots__":[3,3,1,""],"__str__":[3,2,1,""],add:[3,5,1,""],add_url:[3,2,1,""],config_reader:[3,3,1,""],config_writer:[3,3,1,""],create:[3,5,1,""],delete_url:[3,2,1,""],exists:[3,2,1,""],fetch:[3,2,1,""],iter_items:[3,5,1,""],name:[3,3,1,""],pull:[3,2,1,""],push:[3,2,1,""],refs:[3,3,1,""],remove:[3,5,1,""],rename:[3,2,1,""],repo:[3,3,1,""],rm:[3,5,1,""],set_url:[3,2,1,""],stale_refs:[3,3,1,""],update:[3,2,1,""],urls:[3,3,1,""]},"git.remote.RemoteProgress":{"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__slots__":[3,3,1,""],BEGIN:[3,3,1,""],CHECKING_OUT:[3,3,1,""],COMPRESSING:[3,3,1,""],COUNTING:[3,3,1,""],DONE_TOKEN:[3,3,1,""],END:[3,3,1,""],FINDING_SOURCES:[3,3,1,""],OP_MASK:[3,3,1,""],RECEIVING:[3,3,1,""],RESOLVING:[3,3,1,""],STAGE_MASK:[3,3,1,""],TOKEN_SEPARATOR:[3,3,1,""],WRITING:[3,3,1,""],error_lines:[3,2,1,""],line_dropped:[3,2,1,""],new_message_handler:[3,2,1,""],re_op_absolute:[3,3,1,""],re_op_relative:[3,3,1,""],update:[3,2,1,""],x:[3,3,1,""]},"git.repo":{base:[3,0,0,"-"],fun:[3,0,0,"-"]},"git.repo.base":{Repo:[3,1,1,""]},"git.repo.base.Repo":{"__del__":[3,2,1,""],"__dict__":[3,3,1,""],"__eq__":[3,2,1,""],"__hash__":[3,2,1,""],"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__ne__":[3,2,1,""],"__repr__":[3,2,1,""],"__weakref__":[3,3,1,""],DAEMON_EXPORT_FILE:[3,3,1,""],GitCommandWrapperType:[3,3,1,""],active_branch:[3,3,1,""],alternates:[3,3,1,""],archive:[3,2,1,""],bare:[3,3,1,""],blame:[3,2,1,""],blame_incremental:[3,2,1,""],branches:[3,3,1,""],clone:[3,2,1,""],clone_from:[3,5,1,""],commit:[3,2,1,""],config_level:[3,3,1,""],config_reader:[3,2,1,""],config_writer:[3,2,1,""],create_head:[3,2,1,""],create_remote:[3,2,1,""],create_submodule:[3,2,1,""],create_tag:[3,2,1,""],daemon_export:[3,3,1,""],delete_head:[3,2,1,""],delete_remote:[3,2,1,""],delete_tag:[3,2,1,""],description:[3,3,1,""],has_separate_working_tree:[3,2,1,""],head:[3,3,1,""],heads:[3,3,1,""],index:[3,3,1,""],init:[3,5,1,""],is_ancestor:[3,2,1,""],is_dirty:[3,2,1,""],iter_commits:[3,2,1,""],iter_submodules:[3,2,1,""],iter_trees:[3,2,1,""],merge_base:[3,2,1,""],re_author_committer_start:[3,3,1,""],re_hexsha_only:[3,3,1,""],re_hexsha_shortened:[3,3,1,""],re_tab_full_line:[3,3,1,""],re_whitespace:[3,3,1,""],references:[3,3,1,""],refs:[3,3,1,""],remote:[3,2,1,""],remotes:[3,3,1,""],rev_parse:[3,2,1,""],submodule:[3,2,1,""],submodule_update:[3,2,1,""],submodules:[3,3,1,""],tag:[3,2,1,""],tags:[3,3,1,""],tree:[3,2,1,""],untracked_files:[3,3,1,""],working_tree_dir:[3,3,1,""]},"git.repo.fun":{deref_tag:[3,6,1,""],find_git_dir:[3,6,1,""],is_git_dir:[3,6,1,""],name_to_object:[3,6,1,""],rev_parse:[3,6,1,""],short_to_long:[3,6,1,""],to_commit:[3,6,1,""],touch:[3,6,1,""]},"git.util":{Actor:[3,1,1,""],BlockingLockFile:[3,1,1,""],CallableRemoteProgress:[3,1,1,""],IndexFileSHA1Writer:[3,1,1,""],Iterable:[3,1,1,""],IterableList:[3,1,1,""],LockFile:[3,1,1,""],RemoteProgress:[3,1,1,""],Stats:[3,1,1,""],WaitGroup:[3,1,1,""],assure_directory_exists:[3,6,1,""],get_user_id:[3,6,1,""],join_path:[3,6,1,""],join_path_native:[3,6,1,""],rmtree:[3,6,1,""],stream_copy:[3,6,1,""],to_native_path_linux:[3,6,1,""],unbare_repo:[3,6,1,""]},"git.util.Actor":{"__eq__":[3,2,1,""],"__hash__":[3,2,1,""],"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__ne__":[3,2,1,""],"__repr__":[3,2,1,""],"__slots__":[3,3,1,""],"__str__":[3,2,1,""],author:[3,5,1,""],committer:[3,5,1,""],conf_email:[3,3,1,""],conf_name:[3,3,1,""],email:[3,3,1,""],env_author_email:[3,3,1,""],env_author_name:[3,3,1,""],env_committer_email:[3,3,1,""],env_committer_name:[3,3,1,""],name:[3,3,1,""],name_email_regex:[3,3,1,""],name_only_regex:[3,3,1,""]},"git.util.BlockingLockFile":{"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__slots__":[3,3,1,""]},"git.util.CallableRemoteProgress":{"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__slots__":[3,3,1,""],update:[3,2,1,""]},"git.util.IndexFileSHA1Writer":{"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__slots__":[3,3,1,""],close:[3,2,1,""],f:[3,3,1,""],sha1:[3,3,1,""],tell:[3,2,1,""],write:[3,2,1,""],write_sha:[3,2,1,""]},"git.util.Iterable":{"__module__":[3,3,1,""],"__slots__":[3,3,1,""],iter_items:[3,5,1,""],list_items:[3,5,1,""]},"git.util.IterableList":{"__contains__":[3,2,1,""],"__delitem__":[3,2,1,""],"__getattr__":[3,2,1,""],"__getitem__":[3,2,1,""],"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__new__":[3,7,1,""],"__slots__":[3,3,1,""]},"git.util.LockFile":{"__del__":[3,2,1,""],"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__slots__":[3,3,1,""]},"git.util.RemoteProgress":{"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__slots__":[3,3,1,""],BEGIN:[3,3,1,""],CHECKING_OUT:[3,3,1,""],COMPRESSING:[3,3,1,""],COUNTING:[3,3,1,""],DONE_TOKEN:[3,3,1,""],END:[3,3,1,""],FINDING_SOURCES:[3,3,1,""],OP_MASK:[3,3,1,""],RECEIVING:[3,3,1,""],RESOLVING:[3,3,1,""],STAGE_MASK:[3,3,1,""],TOKEN_SEPARATOR:[3,3,1,""],WRITING:[3,3,1,""],error_lines:[3,2,1,""],line_dropped:[3,2,1,""],new_message_handler:[3,2,1,""],re_op_absolute:[3,3,1,""],re_op_relative:[3,3,1,""],update:[3,2,1,""],x:[3,3,1,""]},"git.util.Stats":{"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__slots__":[3,3,1,""],files:[3,3,1,""],total:[3,3,1,""]},"git.util.WaitGroup":{"__dict__":[3,3,1,""],"__init__":[3,2,1,""],"__module__":[3,3,1,""],"__weakref__":[3,3,1,""],add:[3,2,1,""],done:[3,2,1,""],wait:[3,2,1,""]},git:{cmd:[3,0,0,"-"],config:[3,0,0,"-"],diff:[3,0,0,"-"],exc:[3,0,0,"-"],remote:[3,0,0,"-"],util:[3,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","method","Python method"],"3":["py","attribute","Python attribute"],"4":["py","exception","Python exception"],"5":["py","classmethod","Python class method"],"6":["py","function","Python function"],"7":["py","staticmethod","Python static method"]},objtypes:{"0":"py:module","1":"py:class","2":"py:method","3":"py:attribute","4":"py:exception","5":"py:classmethod","6":"py:function","7":"py:staticmethod"},terms:{"07t22":3,"0o100644":5,"0o40000":5,"0x10e2f0ca8":[],"0x10ea359b0":[],"0x10ea35a28":[],"0x10ea35aa0":[],"0x10ea35b18":[],"0x10ea38b90":[],"0x10ea38c08":[],"0x10ea38c80":[],"0x10ea38cf8":[],"0x10ea4c4b0":[],"0x10ea5d6e0":[],"0x10ea68350":[],"0x10ea68be8":[],"0x10ea72c90":[],"0x10ea88590":[],"0x10ea8b140":[],"0x10ea8b1b8":[],"0x10ea8b230":[],"0x10ea8b2a8":[],"0x10ea8b320":[],"0x10ea8b398":[],"0x10ea8b410":[],"0x10ea96f50":[],"0x10eaa9c20":[],"0x10eaabcb0":[],"0x10eaabd08":[],"0x10eaabd60":[],"0x10eaabdb8":[],"0x10eaabe10":[],"0x10eaabe68":[],"0x10eab6050":[],"0x10eab6410":[],"0x10eac5980":[],"0x10eac59b8":[],"0x10eac59f0":[],"0x10eac85d0":[],"0x10eac8628":[],"0x10eac8680":[],"0x10eac86d8":[],"0x10eac8730":[],"0x10eac8788":[],"0x10eac87e0":[],"0x10eac8838":[],"0x10eac8890":[],"0x10eac88e8":[],"0x10eac8940":[],"0x10eac8998":[],"0x10eac89f0":[],"0x10eac8a48":[],"0x10eacc050":[],"0x10eacc500":[],"0x10eacc578":[],"0x10eacc5f0":[],"0x10eacc668":[],"0x10eacc6e0":[],"0x10eaccb90":[],"0x10eaccc80":[],"0x10eacccf8":[],"0x10eaccd70":[],"0x10eaccde8":[],"0x10eacced8":[],"0x10eaccf50":[],"0x10eacf050":[],"0x10eacf0c8":[],"0x10eacf140":[],"0x10eacf1b8":[],"0x10eacf230":[],"0x10eacf2a8":[],"0x10eacf320":[],"0x10eacf398":[],"0x10eacf410":[],"0x10eacf488":[],"0x10eacf500":[],"0x10eacf578":[],"0x10eacf5f0":[],"0x10eacf668":[],"0x10eacf7d0":[],"0x10eacf848":[],"0x10eacf8c0":[],"0x10eacf9b0":[],"0x10eacfaa0":[],"0x10eacfb18":[],"0x10eacfc80":[],"0x10eacfd70":[],"0x10eacfde8":[],"0x10eacfe60":[],"0x10f6a5050":3,"0x10f6a50c8":3,"0x10f6a5140":3,"0x10f6a51b8":3,"0x10f6a5230":3,"0x10f6a52a8":3,"0x10f6a5320":3,"0x10f6a5398":3,"0x10f6a5410":3,"0x10f6a5488":3,"0x10f6a5500":3,"0x10f6a5578":3,"0x10f6a55f0":3,"0x10f6a5668":3,"0x10f6a56e0":3,"0x10f6a5758":3,"0x10f6a58c0":3,"0x10f6a5938":3,"0x10f6a59b0":3,"0x10f6a5aa0":3,"0x10f6a5b90":3,"0x10f6a5c08":3,"0x10f6a5d70":3,"0x10f6a5e60":3,"0x10f6a5ed8":3,"0x10f6a5f50":3,"0x10f6a8140":3,"0x10f6a85f0":3,"0x10f6a8668":3,"0x10f6a86e0":3,"0x10f6a8758":3,"0x10f6a87d0":3,"0x10f6a8c80":3,"0x10f6a8d70":3,"0x10f6a8de8":3,"0x10f6a8e60":3,"0x10f6a8ed8":3,"0x10fc01030":3,"0x10fd81838":3,"0x10fd81890":3,"0x10fd818e8":3,"0x10fd81940":3,"0x10fd81998":3,"0x10fd819f0":3,"0x10fd81a48":3,"0x10fd81aa0":3,"0x10fd81af8":3,"0x10fd81b50":3,"0x10fd81ba8":3,"0x10fd81c00":3,"0x10fd81c58":3,"0x10fd81cb0":3,"0x10fde0b70":3,"0x10fdec990":3,"0x10fdf6b90":3,"0x10fdf6c08":3,"0x10fdf6c80":3,"0x10fdf6cf8":3,"0x10fe00cf8":3,"0x10fe00d70":3,"0x10fe00de8":3,"0x10fe00e60":3,"0x10fe27848":3,"0x10fe4ae50":3,"0x10fe562a8":3,"0x10fe56320":3,"0x10fe56398":3,"0x10fe56410":3,"0x10fe56488":3,"0x10fe56500":3,"0x10fe56578":3,"0x10fe6cf70":3,"0x10fe6cfc8":3,"0x10fe6e2f0":3,"0x10fe6f8a0":3,"0x10fe75050":3,"0x10fe750c8":3,"0x10fe75488":3,"0x10fe76050":3,"0x10fe760a8":3,"0x10fe76100":3,"0x10fe76158":3,"0x10fe7a0f8":3,"0x10ff4eec0":3,"0x10ff4eef8":3,"0x10ff4ef30":3,"1c09f116cbc2cb4100fb6935bb162daa4723f455":3,"22v0":0,"5562b947ecdd5ce939000038":5,"84b92ae7cef0ab98f5a8":3,"__abstractmethods__":3,"__call__":3,"__class__":5,"__contains__":[0,3],"__del__":[0,2,3,5],"__delitem__":[0,3],"__dict__":3,"__div__":[0,3],"__doc__":3,"__enter__":3,"__eq__":3,"__exit__":3,"__getattr__":[0,3],"__getitem__":3,"__getslice__":3,"__getstate__":3,"__hash__":3,"__init__":[0,3],"__iter__":3,"__len__":[0,3],"__module__":3,"__ne__":3,"__new__":3,"__repr__":3,"__reversed__":3,"__root__":3,"__setstate__":3,"__slots__":3,"__str__":3,"__truediv__":3,"__weakref__":3,"_all_":3,"_and_":5,"_branch_path":3,"_cach":3,"_call_process":3,"_callabl":3,"_check_interv":3,"_clone":3,"_common_path_default":3,"_config":3,"_config_pars":3,"_config_read":3,"_cur_lin":3,"_environ":3,"_error_lin":3,"_extension_data":3,"_file_path":3,"_from_str":0,"_get_altern":3,"_get_config_path":3,"_get_untracked_fil":3,"_git_opt":3,"_id_attr":3,"_list_from_str":0,"_max_block_tim":3,"_name":3,"_nbr":3,"_old_commit_sha":3,"_owns_lock":3,"_parent_commit":3,"_path":3,"_prefix":3,"_proc":3,"_remot":3,"_section_nam":3,"_seen_op":3,"_set_altern":3,"_size":3,"_small_repo_url":5,"_sre":3,"_stream":3,"_url":3,"_version_info":3,"_working_dir":3,"_write":3,"abstract":2,"break":0,"byte":[0,3,5],"case":[0,2,3,5],"catch":[0,3],"char":0,"class":[0,3,5],"default":[0,3,5],"export":[0,3],"final":[0,2,3,5],"function":0,"import":[0,3,5],"int":[0,3,5],"long":[2,3,5],"null":3,"public":0,"return":[0,3,5],"short":[0,3,5],"static":[0,3,5],"switch":0,"throw":[0,3],"true":[0,3,5],"try":[0,5],"var":5,"while":[3,5],a_blob:[0,3],a_blob_id:3,a_commit:0,a_mod:3,a_path:[0,3],a_rawpath:[0,3],abil:5,abl:[0,3,5],about:[0,2,3,5],abov:[3,5],absolut:[3,5],abspath:[0,3,5],acccess:3,accept:[0,3],access:[0,2,3,5],accessor:3,accestor:3,accomplish:5,accord:3,accordingli:[3,4],account:3,accumul:5,achiev:[0,2],acknowledg:0,act:3,activ:[0,3,5],active_branch:[0,3,5],actor:[3,5],actual:[0,3,5],adapterstreamcl:3,add:[0,3,5],add_uncheck:3,add_url:3,addit:[0,3,5],additino:3,addition:[2,3,5],address:0,adjust:[0,3,5],advanc:0,aed1d5c4b31d5027:0,affect:[0,5],after:[0,3,5],afterward:[3,5],again:[0,3],against:[0,3,5],aggress:3,agnosit:3,ahead:[3,5],algorithm:3,alia:[0,3,5],aliv:2,all:[0,2,3,5],allow:[0,2,3,5],allwo:5,alreadi:[3,5],also:[0,2,3,5],alter:[0,3],altern:[2,3],although:3,altogeth:3,altz:3,altz_to_utctz_str:3,altzon:3,alwai:[0,3,5],ambigu:0,amount:[0,3,5],ancestor:3,ancestor_rev:3,ancestri:[3,5],ani:[0,3,5],anoth:[2,3,5],anotheron:3,answer:[],anticip:3,anymor:[0,3,5],anyon:0,anyth:[3,5],anywai:[0,3],api:0,app:5,appear:[0,3,5],append:[0,3],append_entri:3,appl:3,appli:[0,3],applic:[0,3,5],approach:5,appropri:3,apr:3,arbitrari:0,archiv:[0,3,5],archive_tar:0,archive_tar_gz:0,area:0,arg:3,argument:[0,3,5],around:3,artifici:0,as_edg:3,as_process:3,ascii:[0,5],asctim:5,ask:[0,3,5],aspect:[0,5],assert:5,assertionerror:[0,3],associ:[3,4],assum:[2,3,5],assur:[0,2,3,5],assure_directory_exist:3,atom:3,attr:3,attribut:[0,3,5],attributeerror:5,author:[0,3,5],author_d:3,author_tz_offset:3,authored_d:[0,3,5],authored_datetim:[0,3],autointerrupt:3,automat:[0,3,5],autopep8:0,avail:[0,2,3,5],averag:5,avoid:5,awai:[0,3,5],awar:3,b_blob:[0,3],b_blob_id:3,b_commit:0,b_mode:[0,3],b_path:[0,3],b_rawpath:[0,3],back:[0,3],backslash:0,backward:5,badnam:[0,3],badobject:[0,3],bar:0,bare:[0,3,5],bare_mast:5,bare_repo:5,base:0,baseindexentri:3,basenam:[0,3,5],basestr:3,basi:2,basic:2,basicconfig:5,becaus:0,becom:[0,3,5],been:[0,3,5],befor:[0,3],beforehand:3,begin:3,behav:[0,3,5],behavi:0,behavior:5,behaviour:[0,3,5],behind:3,belong:0,below:3,benefici:[],benefit:5,besid:[0,3],better:0,between:[0,3,5],big:[],biggest:[],bin:[3,5],binari:[0,3,5],binsha:[0,3,5],bisect:0,bit:[0,3],bitflag:3,blame:[0,3,5],blame_increment:3,blameentri:3,blob_data:5,blob_id:3,blobfilt:3,block:[0,3],blockinglockfil:3,both:[0,3],branch:0,branch_first:3,branch_nam:3,branch_path:3,branchchang:3,breadth:3,broken:0,brother:3,brows:2,browse_thread:0,brutal:5,bsd:2,bug:[0,3],build:0,built:3,cach:[0,3],cacheerror:3,call:[0,2,3,5],callabl:[0,3],callableremoteprogress:3,callback:3,caller:[3,5],can:[0,2,3,4,5],candid:3,cannot:[3,5],capabl:0,care:3,carrai:3,carri:[0,3,5],cat:5,cat_file_al:3,cat_file_head:3,catfilecontentstream:3,caught:0,caus:[0,3],certain:[0,3,5],chain:5,chang:[0,3,5],change_typ:3,channel:5,charact:0,characterist:5,cheapli:5,check:[3,5],check_interval_:3,check_path:3,checking_out:3,checkout:[0,3,5],checkouterror:3,child:[0,3,5],children:[3,5],choke:0,chomd:5,chunk:3,chunk_siz:3,claim:3,classmethod:3,clean:0,cleanup:[0,2],clear:3,clear_cach:3,clearli:3,click:3,client:0,clone:[0,2,3,5],clone_from:[3,5],cloned_repo:5,close:[0,3,5],closest:3,cmd:[0,3],code:0,codebas:2,colon:3,com:[0,2,3,4,5],combin:3,command:0,comment:0,commit_count:0,commit_d:3,commit_delta_from:0,commit_diff:0,commit_id:3,commitencod:3,commits_between:0,commits_sinc:0,committ:[3,5],committed_d:[3,5],committed_datetim:3,committer_d:0,committer_datetim:0,committer_tz_offset:3,common:[0,3,5],common_path:3,commonli:3,commun:3,compar:[0,3,5],comparison:[0,3],compat:[0,3],complet:[0,3],complic:3,compon:[0,3],compos:5,compress:3,concept:2,concurr:3,concurrentwriteoper:0,condit:[0,5],conf_email:3,conf_encod:3,conf_nam:3,config_level:3,config_read:[0,3,5],config_writ:[0,3,5],configpars:3,configread:3,configur:[0,3,5],conform:0,confort:0,conjunct:3,consid:[0,3],consider:3,consist:[0,3,5],constant:[0,3],constrain:[0,3],construct:[0,3],constructor:0,consum:[0,3,5],consumpt:0,contain:[0,3,5],content:[0,3,5],content_from_str:0,content_sha:3,context:[2,3,5],continu:3,control:[0,5],conveni:[0,3,5],convent:[0,3],convers:[0,5],convert:[0,3,5],copi:[3,5],corner:3,correct:[0,3,5],correctli:[0,3],correspond:[0,3,5],corrupt:[0,3],cost:3,costli:3,could:[0,3],couldn:3,count:[0,3],counterpart:0,cours:5,cowardli:0,creat:[0,3,5],create_from_tre:[0,3],create_head:[0,3,5],create_no_window:3,create_patch:[0,3],create_remot:[3,5],create_submodul:[3,5],create_tag:[3,5],creation:[0,3],creator:3,criteria:3,critic:0,ctime:3,cur_count:[3,5],current:[0,3,5],custom:0,custom_environ:[3,5],daemon:[0,2,3,5],daemon_export:[0,3],daemon_export_fil:3,danger:3,dangeri:3,data:[0,2,3,5],data_str:3,data_stream:[0,3,5],databas:0,dataset:2,date:[0,3,5],datetim:[0,3],deadlock:3,deal:[0,3],dear:3,debug:0,decod:[0,3,5],decor:3,deeper:3,deepli:0,def:5,default_encod:3,default_index:3,default_mime_typ:3,defin:[3,5],definintiion:0,definit:[3,5],defint:5,delai:5,deleg:5,delet:[0,3,5],delete_head:[3,5],delete_remot:[3,5],delete_tag:[3,5],delete_url:3,deleted_fil:3,demand:[0,3],denot:3,dens:5,depend:[0,2,3],deploy:5,deprec:[0,3],depth:[3,5],deref_tag:3,derefer:3,dereferenc:3,dereference_recurs:3,deriv:[0,3],describ:3,descript:[0,3],desir:[0,3],despit:0,dest:3,destin:3,destinatin:3,destroi:5,destruct:3,destructor:2,detach:[0,3,5],detail:[3,5],detect:[0,3],deterior:2,determin:[3,5],determinist:2,dev:3,develop:[0,2,3,4,5],deviat:5,devic:3,devnul:0,dict:[0,3],dict_proxi:3,dictionari:[0,3],did:[0,3],didn:[0,3,5],diff_ad:5,diffabl:[3,5],differ:[0,3,5],diffindex:[0,3,5],difftool:3,dir:[3,5],dirctori:3,direct:[3,5],directi:5,directli:0,directori:[0,3,5],dirti:[0,3,5],disabl:3,discard:3,disk:3,dispatch:3,distinct:5,distribut:2,divisiblej:0,doc:[0,3],document:0,doe:[0,3],doesn:[0,3,5],don:[0,2,3,5],done:[2,3,5],done_token:3,doubl:0,down:5,download:2,drop:[0,2,3,5],dry_run:3,dst:3,due:[0,3],dulwich:3,dure:[0,3],dynmic:0,each:[3,5],eas:[0,5],easi:[0,2,3,5],easili:[2,3,5],edg:3,effect:[0,3,5],effici:0,either:[2,3],els:[3,5],email:3,emit:3,empti:[3,5],empty_repo:5,emul:0,enabl:[0,3],encapsul:3,encod:[0,3],encount:3,encourag:2,end:[3,5],endswith:5,english:3,ensur:3,entir:[0,5],entri:[0,3,5],entries_dict:3,entry_at:3,entry_kei:[0,3],enumer:3,env:3,env_author_d:3,env_author_email:3,env_author_nam:3,env_committer_d:3,env_committer_email:3,env_committer_nam:3,environ:[0,3,5],epoc:0,epoch:[3,5],equal:[0,3,5],equip:3,equival:[0,3],error:[0,3,5],error_lin:3,escap:0,essenti:[3,5],etc:[0,3],evalu:3,even:[],everi:3,everth:3,everyth:[0,3],everywher:[0,5],exact:3,exactli:[0,3],examin:[],exampl:[0,3,5],exc:[0,3],except:0,exception_typ:3,exception_valu:3,exclud:3,exclus:3,exec:5,execut:[0,3,5],executable_mod:3,execute_kwarg:3,exhaust:2,exist:[0,3,5],exit:[0,3],expect:[0,2,3],expens:3,explain:[3,5],explicit:[0,3,5],explicitli:[0,3],ext:3,extended_output:3,extens:[0,3],extension_data:3,extern:5,extra:[0,3],extract:5,extrem:[],ez_setup:0,facil:[0,3],facilit:3,fact:[0,3],factor:2,fail:[0,3,5],failed_fil:3,failed_reason:3,failunlessrais:5,failur:0,fall:0,fals:[0,3,5],far:0,fashion:3,fast:[3,5],fast_forward:3,faster:[0,2,3],fatal:[0,3],favor:[0,3],feasibl:3,fetch:[0,3,5],fetch_head:3,fetch_info:5,fetchinfo:3,few:[3,5],field:[3,5],fifty_first_commit:5,file:[0,2,3,5],file_count:5,file_mod:3,file_nam:5,file_path:3,filehandl:3,filenam:3,filepath:3,filesystem:3,filter:[0,3,4,5],find:[0,3,5],find_al:0,find_first_remote_branch:3,find_git_dir:3,finding_sourc:3,fine:0,first:[0,3,5],fit:2,flag:[0,3,5],flat:5,flatten:0,flush:[0,3],flush_to_index:3,folder:3,follow:[0,2,3,5],foo:0,foord:2,footprint:5,for_each_ref:5,forc:3,force_remov:3,force_reset:3,forced_upd:3,forcefulli:3,forcibl:3,foreign:5,forget:[2,3,5],fork_bar:0,form:5,format:[0,3,5],former:0,forward:3,found:[0,2,3,4,5],fprogress:3,free:3,freeli:5,from:[0,2,3,5],from_bas:3,from_blob:3,from_fil:3,from_lin:3,from_path:3,from_str:0,from_tre:[3,5],front:3,frozenset:3,full:[0,3,4,5],fulli:3,fun:3,func:3,further:[3,5],futur:[3,5],fuzzi:3,gain:3,gather:3,gave:3,get:0,get_entries_kei:0,get_object_data:3,get_object_head:3,get_object_type_by_nam:3,get_user_id:3,get_valu:5,getcwd:[0,3],gid:3,gist:3,git_author_d:3,git_author_email:3,git_author_nam:3,git_committer_d:3,git_committer_email:3,git_committer_nam:3,git_dir:[0,3,5],git_exec_nam:3,git_exec_name_win:3,git_python:0,git_python_git_execut:[0,3,5],git_python_trac:[0,3,5],git_ssh:[3,5],git_ssh_command:5,git_working_dir:3,gitcmd:[],gitcmdobjectdb:[],gitcomdobjectdb:0,gitcommanderror:[0,3,5],gitcommandnotfound:[0,3],gitcommandwrappertyp:3,gitconfigpars:[0,3],gitdb:0,github:[0,2,3,4,5],gitignor:3,gitmodul:[3,5],gitpthon:2,gitpython:0,gitrepo:3,give:3,given:[0,3,5],givn:3,glob:3,global:[0,3],gmtime:[0,3,5],goe:[0,3],googl:0,gpgsig:3,grab:3,gracefulli:3,grain:0,graph:[3,5],great:[],greater:5,grit:0,group:[0,3],guarante:3,gui:0,gzip:0,hacki:3,had:[0,3],hand:[0,5],handl:0,handle_process_output:3,handler:[0,3],hang:3,happen:[0,3,5],hard:[3,5],harder:0,has_separate_working_tre:3,hash:[0,3,5],hashabl:3,have:[0,2,3,5],hcommit:5,hct:5,head_uptod:3,headcommit:5,header:0,held:3,help:0,henc:[0,3],here:[0,2,3,5],hex:3,hexadecim:[0,3,5],hexsha:[0,3,5],hide:[0,3],hierarchi:[0,5],high:[2,5],higher:5,himself:3,histori:[3,5],hold:3,home:3,hook:[0,3],hook_path:3,hookexecutionerror:3,host:[2,5],hous:3,how:[0,3,5],howev:[0,2],html:3,htmldoc:3,http:[0,2,3,4],huge:5,human:[3,5],hurt:0,hybrid:[],i18n:3,id_abbrev:0,id_attr:3,id_attribut:3,id_deployment_kei:5,id_rsa:5,ident:3,identifi:[0,3,5],identify:3,ignor:[3,5],ignore_extension_data:[0,3],ignore_self:3,ignore_tree_extension_data:0,immut:5,implement:[0,2,3,5],impli:[0,3],implicitli:[0,3,5],imposs:0,improv:[0,3],incap:3,includ:[0,3,4],incorrect:[0,3],incorrectli:0,increas:0,increment:[0,3],independ:3,index_entry_inst:3,indexentri:[0,3],indexerror:3,indexfil:[0,3,5],indexfilesha1writ:3,indexobject:3,individu:[0,3,5],ineffect:3,inequ:3,info:[0,3,5],infom:3,infomr:3,inform:0,inherit:3,inidc:3,init:[0,2,3,5],init_bar:0,initi:0,inner:5,inod:3,input:[0,3],insert:3,inspect:5,instal:0,instanc:[0,3,5],instanti:[0,3,5],instead:[0,3,5],int_nano_second:3,int_seconds_since_epoch:3,int_seconds_west_of_utc:3,int_time_seconds_since_epoch:3,int_timezone_offset:3,integ:[0,3],integr:[],intend:[0,3],intens:2,interact:[2,5],interest:0,interfac:[0,3],interfer:3,intermedi:[3,5],intern:[0,3],interrupt:3,introduct:5,intrus:0,intuit:5,invalid:[0,3],invalidgitrepositoryerror:[0,3],invers:3,invert:3,invoc:3,involv:[2,3,5],ioerror:3,is_ancestor:3,is_detach:[3,5],is_dirti:[0,3,5],is_fil:3,is_git_dir:3,is_git_directori:3,is_remot:3,is_valid:3,isdir:5,isfil:5,ish:3,isinst:5,iso:3,issu:0,istream:3,iter_blob:[3,5],iter_change_typ:[0,3,5],iter_commit:[0,3,5],iter_entri:3,iter_item:[0,3],iter_par:3,iter_submodul:3,iter_tre:[0,3],iterablelist:[0,3],itself:[0,3,5],join:[0,3,5],join_path:3,join_path_n:3,judg:3,just:[0,2,3,5],k_config_remot:3,k_config_remote_ref:3,k_default_mod:3,k_head_default:3,k_head_opt:3,k_modules_fil:3,k_root_nam:3,keep:[3,5],keep_go:3,kei:[3,5],kept:[0,2,3],kernel:3,keyerror:3,keyword:[0,3,5],kill:3,kill_after_timeout:3,kind:[0,3,5],know:[0,3,5],known:3,known_host:5,kwarg:[0,3],kwd:3,lambda:3,languag:3,larg:[0,2,5],last:[0,3,5],later:[3,5],latest:[0,2,3,5],latter:[0,3,5],layout:3,lazi:3,lazili:3,lc_messag:3,lead:[0,3],leak:2,least:3,leav:3,left:3,legitim:0,len:[3,5],length:[0,3],less:[0,3,5],let:[3,5],level:[0,2,3,5],lexigraph:3,lib:[3,5],librari:[0,2],licens:[],life:5,lifetim:3,light:3,lightweight:3,like:[0,2,3,5],limit:[],line:[0,2,3,5],line_drop:3,link:3,link_mod:3,linux:[3,5],list:[0,3,4,5],list_from_str:0,list_item:[0,3],list_travers:3,load:5,local:[3,5],local_ref:3,locat:3,lock:[3,5],lockedfd:0,lockfil:3,log:0,log_append:[0,3],log_entri:3,logentri:3,logfil:3,logger:5,logic:3,logmsg:[0,3],longer:0,look:[0,3,5],lookup:0,loop:3,loos:[],lost:3,low:2,ls_file:3,made:[0,3,5],mai:[0,2,3,5],main:3,maintain:[0,3],major:[0,3],make:[0,3,5],manag:[3,5],mani:3,manipul:[0,3,5],manner:[2,3],manual:[0,2,3,5],map:3,marker:3,master:[0,3,5],match:[0,3,5],matter:3,max:[0,3],max_block_time_:3,max_chunk_s:3,max_count:[3,5],maximum:3,mean:[2,3],meant:3,meet:[],member:[0,3,5],memori:[0,5],mention:[3,5],mere:[0,3],mereg:5,merg:[0,3,5],merge_bas:[0,3,5],merge_index:5,merge_tre:[3,5],merged_index:5,messag:[0,3,5],meta:5,method:[0,2,3,5],method_miss:0,michael:2,might:[0,2,3,5],mileston:[0,4],mime:3,mime_typ:3,mimic:0,minim:3,minor:3,misc:0,miss:[0,3,5],missing_ok:0,mix:3,mkdir:3,mkhead:3,mock:[0,2],mode:[0,3,5],model:5,modif:[3,5],modifi:0,module_exist:[3,5],mojombo:3,more:0,moron:0,most:[0,3,5],mostli:3,move:[0,3,5],movement:5,mtime:3,mtrier:[3,5],much:[0,3,5],multi:0,multip:3,multipl:[0,3,5],must:[3,5],mutat:3,my_commit:5,my_new_branch:5,my_new_symref:3,my_new_tag:5,my_ssh_execut:5,my_tag:5,my_untracked_fil:5,myfil:3,myprogressprint:5,myrefer:3,mysubrepo:5,name:[0,3,5],name_email_regex:3,name_only_regex:3,name_rev:[0,3],name_to_object:3,narrow:3,nativ:[0,3],nearli:3,necessari:3,necessarili:[0,3],need:[0,3,5],neg:3,never:[0,3],new_branch:[3,5],new_fil:3,new_file_path:5,new_from_sha:3,new_head:3,new_message_handl:3,new_nam:[3,5],new_origin:5,new_path:3,new_tag:[3,5],new_url:3,newbinsha:3,newer:[0,2],newhexsha:3,newli:3,newlin:[0,3],next:[0,3,5],nice:[0,3],no_checkout:3,no_match:3,node:3,non:[0,3,5],none:[0,3,5],nonetheless:3,nor:3,normal:3,nose:2,nosetest:2,nosuchpatherror:3,notat:[3,5],noth:3,notic:0,notion:5,now:[0,3,5],null_bin_sha:3,null_hex_sha:[0,3],null_tre:[0,3],number:[0,3,5],numer:3,obj:3,object_type_nam:3,objectdatabas:3,oblig:3,obtain:0,obviou:0,occour:[0,3],odb:[0,3],odbt:[3,5],offici:0,offset:3,often:3,old:[0,3],old_commit:3,old_env:3,old_url:3,oldbinsha:3,older:[0,2,3],oldest:5,oldhexsha:3,omit:3,onc:[3,5],onli:[0,2,3,5],op_cod:[3,5],op_mask:3,opcod:3,open:[3,5],openshift:5,opensourc:3,oper:[0,2,3,5],oppos:3,opposit:3,optim:2,optin:3,option:[0,3,5],ord:3,order:[0,3,5],org:3,organ:2,orig_head:[0,3],origin:[3,5],oserror:[0,3],ostream:3,other:[0,3,5],other_url:5,otherwis:3,ouput:3,ouput_stream:3,our:[3,5],ourselv:[3,5],out:[0,2,3,5],output:[0,3,5],output_stream:3,over:[2,5],overhead:[],overrid:[0,3],overridden:3,overview:[],overwrit:[3,5],overwritten:3,own:[0,3,5],pack:5,page:[1,5],pair:3,param:3,paramet:[0,3,5],parent:[3,5],parent_commit:[3,5],parentless:0,parlanc:5,parm:3,pars:[0,3],parse_actor_and_d:3,parse_d:3,parser:[0,3],part:[0,3],parti:3,partial:3,particular:5,pass:[0,3,5],past:[0,3,5],past_branch:5,patch:[0,3],path:[0,3,5],path_prefix:3,path_rewrit:3,pathchang:3,pathstr:3,penalti:[],pend:3,peopl:2,per:[3,5],perform:[0,3,5],period:[2,3],perman:5,persist:[0,3,5],person:3,peter:3,pick:0,pickl:0,pile:3,pip:[0,2],pipe:3,place:[3,5],plai:3,plain:[0,3],platform:[2,3],pleas:[0,2,3,5],plenti:3,plu:3,plumb:2,point:[0,3,5],pointer:[0,5],popen:3,popul:0,porcelain:2,portion:3,posit:[0,3],posix:[0,5],possbl:3,possibl:[0,3],post:0,post_clear_cach:3,power:[2,5],practic:3,pre:[0,3],preced:3,predessessor:3,predic:3,prefix:[0,3],prepar:[0,5],prepend:3,present:[0,3,5],preserv:0,preset:5,preston:3,prevent:[0,3,5],previou:[0,3,5],previous:[0,3],previous_commit:3,prevous:0,print:[0,3,5],prior:[0,5],privat:0,probabl:[3,5],problem:[0,3],proc:3,proce:3,process:[0,2,3,5],processstreamadapt:3,produc:[0,3,5],product:0,program:[3,5],programat:5,progress:[0,3,5],project:[0,3,5],prompt:5,prone:5,proper:2,properli:[0,3],properti:[0,3],protect:3,protocol:0,provid:[0,2,3,5],prune:[0,3],pteichman:3,pub:3,publish:3,pull:[0,3,5],pure:[0,2,3,5],purpos:[3,5],push:[0,3,5],pushinfo:3,pushurl:[3,5],put:[3,5],pwd:3,py2:3,py3:[0,3,5],pyc:0,pypi:2,quantiti:[2,5],queri:[0,3,5],question:[],quickli:[0,3],quit:3,qurei:3,rais:[0,3],ran:2,rang:3,rather:[0,3,5],raw:[0,3],raw_rename_from:[0,3],raw_rename_to:[0,3],re_author_committer_start:3,re_fetch_result:3,re_head:3,re_hexsha_onli:3,re_hexsha_shorten:3,re_op_absolut:3,re_op_rel:3,re_tab_full_lin:3,re_whitespac:3,reachabl:3,react:3,read:[0,3,5],read_cach:3,readabl:[3,5],reader:[3,5],readi:0,readlin:3,real:[0,5],realli:3,reason:[0,2,3],receiv:[0,3],recent:[0,3,5],recommend:[2,3],record:[3,5],recurisv:3,recurs:[0,2,3,5],redirect:0,reduc:0,ref:0,ref_path:3,refer:0,referenc:5,referer:3,refernc:3,reflect:[0,3],reflog:[0,3,5],reflogentri:[0,3],refspec:[3,5],refus:0,regardless:3,region:3,reimplement:5,reiniti:3,reject:3,rel:[3,5],relat:[3,5],releas:[0,3,5],relev:5,reli:[0,3],reliabl:0,remain:3,rememb:3,remote_failur:3,remote_head:3,remote_nam:3,remote_ref:3,remote_ref_path:3,remote_ref_str:3,remote_refer:3,remote_reject:3,remoteprogress:[0,3,5],remoterefer:3,remov:[0,3,5],rename_from:[0,3],rename_sect:0,rename_to:[0,3],renamed_fil:3,render:3,repeatedli:3,repjrel:0,replac:[0,3],replic:0,repo_dir:5,report:0,repositori:0,repositorydirtyerror:3,repostori:3,repr:0,repres:[0,3,5],represent:3,requir:0,requri:3,reread:3,resembl:3,reset:[3,5],resolv:[0,3],resolve_blob:3,resourc:0,respect:[0,3,4,5],respons:[0,3],rest:3,restor:3,restrict:3,result:[0,3,5],retriev:[0,3,5],return_ref:3,reus:3,rev:[0,3],rev_pars:[0,3],reva:3,revb:3,revers:0,revert:3,revis:[0,3,5],revlog:3,rfc:3,right:[0,2,3,5],rmtree:3,roadmap:[],robust:0,root:0,root_tre:3,rootmodul:[3,5],rootupdateprogress:3,rorepo:5,run:[0,2,3,5],run_commit_hook:3,rval:3,rw_dir:5,s_ifgitlink:3,safe:[0,3,5],safer:5,sai:5,same:[0,3,5],save:[0,3,5],scale:0,scheme:0,scm:3,scope:[0,3],script:[2,5],search:[0,1,2,3],search_parent_directori:[0,3],sebastian:5,second:[0,3,5],secs_west_of_utc:3,section:[0,2,3,5],sectionconstraint:3,see:[0,2,3],select:4,self:[3,5],semant:0,sens:0,sent:3,separ:[2,3],seper:0,sequenc:3,serial:[0,3],serializ:3,serv:3,set:[0,3,5],set_commit:[0,3,5],set_don:3,set_object:[0,3],set_parent_commit:[3,5],set_refer:[0,3,5],set_submodul:3,set_tracking_branch:[0,3,5],set_url:3,set_valu:5,setattr:5,setup:[2,3,5],seturl:0,sever:3,sfrom:3,sha1:[0,3,5],sha:[0,3,5],share:3,shastreamcl:3,shell:[0,3],short_to_long:3,shortest:3,should:[0,2,3,5],shouldn:3,show:5,shown:[3,5],shutil:3,side:[3,5],sigkil:3,sign:3,signal:0,signatur:[0,3],signific:[],silent:[3,5],similar:[0,3,5],similarli:5,simpl:[0,3,5],simpli:3,simul:3,sinc:[0,2,3,5],singl:[0,3,5],situat:3,size:[0,3,5],size_as_int:3,skip:[3,5],skip_hook:[0,3],sleep:3,slice:3,slightli:0,slow:[],slower:5,sm_name:3,sm_section:3,small:[3,5],smaller:0,smarter:5,smartli:3,smmap:5,softli:5,softwar:3,sole:[2,3],some:[0,2,3,5],someth:[0,3],sometim:0,somewhat:3,somwhat:3,sophist:5,sort:[3,5],sourc:0,space:[0,3],span:3,sparringli:3,speak:5,spec:[0,3,5],special:[0,3,5],specif:[0,3,5],specifi:[0,3,5],specifii:3,speed:3,spend:2,sphinx:0,split:3,split_single_char_opt:3,spot:[3,5],src:3,sre_pattern:3,ssh:[0,5],ssh_cmd:5,ssh_execut:5,ssh_wrapper:3,stabl:0,stackoverflow:2,stage:[0,3,5],stage_blob:3,stage_mask:3,stai:[3,5],stale:3,stale_ref:3,stand:3,standard:[3,5],start:0,startswith:5,stat:[0,3,5],stat_mode_to_index_mod:3,state:[3,5],statment:0,statu:[0,3,5],stderr:[0,3,5],stdin:0,stdout:[0,3,5],stdout_as_str:3,step:[0,5],still:[0,2,3,5],stop:3,storabl:5,store:[0,3],str:[3,5],straight:3,stream:[0,2,3,5],stream_copi:3,stream_data:[3,5],stream_nam:3,stream_object_data:3,strength:[],strftime:5,stricthostkeycheck:5,string:[0,3,5],string_dat:3,strip:0,structur:[0,2],stuff:0,style:3,sub:[0,5],subclass:[3,5],subcommand:[0,3],subdirectori:[3,5],submodul:0,submodule_upd:[3,5],submoduleconfigpars:3,subprocess:3,subprocess_kwarg:3,subrepo:5,subsequ:3,subtre:3,succe:3,successfulli:[0,3],successor:3,suffer:3,suffici:0,suffix:0,suit:[0,2],suitabl:[0,3],summari:[0,3],suppli:3,suppos:[3,5],sure:[0,3,5],svn:5,swap:3,symbol:0,symbolicref:3,symbolicrefer:[0,3],symlink:3,symlink_id:3,symref:3,sync:3,synchron:3,syntax:[0,5],system:0,sytem:3,tab:0,tag:0,tag_upd:3,tagged_d:3,tagged_tz_offset:3,tagger:3,tagger_tz_offset:3,tagobject:3,tagref:[3,5],tagrefer:3,take:[0,3,5],taken:3,tar:5,target:3,task:4,technic:[0,3],techniqu:3,teichman:3,tell:3,temporari:[3,5],temporarili:3,temporaryfileswap:3,ten_commits_past_twenti:5,tend:2,term:0,test_doc:5,testcas:0,text:3,than:[0,3,5],thei:[0,2,3,5],them:[0,3,5],therefor:3,thi:[0,2,3,5],thiel:5,thing:[0,3,5],think:[],third:3,thorough:5,those:[0,3],though:[0,3,5],thread:[0,3],threadsaf:3,three:[0,3,5],through:[0,2,3,5],througout:3,thrown:[0,3],thu:[0,3,5],time:[0,2,3,5],timeout:3,timestamp:[0,3],timestamp_utc:3,timezon:[0,3],timezone_offset:3,tini:[],tip:5,titl:3,tmp:3,tmp_file_path:3,to_blob:3,to_commit:3,to_fil:3,to_full_path:3,to_latest_revis:[3,5],to_native_path_linux:3,to_path:3,togeth:3,token:3,token_separ:3,tom:3,too:5,tool:3,total:[3,5],touch:[3,5],traceback:3,track:[0,3,5],tracker:[],tracking_branch:[0,3],tradition:3,trail:3,trailer:3,transfer:[0,3],transform:3,transform_kwarg:3,translat:5,travers:[0,3,5],traverse_tree_recurs:3,traverse_trees_recurs:3,travi:5,treat:[0,5],tree_count:5,tree_entri:3,tree_entries_from_data:3,tree_id:3,tree_relative_path:3,tree_sha:3,tree_to_stream:3,treeish:[0,3],treemodifi:3,tri:5,trigger:0,trivial:3,tty:3,tupl:[0,3,5],turn:[0,5],tutori:0,two:[0,3,5],txt:3,typ:3,type:0,type_str:3,typeerror:0,typic:3,tz_offset:3,tzname:3,tzoffset:3,uid:3,unalt:3,unambigu:0,unbare_repo:3,uncommit:3,uncompress:[3,5],undefin:3,under:[0,2,3,5],underli:3,understand:[],understood:3,undesir:[0,3],unexpect:3,unfortun:3,unicod:0,unifi:0,uniform:3,unimport:0,uniqu:[0,3,5],unit:[2,5],universal_newlin:3,unix:0,unknown:3,unless:[0,3],unlik:3,unlimit:3,unmerg:3,unmerged_blob:3,unmergedentrieserror:[0,3],unnecessari:0,unpack:[3,5],unsaf:0,unset:3,unsuspect:3,until:3,untouch:5,untrack:[0,3,5],untracked_fil:[0,3,5],up_to_d:3,updat:[0,2,3,5],update_cach:0,update_environ:[3,5],updateprogress:3,updwktre:3,upgrad:0,upstream:[0,3],url:[0,3,5],urlchang:3,usag:0,use_shel:[0,3],useabl:3,usecas:5,user:[0,2,3,5],usign:3,usr:5,usual:[0,3,5],usulli:3,utc:3,utcoffset:3,utctz:3,utctz_to_altz:3,utf:[0,3],util:0,valid:[0,3,5],valid_fil:3,valu:[0,3,5],valueerror:3,variabl:[0,3,5],variou:5,vast:5,veri:[0,3,5],verifi:[0,2,3],verify_utctz:3,versatil:0,version:[0,2,3,5],version_info:[0,3],via:[0,3],viabl:3,virtual:3,visit_onc:3,wai:[0,2,3,5],wait:3,waitgroup:3,walk:2,want:[0,2,3,5],warn:3,wasn:[0,5],weak:3,weight:3,well:[0,2,3,5],went:3,were:[0,3,5],werner:3,what:[0,5],when:[0,2,3,5],whenev:3,where:[0,2,3,5],wherea:[3,5],whereev:3,wherev:3,whether:[0,3,5],which:[0,2,3,5],whish:3,who:[0,3],whole:3,whose:3,why:[3,5],wide:[0,3],window:[0,5],wire:3,wise:3,with_except:[0,3],with_extended_output:3,with_keep_cwd:3,with_raw_output:0,with_statu:0,with_stdout:[0,3],within:[0,3],without:[0,3,5],work:[0,2,3,5],work_tre:3,workaround:3,working_dir:[0,3],working_tre:[3,5],working_tree_dir:[0,3,5],worktre:3,worktreerepositoryunsupport:3,world:0,worri:5,worsen:2,worth:3,would:[0,2,3,5],wouldn:3,wrap:[3,5],wrapper:[0,3],write:[0,3,5],write_cach:3,write_extension_data:[0,3],write_sha:3,write_tre:[0,3],write_tree_from_cach:3,writer:[3,5],written:[0,2,3,5],wrong:3,www:3,x00:3,x86:5,yet:[0,3,5],yiel:3,yield:[3,5],you:[0,2,3,5],your:[0,2,3,5],yourself:[2,3],yyyi:3,zero:[0,3]},titles:["Changelog","GitPython Documentation","Overview / Install","API Reference","Roadmap","GitPython Tutorial"],titleterms:{"function":3,"new":0,"switch":5,advanc:5,answer:2,api:[2,3],base:3,best:2,beta:0,blob:[0,3],branch:5,bugfix:0,changelog:0,code:2,command:5,commit:[0,3,5],config:[0,3],custom:5,databas:5,debug:5,dif:0,diff:[0,3,5],directli:5,document:1,effort:2,even:5,examin:5,except:3,featur:0,fix:0,footprint:[],framework:0,gener:0,get:2,git:[0,5],gitcmd:3,gitcmdobjectdb:5,gitcommand:0,gitdb:5,gitpython:[1,2,5],handl:5,head:[0,3],index:[0,3,5],indic:1,inform:[2,5],initi:5,instal:2,issu:2,item:0,iter:0,leakag:2,licens:2,limit:2,log:3,meet:5,memori:[],modifi:5,modul:0,more:5,note:0,object:[0,3,5],obtain:5,overview:2,packag:0,python:[0,2],question:2,rc1:0,reduc:[],ref:3,refer:[2,3,5],referernc:0,remot:[0,3,5],renam:0,repo:[0,3,5],repositori:5,requir:2,resourc:2,roadmap:4,root:3,sourc:2,start:2,submodul:[3,5],support:[0,2],symbol:3,system:2,tabl:1,tag:3,test:0,tracker:2,tree:[0,3,5],tutori:5,type:[3,5],understand:5,usag:5,util:3,what:[],window:2}})
+0
-738
doc/build/html/tutorial.html less more
0 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
1 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
3
4 <html xmlns="http://www.w3.org/1999/xhtml">
5 <head>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
8 <title>GitPython Tutorial &mdash; GitPython 2.0.9dev0 documentation</title>
9
10 <link rel="stylesheet" href="_static/default.css" type="text/css" />
11 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
12
13 <script type="text/javascript">
14 var DOCUMENTATION_OPTIONS = {
15 URL_ROOT: './',
16 VERSION: '2.0.9dev0',
17 COLLAPSE_INDEX: false,
18 FILE_SUFFIX: '.html',
19 HAS_SOURCE: true
20 };
21 </script>
22 <script type="text/javascript" src="_static/jquery.js"></script>
23 <script type="text/javascript" src="_static/underscore.js"></script>
24 <script type="text/javascript" src="_static/doctools.js"></script>
25 <link rel="top" title="GitPython 2.0.9dev0 documentation" href="index.html" />
26 <link rel="next" title="API Reference" href="reference.html" />
27 <link rel="prev" title="Whats New in 0.3" href="whatsnew.html" />
28
29
30 <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
31
32 </head>
33 <body role="document">
34
35 <div class="document">
36 <div class="documentwrapper">
37 <div class="bodywrapper">
38 <div class="body" role="main">
39
40 <div class="section" id="gitpython-tutorial">
41 <span id="tutorial-label"></span><h1>GitPython Tutorial<a class="headerlink" href="#gitpython-tutorial" title="Permalink to this headline">¶</a></h1>
42 <p>GitPython provides object model access to your git repository. This tutorial is composed of multiple sections, most of which explains a real-life usecase.</p>
43 <p>All code presented here originated from <a class="reference external" href="https://github.com/gitpython-developers/GitPython/blob/master/git/test/test_docs.py">test_docs.py</a> to assure correctness. Knowing this should also allow you to more easily run the code for your own testing purposes, all you need is a developer installation of git-python.</p>
44 <div class="section" id="meet-the-repo-type">
45 <h2>Meet the Repo type<a class="headerlink" href="#meet-the-repo-type" title="Permalink to this headline">¶</a></h2>
46 <p>The first step is to create a <a class="reference internal" href="reference.html#git.repo.base.Repo" title="git.repo.base.Repo"><code class="xref py py-class docutils literal"><span class="pre">git.Repo</span></code></a> object to represent your repository.</p>
47 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="kn">from</span> <span class="nn">git</span> <span class="kn">import</span> <span class="n">Repo</span>
48 <span class="n">join</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span>
49
50 <span class="c1"># rorepo is a Repo instance pointing to the git-python repository.</span>
51 <span class="c1"># For all you know, the first argument to Repo is a path to the repository</span>
52 <span class="c1"># you want to work with</span>
53 <span class="n">repo</span> <span class="o">=</span> <span class="n">Repo</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">rorepo</span><span class="o">.</span><span class="n">working_tree_dir</span><span class="p">)</span>
54 <span class="k">assert</span> <span class="ow">not</span> <span class="n">repo</span><span class="o">.</span><span class="n">bare</span>
55 </pre></div>
56 </div>
57 <p>In the above example, the directory <code class="docutils literal"><span class="pre">self.rorepo.working_tree_dir</span></code> equals <code class="docutils literal"><span class="pre">/Users/mtrier/Development/git-python</span></code> and is my working repository which contains the <code class="docutils literal"><span class="pre">.git</span></code> directory. You can also initialize GitPython with a <em>bare</em> repository.</p>
58 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="n">bare_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="n">join</span><span class="p">(</span><span class="n">rw_dir</span><span class="p">,</span> <span class="s1">&#39;bare-repo&#39;</span><span class="p">),</span> <span class="n">bare</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
59 <span class="k">assert</span> <span class="n">bare_repo</span><span class="o">.</span><span class="n">bare</span>
60 </pre></div>
61 </div>
62 <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>
63 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="n">repo</span><span class="o">.</span><span class="n">config_reader</span><span class="p">()</span> <span class="c1"># get a config reader for read-only access</span>
64 <span class="n">cw</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">config_writer</span><span class="p">()</span> <span class="c1"># get a config writer to change configuration</span>
65 <span class="n">cw</span><span class="o">.</span><span class="n">release</span><span class="p">()</span> <span class="c1"># call release() to be sure changes are written and locks are released</span>
66 </pre></div>
67 </div>
68 <p>Query the active branch, query untracked files or whether the repository data has been modified.</p>
69 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="k">assert</span> <span class="ow">not</span> <span class="n">bare_repo</span><span class="o">.</span><span class="n">is_dirty</span><span class="p">()</span> <span class="c1"># check the dirty state</span>
70 <span class="n">repo</span><span class="o">.</span><span class="n">untracked_files</span> <span class="c1"># retrieve a list of untracked files</span>
71 <span class="c1"># [&#39;my_untracked_file&#39;]</span>
72 </pre></div>
73 </div>
74 <p>Clone from existing repositories or initialize new empty ones.</p>
75 <div class="highlight-python"><div class="highlight"><pre><span></span> <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="n">join</span><span class="p">(</span><span class="n">rw_dir</span><span class="p">,</span> <span class="s1">&#39;to/this/path&#39;</span><span class="p">))</span>
76 <span class="k">assert</span> <span class="n">cloned_repo</span><span class="o">.</span><span class="n">__class__</span> <span class="ow">is</span> <span class="n">Repo</span> <span class="c1"># clone an existing repository</span>
77 <span class="k">assert</span> <span class="n">Repo</span><span class="o">.</span><span class="n">init</span><span class="p">(</span><span class="n">join</span><span class="p">(</span><span class="n">rw_dir</span><span class="p">,</span> <span class="s1">&#39;path/for/new/repo&#39;</span><span class="p">))</span><span class="o">.</span><span class="n">__class__</span> <span class="ow">is</span> <span class="n">Repo</span>
78 </pre></div>
79 </div>
80 <p>Archive the repository contents to a tar file.</p>
81 <div class="highlight-python"><div class="highlight"><pre><span></span> <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="n">join</span><span class="p">(</span><span class="n">rw_dir</span><span class="p">,</span> <span class="s1">&#39;repo.tar&#39;</span><span class="p">),</span> <span class="s1">&#39;wb&#39;</span><span class="p">))</span>
82 </pre></div>
83 </div>
84 <div class="section" id="advanced-repo-usage">
85 <h3>Advanced Repo Usage<a class="headerlink" href="#advanced-repo-usage" title="Permalink to this headline">¶</a></h3>
86 <p>And of course, there is much more you can do with this type, most of the following will be explained in greater detail in specific tutorials. Don&#8217;t worry if you don&#8217;t understand some of these examples right away, as they may require a thorough understanding of gits inner workings.</p>
87 <p>Query relevant repository paths ...</p>
88 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="k">assert</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">isdir</span><span class="p">(</span><span class="n">cloned_repo</span><span class="o">.</span><span class="n">working_tree_dir</span><span class="p">)</span> <span class="c1"># directory with your work files</span>
89 <span class="k">assert</span> <span class="n">cloned_repo</span><span class="o">.</span><span class="n">git_dir</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="n">cloned_repo</span><span class="o">.</span><span class="n">working_tree_dir</span><span class="p">)</span> <span class="c1"># directory containing the git repository</span>
90 <span class="k">assert</span> <span class="n">bare_repo</span><span class="o">.</span><span class="n">working_tree_dir</span> <span class="ow">is</span> <span class="bp">None</span> <span class="c1"># bare repositories have no working tree</span>
91 </pre></div>
92 </div>
93 <p><a class="reference internal" href="reference.html#git.refs.head.Head" title="git.refs.head.Head"><code class="xref py py-class docutils literal"><span class="pre">Heads</span></code></a> Heads are branches in git-speak. <a class="reference internal" href="reference.html#git.refs.reference.Reference" title="git.refs.reference.Reference"><code class="xref py py-class docutils literal"><span class="pre">References</span></code></a> are pointers to a specific commit or to other references. Heads and <a class="reference internal" href="reference.html#git.refs.tag.TagReference" title="git.refs.tag.TagReference"><code class="xref py py-class docutils literal"><span class="pre">Tags</span></code></a> are a kind of references. GitPython allows you to query them rather intuitively.</p>
94 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="k">assert</span> <span class="n">repo</span><span class="o">.</span><span class="n">head</span><span class="o">.</span><span class="n">ref</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">master</span> <span class="c1"># head is a symbolic reference pointing to master</span>
95 <span class="k">assert</span> <span class="n">repo</span><span class="o">.</span><span class="n">tags</span><span class="p">[</span><span class="s1">&#39;0.3.5&#39;</span><span class="p">]</span> <span class="o">==</span> <span class="n">repo</span><span class="o">.</span><span class="n">tag</span><span class="p">(</span><span class="s1">&#39;refs/tags/0.3.5&#39;</span><span class="p">)</span> <span class="c1"># you can access tags in various ways too</span>
96 <span class="k">assert</span> <span class="n">repo</span><span class="o">.</span><span class="n">refs</span><span class="o">.</span><span class="n">master</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="s1">&#39;master&#39;</span><span class="p">]</span> <span class="c1"># .refs provides access to all refs, i.e. heads ...</span>
97
98 <span class="k">if</span> <span class="s1">&#39;TRAVIS&#39;</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">os</span><span class="o">.</span><span class="n">environ</span><span class="p">:</span>
99 <span class="k">assert</span> <span class="n">repo</span><span class="o">.</span><span class="n">refs</span><span class="p">[</span><span class="s1">&#39;origin/master&#39;</span><span class="p">]</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="o">.</span><span class="n">refs</span><span class="o">.</span><span class="n">master</span> <span class="c1"># ... remotes ...</span>
100 <span class="k">assert</span> <span class="n">repo</span><span class="o">.</span><span class="n">refs</span><span class="p">[</span><span class="s1">&#39;0.3.5&#39;</span><span class="p">]</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="s1">&#39;0.3.5&#39;</span><span class="p">]</span> <span class="c1"># ... and tags</span>
101 </pre></div>
102 </div>
103 <p>You can also create new heads ...</p>
104 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="n">new_branch</span> <span class="o">=</span> <span class="n">cloned_repo</span><span class="o">.</span><span class="n">create_head</span><span class="p">(</span><span class="s1">&#39;feature&#39;</span><span class="p">)</span> <span class="c1"># create a new branch ...</span>
105 <span class="k">assert</span> <span class="n">cloned_repo</span><span class="o">.</span><span class="n">active_branch</span> <span class="o">!=</span> <span class="n">new_branch</span> <span class="c1"># which wasn&#39;t checked out yet ...</span>
106 <span class="k">assert</span> <span class="n">new_branch</span><span class="o">.</span><span class="n">commit</span> <span class="o">==</span> <span class="n">cloned_repo</span><span class="o">.</span><span class="n">active_branch</span><span class="o">.</span><span class="n">commit</span> <span class="c1"># and which points to the checked-out commit</span>
107 <span class="c1"># It&#39;s easy to let a branch point to the previous commit, without affecting anything else</span>
108 <span class="c1"># Each reference provides access to the git object it points to, usually commits</span>
109 <span class="k">assert</span> <span class="n">new_branch</span><span class="o">.</span><span class="n">set_commit</span><span class="p">(</span><span class="s1">&#39;HEAD~1&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">commit</span> <span class="o">==</span> <span class="n">cloned_repo</span><span class="o">.</span><span class="n">active_branch</span><span class="o">.</span><span class="n">commit</span><span class="o">.</span><span class="n">parents</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
110 </pre></div>
111 </div>
112 <p>... and tags ...</p>
113 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="n">past</span> <span class="o">=</span> <span class="n">cloned_repo</span><span class="o">.</span><span class="n">create_tag</span><span class="p">(</span><span class="s1">&#39;past&#39;</span><span class="p">,</span> <span class="n">ref</span><span class="o">=</span><span class="n">new_branch</span><span class="p">,</span>
114 <span class="n">message</span><span class="o">=</span><span class="s2">&quot;This is a tag-object pointing to </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">new_branch</span><span class="o">.</span><span class="n">name</span><span class="p">)</span>
115 <span class="k">assert</span> <span class="n">past</span><span class="o">.</span><span class="n">commit</span> <span class="o">==</span> <span class="n">new_branch</span><span class="o">.</span><span class="n">commit</span> <span class="c1"># the tag points to the specified commit</span>
116 <span class="k">assert</span> <span class="n">past</span><span class="o">.</span><span class="n">tag</span><span class="o">.</span><span class="n">message</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">&quot;This is&quot;</span><span class="p">)</span> <span class="c1"># and its object carries the message provided</span>
117
118 <span class="n">now</span> <span class="o">=</span> <span class="n">cloned_repo</span><span class="o">.</span><span class="n">create_tag</span><span class="p">(</span><span class="s1">&#39;now&#39;</span><span class="p">)</span> <span class="c1"># This is a tag-reference. It may not carry meta-data</span>
119 <span class="k">assert</span> <span class="n">now</span><span class="o">.</span><span class="n">tag</span> <span class="ow">is</span> <span class="bp">None</span>
120 </pre></div>
121 </div>
122 <p>You can traverse down to <a class="reference internal" href="reference.html#git.objects.base.Object" title="git.objects.base.Object"><code class="xref py py-class docutils literal"><span class="pre">git</span> <span class="pre">objects</span></code></a> through references and other objects. Some objects like <a class="reference internal" href="reference.html#git.objects.commit.Commit" title="git.objects.commit.Commit"><code class="xref py py-class docutils literal"><span class="pre">commits</span></code></a> have additional meta-data to query.</p>
123 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="k">assert</span> <span class="n">now</span><span class="o">.</span><span class="n">commit</span><span class="o">.</span><span class="n">message</span> <span class="o">!=</span> <span class="n">past</span><span class="o">.</span><span class="n">commit</span><span class="o">.</span><span class="n">message</span>
124 <span class="c1"># You can read objects directly through binary streams, no working tree required</span>
125 <span class="k">assert</span> <span class="p">(</span><span class="n">now</span><span class="o">.</span><span class="n">commit</span><span class="o">.</span><span class="n">tree</span> <span class="o">/</span> <span class="s1">&#39;VERSION&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">data_stream</span><span class="o">.</span><span class="n">read</span><span class="p">()</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s1">&#39;ascii&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s1">&#39;2&#39;</span><span class="p">)</span>
126
127 <span class="c1"># You can traverse trees as well to handle all contained files of a particular commit</span>
128 <span class="n">file_count</span> <span class="o">=</span> <span class="mi">0</span>
129 <span class="n">tree_count</span> <span class="o">=</span> <span class="mi">0</span>
130 <span class="n">tree</span> <span class="o">=</span> <span class="n">past</span><span class="o">.</span><span class="n">commit</span><span class="o">.</span><span class="n">tree</span>
131 <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="n">tree</span><span class="o">.</span><span class="n">traverse</span><span class="p">():</span>
132 <span class="n">file_count</span> <span class="o">+=</span> <span class="n">item</span><span class="o">.</span><span class="n">type</span> <span class="o">==</span> <span class="s1">&#39;blob&#39;</span>
133 <span class="n">tree_count</span> <span class="o">+=</span> <span class="n">item</span><span class="o">.</span><span class="n">type</span> <span class="o">==</span> <span class="s1">&#39;tree&#39;</span>
134 <span class="k">assert</span> <span class="n">file_count</span> <span class="ow">and</span> <span class="n">tree_count</span> <span class="c1"># we have accumulated all directories and files</span>
135 <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="n">tree</span><span class="o">.</span><span class="n">blobs</span><span class="p">)</span> <span class="o">+</span> <span class="nb">len</span><span class="p">(</span><span class="n">tree</span><span class="o">.</span><span class="n">trees</span><span class="p">)</span> <span class="o">==</span> <span class="nb">len</span><span class="p">(</span><span class="n">tree</span><span class="p">)</span> <span class="c1"># a tree is iterable itself to traverse its children</span>
136 </pre></div>
137 </div>
138 <p><a class="reference internal" href="reference.html#git.remote.Remote" title="git.remote.Remote"><code class="xref py py-class docutils literal"><span class="pre">Remotes</span></code></a> allow to handle fetch, pull and push operations, while providing optional real-time progress information to <a class="reference internal" href="reference.html#git.util.RemoteProgress" title="git.util.RemoteProgress"><code class="xref py py-class docutils literal"><span class="pre">progress</span> <span class="pre">delegates</span></code></a>.</p>
139 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="kn">from</span> <span class="nn">git</span> <span class="kn">import</span> <span class="n">RemoteProgress</span>
140
141 <span class="k">class</span> <span class="nc">MyProgressPrinter</span><span class="p">(</span><span class="n">RemoteProgress</span><span class="p">):</span>
142 <span class="k">def</span> <span class="nf">update</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">op_code</span><span class="p">,</span> <span class="n">cur_count</span><span class="p">,</span> <span class="n">max_count</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="n">message</span><span class="o">=</span><span class="s1">&#39;&#39;</span><span class="p">):</span>
143 <span class="k">print</span><span class="p">(</span><span class="n">op_code</span><span class="p">,</span> <span class="n">cur_count</span><span class="p">,</span> <span class="n">max_count</span><span class="p">,</span> <span class="n">cur_count</span> <span class="o">/</span> <span class="p">(</span><span class="n">max_count</span> <span class="ow">or</span> <span class="mf">100.0</span><span class="p">),</span> <span class="n">message</span> <span class="ow">or</span> <span class="s2">&quot;NO MESSAGE&quot;</span><span class="p">)</span>
144 <span class="c1"># end</span>
145
146 <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="n">cloned_repo</span><span class="o">.</span><span class="n">remotes</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span> <span class="c1"># we have been cloned, so there should be one remote</span>
147 <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="n">bare_repo</span><span class="o">.</span><span class="n">remotes</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span> <span class="c1"># this one was just initialized</span>
148 <span class="n">origin</span> <span class="o">=</span> <span class="n">bare_repo</span><span class="o">.</span><span class="n">create_remote</span><span class="p">(</span><span class="s1">&#39;origin&#39;</span><span class="p">,</span> <span class="n">url</span><span class="o">=</span><span class="n">cloned_repo</span><span class="o">.</span><span class="n">working_tree_dir</span><span class="p">)</span>
149 <span class="k">assert</span> <span class="n">origin</span><span class="o">.</span><span class="n">exists</span><span class="p">()</span>
150 <span class="k">for</span> <span class="n">fetch_info</span> <span class="ow">in</span> <span class="n">origin</span><span class="o">.</span><span class="n">fetch</span><span class="p">(</span><span class="n">progress</span><span class="o">=</span><span class="n">MyProgressPrinter</span><span class="p">()):</span>
151 <span class="k">print</span><span class="p">(</span><span class="s2">&quot;Updated </span><span class="si">%s</span><span class="s2"> to </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">fetch_info</span><span class="o">.</span><span class="n">ref</span><span class="p">,</span> <span class="n">fetch_info</span><span class="o">.</span><span class="n">commit</span><span class="p">))</span>
152 <span class="c1"># create a local branch at the latest fetched master. We specify the name statically, but you have all</span>
153 <span class="c1"># information to do it programatically as well.</span>
154 <span class="n">bare_master</span> <span class="o">=</span> <span class="n">bare_repo</span><span class="o">.</span><span class="n">create_head</span><span class="p">(</span><span class="s1">&#39;master&#39;</span><span class="p">,</span> <span class="n">origin</span><span class="o">.</span><span class="n">refs</span><span class="o">.</span><span class="n">master</span><span class="p">)</span>
155 <span class="n">bare_repo</span><span class="o">.</span><span class="n">head</span><span class="o">.</span><span class="n">set_reference</span><span class="p">(</span><span class="n">bare_master</span><span class="p">)</span>
156 <span class="k">assert</span> <span class="ow">not</span> <span class="n">bare_repo</span><span class="o">.</span><span class="n">delete_remote</span><span class="p">(</span><span class="n">origin</span><span class="p">)</span><span class="o">.</span><span class="n">exists</span><span class="p">()</span>
157 <span class="c1"># push and pull behave very similarly</span>
158 </pre></div>
159 </div>
160 <p>The <a class="reference internal" href="reference.html#git.index.base.IndexFile" title="git.index.base.IndexFile"><code class="xref py py-class docutils literal"><span class="pre">index</span></code></a> is also called stage in git-speak. It is used to prepare new commits, and can be used to keep results of merge operations. Our index implementation allows to stream date into the index, which is useful for bare repositories that do not have a working tree.</p>
161 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="k">assert</span> <span class="n">new_branch</span><span class="o">.</span><span class="n">checkout</span><span class="p">()</span> <span class="o">==</span> <span class="n">cloned_repo</span><span class="o">.</span><span class="n">active_branch</span> <span class="c1"># checking out a branch adjusts the working tree</span>
162 <span class="k">assert</span> <span class="n">new_branch</span><span class="o">.</span><span class="n">commit</span> <span class="o">==</span> <span class="n">past</span><span class="o">.</span><span class="n">commit</span> <span class="c1"># Now the past is checked out</span>
163
164 <span class="n">new_file_path</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">cloned_repo</span><span class="o">.</span><span class="n">working_tree_dir</span><span class="p">,</span> <span class="s1">&#39;my-new-file&#39;</span><span class="p">)</span>
165 <span class="nb">open</span><span class="p">(</span><span class="n">new_file_path</span><span class="p">,</span> <span class="s1">&#39;wb&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">close</span><span class="p">()</span> <span class="c1"># create new file in working tree</span>
166 <span class="n">cloned_repo</span><span class="o">.</span><span class="n">index</span><span class="o">.</span><span class="n">add</span><span class="p">([</span><span class="n">new_file_path</span><span class="p">])</span> <span class="c1"># add it to the index</span>
167 <span class="c1"># Commit the changes to deviate masters history</span>
168 <span class="n">cloned_repo</span><span class="o">.</span><span class="n">index</span><span class="o">.</span><span class="n">commit</span><span class="p">(</span><span class="s2">&quot;Added a new file in the past - for later merege&quot;</span><span class="p">)</span>
169
170 <span class="c1"># prepare a merge</span>
171 <span class="n">master</span> <span class="o">=</span> <span class="n">cloned_repo</span><span class="o">.</span><span class="n">heads</span><span class="o">.</span><span class="n">master</span> <span class="c1"># right-hand side is ahead of us, in the future</span>
172 <span class="n">merge_base</span> <span class="o">=</span> <span class="n">cloned_repo</span><span class="o">.</span><span class="n">merge_base</span><span class="p">(</span><span class="n">new_branch</span><span class="p">,</span> <span class="n">master</span><span class="p">)</span> <span class="c1"># allwos for a three-way merge</span>
173 <span class="n">cloned_repo</span><span class="o">.</span><span class="n">index</span><span class="o">.</span><span class="n">merge_tree</span><span class="p">(</span><span class="n">master</span><span class="p">,</span> <span class="n">base</span><span class="o">=</span><span class="n">merge_base</span><span class="p">)</span> <span class="c1"># write the merge result into index</span>
174 <span class="n">cloned_repo</span><span class="o">.</span><span class="n">index</span><span class="o">.</span><span class="n">commit</span><span class="p">(</span><span class="s2">&quot;Merged past and now into future ;)&quot;</span><span class="p">,</span>
175 <span class="n">parent_commits</span><span class="o">=</span><span class="p">(</span><span class="n">new_branch</span><span class="o">.</span><span class="n">commit</span><span class="p">,</span> <span class="n">master</span><span class="o">.</span><span class="n">commit</span><span class="p">))</span>
176
177 <span class="c1"># now new_branch is ahead of master, which probably should be checked out and reset softly.</span>
178 <span class="c1"># note that all these operations didn&#39;t touch the working tree, as we managed it ourselves.</span>
179 <span class="c1"># This definitely requires you to know what you are doing :) !</span>
180 <span class="k">assert</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">basename</span><span class="p">(</span><span class="n">new_file_path</span><span class="p">)</span> <span class="ow">in</span> <span class="n">new_branch</span><span class="o">.</span><span class="n">commit</span><span class="o">.</span><span class="n">tree</span> <span class="c1"># new file is now in tree</span>
181 <span class="n">master</span><span class="o">.</span><span class="n">commit</span> <span class="o">=</span> <span class="n">new_branch</span><span class="o">.</span><span class="n">commit</span> <span class="c1"># let master point to most recent commit</span>
182 <span class="n">cloned_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">master</span> <span class="c1"># we adjusted just the reference, not the working tree or index</span>
183 </pre></div>
184 </div>
185 <p><code class="xref py py-class docutils literal"><span class="pre">Submodules</span></code> represent all aspects of git submodules, which allows you query all of their related information, and manipulate in various ways.</p>
186 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="c1"># create a new submodule and check it out on the spot, setup to track master branch of `bare_repo`</span>
187 <span class="c1"># As our GitPython repository has submodules already that point to github, make sure we don&#39;t</span>
188 <span class="c1"># interact with them</span>
189 <span class="k">for</span> <span class="n">sm</span> <span class="ow">in</span> <span class="n">cloned_repo</span><span class="o">.</span><span class="n">submodules</span><span class="p">:</span>
190 <span class="k">assert</span> <span class="ow">not</span> <span class="n">sm</span><span class="o">.</span><span class="n">remove</span><span class="p">()</span><span class="o">.</span><span class="n">exists</span><span class="p">()</span> <span class="c1"># after removal, the sm doesn&#39;t exist anymore</span>
191 <span class="n">sm</span> <span class="o">=</span> <span class="n">cloned_repo</span><span class="o">.</span><span class="n">create_submodule</span><span class="p">(</span><span class="s1">&#39;mysubrepo&#39;</span><span class="p">,</span> <span class="s1">&#39;path/to/subrepo&#39;</span><span class="p">,</span> <span class="n">url</span><span class="o">=</span><span class="n">bare_repo</span><span class="o">.</span><span class="n">git_dir</span><span class="p">,</span> <span class="n">branch</span><span class="o">=</span><span class="s1">&#39;master&#39;</span><span class="p">)</span>
192
193 <span class="c1"># .gitmodules was written and added to the index, which is now being committed</span>
194 <span class="n">cloned_repo</span><span class="o">.</span><span class="n">index</span><span class="o">.</span><span class="n">commit</span><span class="p">(</span><span class="s2">&quot;Added submodule&quot;</span><span class="p">)</span>
195 <span class="k">assert</span> <span class="n">sm</span><span class="o">.</span><span class="n">exists</span><span class="p">()</span> <span class="ow">and</span> <span class="n">sm</span><span class="o">.</span><span class="n">module_exists</span><span class="p">()</span> <span class="c1"># this submodule is defintely available</span>
196 <span class="n">sm</span><span class="o">.</span><span class="n">remove</span><span class="p">(</span><span class="n">module</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> <span class="n">configuration</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span> <span class="c1"># remove the working tree</span>
197 <span class="k">assert</span> <span class="n">sm</span><span class="o">.</span><span class="n">exists</span><span class="p">()</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">sm</span><span class="o">.</span><span class="n">module_exists</span><span class="p">()</span> <span class="c1"># the submodule itself is still available</span>
198
199 <span class="c1"># update all submodules, non-recursively to save time, this method is very powerful, go have a look</span>
200 <span class="n">cloned_repo</span><span class="o">.</span><span class="n">submodule_update</span><span class="p">(</span><span class="n">recursive</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
201 <span class="k">assert</span> <span class="n">sm</span><span class="o">.</span><span class="n">module_exists</span><span class="p">()</span> <span class="c1"># The submodules working tree was checked out by update</span>
202 </pre></div>
203 </div>
204 </div>
205 </div>
206 <div class="section" id="examining-references">
207 <h2>Examining References<a class="headerlink" href="#examining-references" title="Permalink to this headline">¶</a></h2>
208 <p><a class="reference internal" href="reference.html#git.refs.reference.Reference" title="git.refs.reference.Reference"><code class="xref py py-class docutils literal"><span class="pre">References</span></code></a> are the tips of your commit graph from which you can easily examine the history of your project.</p>
209 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="kn">import</span> <span class="nn">git</span>
210 <span class="n">repo</span> <span class="o">=</span> <span class="n">git</span><span class="o">.</span><span class="n">Repo</span><span class="o">.</span><span class="n">clone_from</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_small_repo_url</span><span class="p">(),</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">rw_dir</span><span class="p">,</span> <span class="s1">&#39;repo&#39;</span><span class="p">),</span> <span class="n">branch</span><span class="o">=</span><span class="s1">&#39;master&#39;</span><span class="p">)</span>
211
212 <span class="n">heads</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">heads</span>
213 <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="c1"># lists can be accessed by name for convenience</span>
214 <span class="n">master</span><span class="o">.</span><span class="n">commit</span> <span class="c1"># the commit pointed to by head called master</span>
215 <span class="n">master</span><span class="o">.</span><span class="n">rename</span><span class="p">(</span><span class="s1">&#39;new_name&#39;</span><span class="p">)</span> <span class="c1"># rename heads</span>
216 <span class="n">master</span><span class="o">.</span><span class="n">rename</span><span class="p">(</span><span class="s1">&#39;master&#39;</span><span class="p">)</span>
217 </pre></div>
218 </div>
219 <p><a class="reference internal" href="reference.html#git.refs.tag.TagReference" title="git.refs.tag.TagReference"><code class="xref py py-class docutils literal"><span class="pre">Tags</span></code></a> are (usually immutable) references to a commit and/or a tag object.</p>
220 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="n">tags</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">tags</span>
221 <span class="n">tagref</span> <span class="o">=</span> <span class="n">tags</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
222 <span class="n">tagref</span><span class="o">.</span><span class="n">tag</span> <span class="c1"># tags may have tag objects carrying additional information</span>
223 <span class="n">tagref</span><span class="o">.</span><span class="n">commit</span> <span class="c1"># but they always point to commits</span>
224 <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="c1"># delete or</span>
225 <span class="n">repo</span><span class="o">.</span><span class="n">create_tag</span><span class="p">(</span><span class="s2">&quot;my_tag&quot;</span><span class="p">)</span> <span class="c1"># create tags using the repo for convenience</span>
226 </pre></div>
227 </div>
228 <p>A <a class="reference internal" href="reference.html#git.refs.symbolic.SymbolicReference" title="git.refs.symbolic.SymbolicReference"><code class="xref py py-class docutils literal"><span class="pre">symbolic</span> <span class="pre">reference</span></code></a> is a special case of a reference as it points to another reference instead of a commit.</p>
229 <div class="highlight-python"><div class="highlight"><pre><span></span> <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="c1"># the head points to the active branch/ref</span>
230 <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="c1"># retrieve the reference the head points to</span>
231 <span class="n">master</span><span class="o">.</span><span class="n">commit</span> <span class="c1"># from here you use it as any other reference</span>
232 </pre></div>
233 </div>
234 <p>Access the <a class="reference internal" href="reference.html#git.refs.log.RefLog" title="git.refs.log.RefLog"><code class="xref py py-class docutils literal"><span class="pre">reflog</span></code></a> easily.</p>
235 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="n">log</span> <span class="o">=</span> <span class="n">master</span><span class="o">.</span><span class="n">log</span><span class="p">()</span>
236 <span class="n">log</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="c1"># first (i.e. oldest) reflog entry</span>
237 <span class="n">log</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span> <span class="c1"># last (i.e. most recent) reflog entry</span>
238 </pre></div>
239 </div>
240 </div>
241 <div class="section" id="modifying-references">
242 <h2>Modifying References<a class="headerlink" href="#modifying-references" title="Permalink to this headline">¶</a></h2>
243 <p>You can easily create and delete <a class="reference internal" href="reference.html#git.refs.reference.Reference" title="git.refs.reference.Reference"><code class="xref py py-class docutils literal"><span class="pre">reference</span> <span class="pre">types</span></code></a> or modify where they point to.</p>
244 <div class="highlight-python"><div class="highlight"><pre><span></span> <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="s1">&#39;new&#39;</span><span class="p">)</span> <span class="c1"># create a new one</span>
245 <span class="n">new_branch</span><span class="o">.</span><span class="n">commit</span> <span class="o">=</span> <span class="s1">&#39;HEAD~10&#39;</span> <span class="c1"># set branch to another commit without changing index or working trees</span>
246 <span class="n">repo</span><span class="o">.</span><span class="n">delete_head</span><span class="p">(</span><span class="n">new_branch</span><span class="p">)</span> <span class="c1"># delete an existing head - only works if it is not checked out</span>
247 </pre></div>
248 </div>
249 <p>Create or delete <a class="reference internal" href="reference.html#git.refs.tag.TagReference" title="git.refs.tag.TagReference"><code class="xref py py-class docutils literal"><span class="pre">tags</span></code></a> the same way except you may not change them afterwards.</p>
250 <div class="highlight-python"><div class="highlight"><pre><span></span> <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="s1">&#39;my_new_tag&#39;</span><span class="p">,</span> <span class="n">message</span><span class="o">=</span><span class="s1">&#39;my message&#39;</span><span class="p">)</span>
251 <span class="c1"># You cannot change the commit a tag points to. Tags need to be re-created</span>
252 <span class="bp">self</span><span class="o">.</span><span class="n">failUnlessRaises</span><span class="p">(</span><span class="ne">AttributeError</span><span class="p">,</span> <span class="nb">setattr</span><span class="p">,</span> <span class="n">new_tag</span><span class="p">,</span> <span class="s1">&#39;commit&#39;</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="s1">&#39;HEAD~1&#39;</span><span class="p">))</span>
253 <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>
254 </pre></div>
255 </div>
256 <p>Change the <a class="reference internal" href="reference.html#git.refs.symbolic.SymbolicReference" title="git.refs.symbolic.SymbolicReference"><code class="xref py py-class docutils literal"><span class="pre">symbolic</span> <span class="pre">reference</span></code></a> to switch branches cheaply (without adjusting the index or the working tree).</p>
257 <div class="highlight-python"><div class="highlight"><pre><span></span> <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="s1">&#39;another-branch&#39;</span><span class="p">)</span>
258 <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>
259 </pre></div>
260 </div>
261 </div>
262 <div class="section" id="understanding-objects">
263 <h2>Understanding Objects<a class="headerlink" href="#understanding-objects" title="Permalink to this headline">¶</a></h2>
264 <p>An Object is anything storable in git&#8217;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, or 40 bytes in hexadecimal notation.</p>
265 <p>Git only knows 4 distinct object types being <a class="reference internal" href="reference.html#git.objects.blob.Blob" title="git.objects.blob.Blob"><code class="xref py py-class docutils literal"><span class="pre">Blobs</span></code></a>, <a class="reference internal" href="reference.html#git.objects.tree.Tree" title="git.objects.tree.Tree"><code class="xref py py-class docutils literal"><span class="pre">Trees</span></code></a>, <a class="reference internal" href="reference.html#git.objects.commit.Commit" title="git.objects.commit.Commit"><code class="xref py py-class docutils literal"><span class="pre">Commits</span></code></a> and <a class="reference internal" href="reference.html#git.objects.tag.TagObject" title="git.objects.tag.TagObject"><code class="xref py py-class docutils literal"><span class="pre">Tags</span></code></a>.</p>
266 <p>In GitPython, all objects can be accessed through their common base, can be compared and hashed. They are usually not instantiated directly, but through references or specialized repository functions.</p>
267 <div class="highlight-python"><div class="highlight"><pre><span></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">commit</span>
268 <span class="n">hct</span> <span class="o">=</span> <span class="n">hc</span><span class="o">.</span><span class="n">tree</span>
269 <span class="n">hc</span> <span class="o">!=</span> <span class="n">hct</span>
270 <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="mi">0</span><span class="p">]</span>
271 <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>
272 </pre></div>
273 </div>
274 <p>Common fields are ...</p>
275 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="k">assert</span> <span class="n">hct</span><span class="o">.</span><span class="n">type</span> <span class="o">==</span> <span class="s1">&#39;tree&#39;</span> <span class="c1"># preset string type, being a class attribute</span>
276 <span class="k">assert</span> <span class="n">hct</span><span class="o">.</span><span class="n">size</span> <span class="o">&gt;</span> <span class="mi">0</span> <span class="c1"># size in bytes</span>
277 <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="n">hct</span><span class="o">.</span><span class="n">hexsha</span><span class="p">)</span> <span class="o">==</span> <span class="mi">40</span>
278 <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="n">hct</span><span class="o">.</span><span class="n">binsha</span><span class="p">)</span> <span class="o">==</span> <span class="mi">20</span>
279 </pre></div>
280 </div>
281 <p><a class="reference internal" href="reference.html#git.objects.base.IndexObject" title="git.objects.base.IndexObject"><code class="xref py py-class docutils literal"><span class="pre">Index</span> <span class="pre">objects</span></code></a> are objects that can be put into git&#8217;s index. These objects are trees, blobs and submodules which additionally know about their path in the file system as well as their mode.</p>
282 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="k">assert</span> <span class="n">hct</span><span class="o">.</span><span class="n">path</span> <span class="o">==</span> <span class="s1">&#39;&#39;</span> <span class="c1"># root tree has no path</span>
283 <span class="k">assert</span> <span class="n">hct</span><span class="o">.</span><span class="n">trees</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">path</span> <span class="o">!=</span> <span class="s1">&#39;&#39;</span> <span class="c1"># the first contained item has one though</span>
284 <span class="k">assert</span> <span class="n">hct</span><span class="o">.</span><span class="n">mode</span> <span class="o">==</span> <span class="mi">0</span><span class="n">o40000</span> <span class="c1"># trees have the mode of a linux directory</span>
285 <span class="k">assert</span> <span class="n">hct</span><span class="o">.</span><span class="n">blobs</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">mode</span> <span class="o">==</span> <span class="mi">0</span><span class="n">o100644</span> <span class="c1"># blobs have a specific mode though comparable to a standard linux fs</span>
286 </pre></div>
287 </div>
288 <p>Access <a class="reference internal" href="reference.html#git.objects.blob.Blob" title="git.objects.blob.Blob"><code class="xref py py-class docutils literal"><span class="pre">blob</span></code></a> data (or any object data) using streams.</p>
289 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="n">hct</span><span class="o">.</span><span class="n">blobs</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">data_stream</span><span class="o">.</span><span class="n">read</span><span class="p">()</span> <span class="c1"># stream object to read data from</span>
290 <span class="n">hct</span><span class="o">.</span><span class="n">blobs</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">stream_data</span><span class="p">(</span><span class="nb">open</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">rw_dir</span><span class="p">,</span> <span class="s1">&#39;blob_data&#39;</span><span class="p">),</span> <span class="s1">&#39;wb&#39;</span><span class="p">))</span> <span class="c1"># write data to given stream</span>
291 </pre></div>
292 </div>
293 </div>
294 <div class="section" id="the-commit-object">
295 <h2>The Commit object<a class="headerlink" href="#the-commit-object" title="Permalink to this headline">¶</a></h2>
296 <p><a class="reference internal" href="reference.html#git.objects.commit.Commit" title="git.objects.commit.Commit"><code class="xref py py-class docutils literal"><span class="pre">Commit</span></code></a> 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>
297 <p>Obtain commits at the specified revision</p>
298 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="n">repo</span><span class="o">.</span><span class="n">commit</span><span class="p">(</span><span class="s1">&#39;master&#39;</span><span class="p">)</span>
299 <span class="n">repo</span><span class="o">.</span><span class="n">commit</span><span class="p">(</span><span class="s1">&#39;v0.8.1&#39;</span><span class="p">)</span>
300 <span class="n">repo</span><span class="o">.</span><span class="n">commit</span><span class="p">(</span><span class="s1">&#39;HEAD~10&#39;</span><span class="p">)</span>
301 </pre></div>
302 </div>
303 <p>Iterate 50 commits, and if you need paging, you can specify a number of commits to skip.</p>
304 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="n">fifty_first_commits</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="n">repo</span><span class="o">.</span><span class="n">iter_commits</span><span class="p">(</span><span class="s1">&#39;master&#39;</span><span class="p">,</span> <span class="n">max_count</span><span class="o">=</span><span class="mi">50</span><span class="p">))</span>
305 <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="n">fifty_first_commits</span><span class="p">)</span> <span class="o">==</span> <span class="mi">50</span>
306 <span class="c1"># this will return commits 21-30 from the commit list as traversed backwards master</span>
307 <span class="n">ten_commits_past_twenty</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="n">repo</span><span class="o">.</span><span class="n">iter_commits</span><span class="p">(</span><span class="s1">&#39;master&#39;</span><span class="p">,</span> <span class="n">max_count</span><span class="o">=</span><span class="mi">10</span><span class="p">,</span> <span class="n">skip</span><span class="o">=</span><span class="mi">20</span><span class="p">))</span>
308 <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="n">ten_commits_past_twenty</span><span class="p">)</span> <span class="o">==</span> <span class="mi">10</span>
309 <span class="k">assert</span> <span class="n">fifty_first_commits</span><span class="p">[</span><span class="mi">20</span><span class="p">:</span><span class="mi">30</span><span class="p">]</span> <span class="o">==</span> <span class="n">ten_commits_past_twenty</span>
310 </pre></div>
311 </div>
312 <p>A commit object carries all sorts of meta-data</p>
313 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="n">headcommit</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>
314 <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="n">headcommit</span><span class="o">.</span><span class="n">hexsha</span><span class="p">)</span> <span class="o">==</span> <span class="mi">40</span>
315 <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="n">headcommit</span><span class="o">.</span><span class="n">parents</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">0</span>
316 <span class="k">assert</span> <span class="n">headcommit</span><span class="o">.</span><span class="n">tree</span><span class="o">.</span><span class="n">type</span> <span class="o">==</span> <span class="s1">&#39;tree&#39;</span>
317 <span class="k">assert</span> <span class="n">headcommit</span><span class="o">.</span><span class="n">author</span><span class="o">.</span><span class="n">name</span> <span class="o">==</span> <span class="s1">&#39;Sebastian Thiel&#39;</span>
318 <span class="k">assert</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">headcommit</span><span class="o">.</span><span class="n">authored_date</span><span class="p">,</span> <span class="nb">int</span><span class="p">)</span>
319 <span class="k">assert</span> <span class="n">headcommit</span><span class="o">.</span><span class="n">committer</span><span class="o">.</span><span class="n">name</span> <span class="o">==</span> <span class="s1">&#39;Sebastian Thiel&#39;</span>
320 <span class="k">assert</span> <span class="nb">isinstance</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="nb">int</span><span class="p">)</span>
321 <span class="k">assert</span> <span class="n">headcommit</span><span class="o">.</span><span class="n">message</span> <span class="o">!=</span> <span class="s1">&#39;&#39;</span>
322 </pre></div>
323 </div>
324 <p>Note: date time is represented in a <code class="docutils literal"><span class="pre">seconds</span> <span class="pre">since</span> <span class="pre">epoch</span></code> format. Conversion to human readable form can be accomplished with the various <a class="reference external" href="http://docs.python.org/library/time.html">time module</a> methods.</p>
325 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="kn">import</span> <span class="nn">time</span>
326 <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>
327 <span class="n">time</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="s2">&quot;%a, </span><span class="si">%d</span><span class="s2"> %b %Y %H:%M&quot;</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>
328 </pre></div>
329 </div>
330 <p>You can traverse a commit&#8217;s ancestry by chaining calls to <code class="docutils literal"><span class="pre">parents</span></code></p>
331 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="k">assert</span> <span class="n">headcommit</span><span class="o">.</span><span class="n">parents</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">parents</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">parents</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="n">repo</span><span class="o">.</span><span class="n">commit</span><span class="p">(</span><span class="s1">&#39;master^^^&#39;</span><span class="p">)</span>
332 </pre></div>
333 </div>
334 <p>The above corresponds to <code class="docutils literal"><span class="pre">master^^^</span></code> or <code class="docutils literal"><span class="pre">master~3</span></code> in git parlance.</p>
335 </div>
336 <div class="section" id="the-tree-object">
337 <h2>The Tree object<a class="headerlink" href="#the-tree-object" title="Permalink to this headline">¶</a></h2>
338 <p>A <a class="reference internal" href="reference.html#git.objects.tree.Tree" title="git.objects.tree.Tree"><code class="xref py py-class docutils literal"><span class="pre">tree</span></code></a> records pointers to the contents of a directory. Let&#8217;s say you want the root tree of the latest commit on the master branch</p>
339 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="n">tree</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">master</span><span class="o">.</span><span class="n">commit</span><span class="o">.</span><span class="n">tree</span>
340 <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="n">tree</span><span class="o">.</span><span class="n">hexsha</span><span class="p">)</span> <span class="o">==</span> <span class="mi">40</span>
341 </pre></div>
342 </div>
343 <p>Once you have a tree, you can get its contents</p>
344 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="n">tree</span><span class="o">.</span><span class="n">trees</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">0</span> <span class="c1"># trees are subdirectories</span>
345 <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="n">tree</span><span class="o">.</span><span class="n">blobs</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">0</span> <span class="c1"># blobs are files</span>
346 <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="n">tree</span><span class="o">.</span><span class="n">blobs</span><span class="p">)</span> <span class="o">+</span> <span class="nb">len</span><span class="p">(</span><span class="n">tree</span><span class="o">.</span><span class="n">trees</span><span class="p">)</span> <span class="o">==</span> <span class="nb">len</span><span class="p">(</span><span class="n">tree</span><span class="p">)</span>
347 </pre></div>
348 </div>
349 <p>It is useful to know that a tree behaves like a list with the ability to query entries by name</p>
350 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="k">assert</span> <span class="n">tree</span><span class="p">[</span><span class="s1">&#39;smmap&#39;</span><span class="p">]</span> <span class="o">==</span> <span class="n">tree</span> <span class="o">/</span> <span class="s1">&#39;smmap&#39;</span> <span class="c1"># access by index and by sub-path</span>
351 <span class="k">for</span> <span class="n">entry</span> <span class="ow">in</span> <span class="n">tree</span><span class="p">:</span> <span class="c1"># intuitive iteration of tree members</span>
352 <span class="k">print</span><span class="p">(</span><span class="n">entry</span><span class="p">)</span>
353 <span class="n">blob</span> <span class="o">=</span> <span class="n">tree</span><span class="o">.</span><span class="n">trees</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">blobs</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="c1"># let&#39;s get a blob in a sub-tree</span>
354 <span class="k">assert</span> <span class="n">blob</span><span class="o">.</span><span class="n">name</span>
355 <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="n">blob</span><span class="o">.</span><span class="n">path</span><span class="p">)</span> <span class="o">&lt;</span> <span class="nb">len</span><span class="p">(</span><span class="n">blob</span><span class="o">.</span><span class="n">abspath</span><span class="p">)</span>
356 <span class="k">assert</span> <span class="n">tree</span><span class="o">.</span><span class="n">trees</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">name</span> <span class="o">+</span> <span class="s1">&#39;/&#39;</span> <span class="o">+</span> <span class="n">blob</span><span class="o">.</span><span class="n">name</span> <span class="o">==</span> <span class="n">blob</span><span class="o">.</span><span class="n">path</span> <span class="c1"># this is how the relative blob path is generated</span>
357 <span class="k">assert</span> <span class="n">tree</span><span class="p">[</span><span class="n">blob</span><span class="o">.</span><span class="n">path</span><span class="p">]</span> <span class="o">==</span> <span class="n">blob</span> <span class="c1"># you can use paths like &#39;dir/file&#39; in tree[...]</span>
358 </pre></div>
359 </div>
360 <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 a posix system</p>
361 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="k">assert</span> <span class="n">tree</span> <span class="o">/</span> <span class="s1">&#39;smmap&#39;</span> <span class="o">==</span> <span class="n">tree</span><span class="p">[</span><span class="s1">&#39;smmap&#39;</span><span class="p">]</span>
362 <span class="k">assert</span> <span class="n">tree</span> <span class="o">/</span> <span class="n">blob</span><span class="o">.</span><span class="n">path</span> <span class="o">==</span> <span class="n">tree</span><span class="p">[</span><span class="n">blob</span><span class="o">.</span><span class="n">path</span><span class="p">]</span>
363 </pre></div>
364 </div>
365 <p>You can also get a commit&#8217;s root tree directly from the repository</p>
366 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="c1"># This example shows the various types of allowed ref-specs</span>
367 <span class="k">assert</span> <span class="n">repo</span><span class="o">.</span><span class="n">tree</span><span class="p">()</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="o">.</span><span class="n">tree</span>
368 <span class="n">past</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">commit</span><span class="p">(</span><span class="s1">&#39;HEAD~5&#39;</span><span class="p">)</span>
369 <span class="k">assert</span> <span class="n">repo</span><span class="o">.</span><span class="n">tree</span><span class="p">(</span><span class="n">past</span><span class="p">)</span> <span class="o">==</span> <span class="n">repo</span><span class="o">.</span><span class="n">tree</span><span class="p">(</span><span class="n">past</span><span class="o">.</span><span class="n">hexsha</span><span class="p">)</span>
370 <span class="k">assert</span> <span class="n">repo</span><span class="o">.</span><span class="n">tree</span><span class="p">(</span><span class="s1">&#39;v0.8.1&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">type</span> <span class="o">==</span> <span class="s1">&#39;tree&#39;</span> <span class="c1"># yes, you can provide any refspec - works everywhere</span>
371 </pre></div>
372 </div>
373 <p>As trees allow direct access to their intermediate child entries only, use the traverse method to obtain an iterator to retrieve entries recursively</p>
374 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="n">tree</span><span class="p">)</span> <span class="o">&lt;</span> <span class="nb">len</span><span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="n">tree</span><span class="o">.</span><span class="n">traverse</span><span class="p">()))</span>
375 </pre></div>
376 </div>
377 <div class="admonition note">
378 <p class="first admonition-title">Note</p>
379 <p class="last">If trees return Submodule objects, they will assume that they exist at the current head&#8217;s commit. The tree it originated from may be rooted at another commit though, that it doesn&#8217;t know. That is why the caller would have to set the submodule&#8217;s owning or parent commit using the <code class="docutils literal"><span class="pre">set_parent_commit(my_commit)</span></code> method.</p>
380 </div>
381 </div>
382 <div class="section" id="the-index-object">
383 <h2>The Index Object<a class="headerlink" href="#the-index-object" title="Permalink to this headline">¶</a></h2>
384 <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 <a class="reference internal" href="reference.html#git.index.base.IndexFile" title="git.index.base.IndexFile"><code class="xref py py-class docutils literal"><span class="pre">IndexFile</span></code></a> object.
385 Modify the index with ease</p>
386 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="n">index</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">index</span>
387 <span class="c1"># The index contains all blobs in a flat list</span>
388 <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="n">index</span><span class="o">.</span><span class="n">iter_blobs</span><span class="p">()))</span> <span class="o">==</span> <span class="nb">len</span><span class="p">([</span><span class="n">o</span> <span class="k">for</span> <span class="n">o</span> <span class="ow">in</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="o">.</span><span class="n">tree</span><span class="o">.</span><span class="n">traverse</span><span class="p">()</span> <span class="k">if</span> <span class="n">o</span><span class="o">.</span><span class="n">type</span> <span class="o">==</span> <span class="s1">&#39;blob&#39;</span><span class="p">])</span>
389 <span class="c1"># Access blob objects</span>
390 <span class="k">for</span> <span class="p">(</span><span class="n">path</span><span class="p">,</span> <span class="n">stage</span><span class="p">),</span> <span class="n">entry</span> <span class="ow">in</span> <span class="n">index</span><span class="o">.</span><span class="n">entries</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
391 <span class="k">pass</span>
392 <span class="n">new_file_path</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">repo</span><span class="o">.</span><span class="n">working_tree_dir</span><span class="p">,</span> <span class="s1">&#39;new-file-name&#39;</span><span class="p">)</span>
393 <span class="nb">open</span><span class="p">(</span><span class="n">new_file_path</span><span class="p">,</span> <span class="s1">&#39;w&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
394 <span class="n">index</span><span class="o">.</span><span class="n">add</span><span class="p">([</span><span class="n">new_file_path</span><span class="p">])</span> <span class="c1"># add a new file to the index</span>
395 <span class="n">index</span><span class="o">.</span><span class="n">remove</span><span class="p">([</span><span class="s1">&#39;LICENSE&#39;</span><span class="p">])</span> <span class="c1"># remove an existing one</span>
396 <span class="k">assert</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">isfile</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">repo</span><span class="o">.</span><span class="n">working_tree_dir</span><span class="p">,</span> <span class="s1">&#39;LICENSE&#39;</span><span class="p">))</span> <span class="c1"># working tree is untouched</span>
397
398 <span class="k">assert</span> <span class="n">index</span><span class="o">.</span><span class="n">commit</span><span class="p">(</span><span class="s2">&quot;my commit message&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">type</span> <span class="o">==</span> <span class="s1">&#39;commit&#39;</span> <span class="c1"># commit changed index</span>
399 <span class="n">repo</span><span class="o">.</span><span class="n">active_branch</span><span class="o">.</span><span class="n">commit</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">commit</span><span class="p">(</span><span class="s1">&#39;HEAD~1&#39;</span><span class="p">)</span> <span class="c1"># forget last commit</span>
400
401 <span class="kn">from</span> <span class="nn">git</span> <span class="kn">import</span> <span class="n">Actor</span>
402 <span class="n">author</span> <span class="o">=</span> <span class="n">Actor</span><span class="p">(</span><span class="s2">&quot;An author&quot;</span><span class="p">,</span> <span class="s2">&quot;author@example.com&quot;</span><span class="p">)</span>
403 <span class="n">committer</span> <span class="o">=</span> <span class="n">Actor</span><span class="p">(</span><span class="s2">&quot;A committer&quot;</span><span class="p">,</span> <span class="s2">&quot;committer@example.com&quot;</span><span class="p">)</span>
404 <span class="c1"># commit by commit message and author and committer</span>
405 <span class="n">index</span><span class="o">.</span><span class="n">commit</span><span class="p">(</span><span class="s2">&quot;my commit message&quot;</span><span class="p">,</span> <span class="n">author</span><span class="o">=</span><span class="n">author</span><span class="p">,</span> <span class="n">committer</span><span class="o">=</span><span class="n">committer</span><span class="p">)</span>
406 </pre></div>
407 </div>
408 <p>Create new indices from other trees or as result of a merge. Write that result to a new index file for later inspection.</p>
409 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="kn">from</span> <span class="nn">git</span> <span class="kn">import</span> <span class="n">IndexFile</span>
410 <span class="c1"># loads a tree into a temporary index, which exists just in memory</span>
411 <span class="n">IndexFile</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="s1">&#39;HEAD~1&#39;</span><span class="p">)</span>
412 <span class="c1"># merge two trees three-way into memory</span>
413 <span class="n">merge_index</span> <span class="o">=</span> <span class="n">IndexFile</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="s1">&#39;HEAD~10&#39;</span><span class="p">,</span> <span class="s1">&#39;HEAD&#39;</span><span class="p">,</span> <span class="n">repo</span><span class="o">.</span><span class="n">merge_base</span><span class="p">(</span><span class="s1">&#39;HEAD~10&#39;</span><span class="p">,</span> <span class="s1">&#39;HEAD&#39;</span><span class="p">))</span>
414 <span class="c1"># and persist it</span>
415 <span class="n">merge_index</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">rw_dir</span><span class="p">,</span> <span class="s1">&#39;merged_index&#39;</span><span class="p">))</span>
416 </pre></div>
417 </div>
418 </div>
419 <div class="section" id="handling-remotes">
420 <h2>Handling Remotes<a class="headerlink" href="#handling-remotes" title="Permalink to this headline">¶</a></h2>
421 <p><a class="reference internal" href="reference.html#git.remote.Remote" title="git.remote.Remote"><code class="xref py py-class docutils literal"><span class="pre">Remotes</span></code></a> are used as alias for a foreign repository to ease pushing to and fetching from them</p>
422 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="n">empty_repo</span> <span class="o">=</span> <span class="n">git</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="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">rw_dir</span><span class="p">,</span> <span class="s1">&#39;empty&#39;</span><span class="p">))</span>
423 <span class="n">origin</span> <span class="o">=</span> <span class="n">empty_repo</span><span class="o">.</span><span class="n">create_remote</span><span class="p">(</span><span class="s1">&#39;origin&#39;</span><span class="p">,</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="o">.</span><span class="n">url</span><span class="p">)</span>
424 <span class="k">assert</span> <span class="n">origin</span><span class="o">.</span><span class="n">exists</span><span class="p">()</span>
425 <span class="k">assert</span> <span class="n">origin</span> <span class="o">==</span> <span class="n">empty_repo</span><span class="o">.</span><span class="n">remotes</span><span class="o">.</span><span class="n">origin</span> <span class="o">==</span> <span class="n">empty_repo</span><span class="o">.</span><span class="n">remotes</span><span class="p">[</span><span class="s1">&#39;origin&#39;</span><span class="p">]</span>
426 <span class="n">origin</span><span class="o">.</span><span class="n">fetch</span><span class="p">()</span> <span class="c1"># assure we actually have data. fetch() returns useful information</span>
427 <span class="c1"># Setup a local tracking branch of a remote branch</span>
428 <span class="n">empty_repo</span><span class="o">.</span><span class="n">create_head</span><span class="p">(</span><span class="s1">&#39;master&#39;</span><span class="p">,</span> <span class="n">origin</span><span class="o">.</span><span class="n">refs</span><span class="o">.</span><span class="n">master</span><span class="p">)</span> <span class="c1"># create local branch &quot;master&quot; from remote branch &quot;master&quot;</span>
429 <span class="n">empty_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">set_tracking_branch</span><span class="p">(</span><span class="n">origin</span><span class="o">.</span><span class="n">refs</span><span class="o">.</span><span class="n">master</span><span class="p">)</span> <span class="c1"># set local &quot;master&quot; to track remote &quot;master</span>
430 <span class="n">empty_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="c1"># checkout local &quot;master&quot; to working tree</span>
431 <span class="c1"># Three above commands in one:</span>
432 <span class="n">empty_repo</span><span class="o">.</span><span class="n">create_head</span><span class="p">(</span><span class="s1">&#39;master&#39;</span><span class="p">,</span> <span class="n">origin</span><span class="o">.</span><span class="n">refs</span><span class="o">.</span><span class="n">master</span><span class="p">)</span><span class="o">.</span><span class="n">set_tracking_branch</span><span class="p">(</span><span class="n">origin</span><span class="o">.</span><span class="n">refs</span><span class="o">.</span><span class="n">master</span><span class="p">)</span><span class="o">.</span><span class="n">checkout</span><span class="p">()</span>
433 <span class="c1"># rename remotes</span>
434 <span class="n">origin</span><span class="o">.</span><span class="n">rename</span><span class="p">(</span><span class="s1">&#39;new_origin&#39;</span><span class="p">)</span>
435 <span class="c1"># push and pull behaves similarly to `git push|pull`</span>
436 <span class="n">origin</span><span class="o">.</span><span class="n">pull</span><span class="p">()</span>
437 <span class="n">origin</span><span class="o">.</span><span class="n">push</span><span class="p">()</span>
438 <span class="c1"># assert not empty_repo.delete_remote(origin).exists() # create and delete remotes</span>
439 </pre></div>
440 </div>
441 <p>You can easily access configuration information for a remote by accessing options as if they where attributes. The modification of remote configuration is more explicit though.</p>
442 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="k">assert</span> <span class="n">origin</span><span class="o">.</span><span class="n">url</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="o">.</span><span class="n">url</span>
443 <span class="n">cw</span> <span class="o">=</span> <span class="n">origin</span><span class="o">.</span><span class="n">config_writer</span>
444 <span class="n">cw</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;pushurl&quot;</span><span class="p">,</span> <span class="s2">&quot;other_url&quot;</span><span class="p">)</span>
445 <span class="n">cw</span><span class="o">.</span><span class="n">release</span><span class="p">()</span>
446
447 <span class="c1"># Please note that in python 2, writing origin.config_writer.set(...) is totally safe.</span>
448 <span class="c1"># In py3 __del__ calls can be delayed, thus not writing changes in time.</span>
449 </pre></div>
450 </div>
451 <p>You can also specify per-call custom environments using a new context manager on the Git command, e.g. for using a specific SSH key. The following example works with <cite>git</cite> starting at <em>v2.3</em>:</p>
452 <div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">ssh_cmd</span> <span class="o">=</span> <span class="s1">&#39;ssh -i id_deployment_key&#39;</span>
453 <span class="k">with</span> <span class="n">repo</span><span class="o">.</span><span class="n">git</span><span class="o">.</span><span class="n">custom_environment</span><span class="p">(</span><span class="n">GIT_SSH_COMMAND</span><span class="o">=</span><span class="n">ssh_cmd</span><span class="p">):</span>
454 <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="o">.</span><span class="n">fetch</span><span class="p">()</span>
455 </pre></div>
456 </div>
457 <p>This one sets a custom script to be executed in place of <cite>ssh</cite>, and can be used in <cite>git</cite> prior to <em>v2.3</em>:</p>
458 <div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">ssh_executable</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">rw_dir</span><span class="p">,</span> <span class="s1">&#39;my_ssh_executable.sh&#39;</span><span class="p">)</span>
459 <span class="k">with</span> <span class="n">repo</span><span class="o">.</span><span class="n">git</span><span class="o">.</span><span class="n">custom_environment</span><span class="p">(</span><span class="n">GIT_SSH</span><span class="o">=</span><span class="n">ssh_executable</span><span class="p">):</span>
460 <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="o">.</span><span class="n">fetch</span><span class="p">()</span>
461 </pre></div>
462 </div>
463 <p>Here&#8217;s an example executable that can be used in place of the <cite>ssh_executable</cite> above:</p>
464 <div class="highlight-python"><div class="highlight"><pre><span></span>#!/bin/sh
465 ID_RSA=/var/lib/openshift/5562b947ecdd5ce939000038/app-deployments/id_rsa
466 exec /usr/bin/ssh -o StrictHostKeyChecking=no -i $ID_RSA &quot;$@&quot;
467 </pre></div>
468 </div>
469 <p>Please note that the script must be executable (i.e. <cite>chomd +x script.sh</cite>). <cite>StrictHostKeyChecking=no</cite> is used to avoid prompts asking to save the hosts key to <cite>~/.ssh/known_hosts</cite>, which happens in case you run this as daemon.</p>
470 <p>You might also have a look at <cite>Git.update_environment(...)</cite> in case you want to setup a changed environment more permanently.</p>
471 </div>
472 <div class="section" id="submodule-handling">
473 <h2>Submodule Handling<a class="headerlink" href="#submodule-handling" title="Permalink to this headline">¶</a></h2>
474 <p><a class="reference internal" href="reference.html#git.objects.submodule.base.Submodule" title="git.objects.submodule.base.Submodule"><code class="xref py py-class docutils literal"><span class="pre">Submodules</span></code></a> can be conveniently handled using the methods provided by GitPython, and as an added benefit, GitPython provides functionality which behave smarter and less error prone than its original c-git implementation, that is GitPython tries hard to keep your repository consistent when updating submodules recursively or adjusting the existing configuration.</p>
475 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="n">repo</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">rorepo</span>
476 <span class="n">sms</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">submodules</span>
477
478 <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="n">sms</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span>
479 <span class="n">sm</span> <span class="o">=</span> <span class="n">sms</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
480 <span class="k">assert</span> <span class="n">sm</span><span class="o">.</span><span class="n">name</span> <span class="o">==</span> <span class="s1">&#39;gitdb&#39;</span> <span class="c1"># git-python has gitdb as single submodule ...</span>
481 <span class="k">assert</span> <span class="n">sm</span><span class="o">.</span><span class="n">children</span><span class="p">()[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">name</span> <span class="o">==</span> <span class="s1">&#39;smmap&#39;</span> <span class="c1"># ... which has smmap as single submodule</span>
482
483 <span class="c1"># The module is the repository referenced by the submodule</span>
484 <span class="k">assert</span> <span class="n">sm</span><span class="o">.</span><span class="n">module_exists</span><span class="p">()</span> <span class="c1"># the module is available, which doesn&#39;t have to be the case.</span>
485 <span class="k">assert</span> <span class="n">sm</span><span class="o">.</span><span class="n">module</span><span class="p">()</span><span class="o">.</span><span class="n">working_tree_dir</span><span class="o">.</span><span class="n">endswith</span><span class="p">(</span><span class="s1">&#39;gitdb&#39;</span><span class="p">)</span>
486 <span class="c1"># the submodule&#39;s absolute path is the module&#39;s path</span>
487 <span class="k">assert</span> <span class="n">sm</span><span class="o">.</span><span class="n">abspath</span> <span class="o">==</span> <span class="n">sm</span><span class="o">.</span><span class="n">module</span><span class="p">()</span><span class="o">.</span><span class="n">working_tree_dir</span>
488 <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="n">sm</span><span class="o">.</span><span class="n">hexsha</span><span class="p">)</span> <span class="o">==</span> <span class="mi">40</span> <span class="c1"># Its sha defines the commit to checkout</span>
489 <span class="k">assert</span> <span class="n">sm</span><span class="o">.</span><span class="n">exists</span><span class="p">()</span> <span class="c1"># yes, this submodule is valid and exists</span>
490 <span class="c1"># read its configuration conveniently</span>
491 <span class="k">assert</span> <span class="n">sm</span><span class="o">.</span><span class="n">config_reader</span><span class="p">()</span><span class="o">.</span><span class="n">get_value</span><span class="p">(</span><span class="s1">&#39;path&#39;</span><span class="p">)</span> <span class="o">==</span> <span class="n">sm</span><span class="o">.</span><span class="n">path</span>
492 <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="n">sm</span><span class="o">.</span><span class="n">children</span><span class="p">())</span> <span class="o">==</span> <span class="mi">1</span> <span class="c1"># query the submodule hierarchy</span>
493 </pre></div>
494 </div>
495 <p>In addition to the query functionality, you can move the submodule&#8217;s repository to a different path &lt;<code class="docutils literal"><span class="pre">move(...)</span></code>&gt;, write its configuration &lt;<code class="docutils literal"><span class="pre">config_writer().set_value(...).release()</span></code>&gt;, update its working tree &lt;<code class="docutils literal"><span class="pre">update(...)</span></code>&gt;, and remove or add them &lt;<code class="docutils literal"><span class="pre">remove(...)</span></code>, <code class="docutils literal"><span class="pre">add(...)</span></code>&gt;.</p>
496 <p>If you obtained your submodule object by traversing a tree object which is not rooted at the head&#8217;s commit, you have to inform the submodule about its actual commit to retrieve the data from by using the <code class="docutils literal"><span class="pre">set_parent_commit(...)</span></code> method.</p>
497 <p>The special <a class="reference internal" href="reference.html#git.objects.submodule.root.RootModule" title="git.objects.submodule.root.RootModule"><code class="xref py py-class docutils literal"><span class="pre">RootModule</span></code></a> type allows you to treat your master repository as root of a hierarchy of submodules, which allows very convenient submodule handling. Its <code class="docutils literal"><span class="pre">update(...)</span></code> method is reimplemented to provide an advanced way of updating submodules as they change their values over time. The update method will track changes and make sure your working tree and submodule checkouts stay consistent, which is very useful in case submodules get deleted or added to name just two of the handled cases.</p>
498 <p>Additionally, GitPython adds functionality to track a specific branch, instead of just a commit. Supported by customized update methods, you are able to automatically update submodules to the latest revision available in the remote repository, as well as to keep track of changes and movements of these submodules. To use it, set the name of the branch you want to track to the <code class="docutils literal"><span class="pre">submodule.$name.branch</span></code> option of the <em>.gitmodules</em> file, and use GitPython update methods on the resulting repository with the <code class="docutils literal"><span class="pre">to_latest_revision</span></code> parameter turned on. In the latter case, the sha of your submodule will be ignored, instead a local tracking branch will be updated to the respective remote branch automatically, provided there are no local changes. The resulting behaviour is much like the one of svn::externals, which can be useful in times.</p>
499 </div>
500 <div class="section" id="obtaining-diff-information">
501 <h2>Obtaining Diff Information<a class="headerlink" href="#obtaining-diff-information" title="Permalink to this headline">¶</a></h2>
502 <p>Diffs can generally be obtained by subclasses of <a class="reference internal" href="reference.html#git.diff.Diffable" title="git.diff.Diffable"><code class="xref py py-class docutils literal"><span class="pre">Diffable</span></code></a> as they provide the <code class="docutils literal"><span class="pre">diff</span></code> method. This operation yields a <a class="reference internal" href="reference.html#git.diff.DiffIndex" title="git.diff.DiffIndex"><code class="xref py py-class docutils literal"><span class="pre">DiffIndex</span></code></a> allowing you to easily access diff information about paths.</p>
503 <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>
504 <div class="highlight-python"><div class="highlight"><pre><span></span> <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>
505 <span class="n">hcommit</span><span class="o">.</span><span class="n">diff</span><span class="p">()</span> <span class="c1"># diff tree against index</span>
506 <span class="n">hcommit</span><span class="o">.</span><span class="n">diff</span><span class="p">(</span><span class="s1">&#39;HEAD~1&#39;</span><span class="p">)</span> <span class="c1"># diff tree against previous tree</span>
507 <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="c1"># diff tree against working tree</span>
508
509 <span class="n">index</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">index</span>
510 <span class="n">index</span><span class="o">.</span><span class="n">diff</span><span class="p">()</span> <span class="c1"># diff index against itself yielding empty diff</span>
511 <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="c1"># diff index against working copy</span>
512 <span class="n">index</span><span class="o">.</span><span class="n">diff</span><span class="p">(</span><span class="s1">&#39;HEAD&#39;</span><span class="p">)</span> <span class="c1"># diff index against current HEAD tree</span>
513 </pre></div>
514 </div>
515 <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>
516 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="c1"># Traverse added Diff objects only</span>
517 <span class="k">for</span> <span class="n">diff_added</span> <span class="ow">in</span> <span class="n">hcommit</span><span class="o">.</span><span class="n">diff</span><span class="p">(</span><span class="s1">&#39;HEAD~1&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">iter_change_type</span><span class="p">(</span><span class="s1">&#39;A&#39;</span><span class="p">):</span>
518 <span class="k">print</span><span class="p">(</span><span class="n">diff_added</span><span class="p">)</span>
519 </pre></div>
520 </div>
521 <p>Use the diff framework if you want to implement git-status like functionality.</p>
522 <ul class="simple">
523 <li>A diff between the index and the commit&#8217;s tree your HEAD points to</li>
524 </ul>
525 <blockquote>
526 <div><ul class="simple">
527 <li>use <code class="docutils literal"><span class="pre">repo.index.diff(repo.head.commit)</span></code></li>
528 </ul>
529 </div></blockquote>
530 <ul class="simple">
531 <li>A diff between the index and the working tree</li>
532 </ul>
533 <blockquote>
534 <div><ul class="simple">
535 <li>use <code class="docutils literal"><span class="pre">repo.index.diff(None)</span></code></li>
536 </ul>
537 </div></blockquote>
538 <ul class="simple">
539 <li>A list of untracked files</li>
540 </ul>
541 <blockquote>
542 <div><ul class="simple">
543 <li>use <code class="docutils literal"><span class="pre">repo.untracked_files</span></code></li>
544 </ul>
545 </div></blockquote>
546 </div>
547 <div class="section" id="switching-branches">
548 <h2>Switching Branches<a class="headerlink" href="#switching-branches" title="Permalink to this headline">¶</a></h2>
549 <p>To switch between branches similar to <code class="docutils literal"><span class="pre">git</span> <span class="pre">checkout</span></code>, you effectively need to point your HEAD symbolic reference to the new branch and reset your index and working copy to match. A simple manual way to do it is the following one</p>
550 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="c1"># Reset our working tree 10 commits into the past</span>
551 <span class="n">past_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="s1">&#39;past_branch&#39;</span><span class="p">,</span> <span class="s1">&#39;HEAD~10&#39;</span><span class="p">)</span>
552 <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">past_branch</span>
553 <span class="k">assert</span> <span class="ow">not</span> <span class="n">repo</span><span class="o">.</span><span class="n">head</span><span class="o">.</span><span class="n">is_detached</span>
554 <span class="c1"># reset the index and working tree to match the pointed-to commit</span>
555 <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>
556
557 <span class="c1"># To detach your head, you have to point to a commit directy</span>
558 <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">commit</span><span class="p">(</span><span class="s1">&#39;HEAD~5&#39;</span><span class="p">)</span>
559 <span class="k">assert</span> <span class="n">repo</span><span class="o">.</span><span class="n">head</span><span class="o">.</span><span class="n">is_detached</span>
560 <span class="c1"># now our head points 15 commits into the past, whereas the working tree</span>
561 <span class="c1"># and index are 10 commits in the past</span>
562 </pre></div>
563 </div>
564 <p>The previous approach would brutally overwrite the user&#8217;s changes in the working copy and index though and is less sophisticated than a <code class="docutils literal"><span class="pre">git-checkout</span></code>. The latter will generally prevent you from destroying your work. Use the safer approach as follows.</p>
565 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="c1"># checkout the branch using git-checkout. It will fail as the working tree appears dirty</span>
566 <span class="bp">self</span><span class="o">.</span><span class="n">failUnlessRaises</span><span class="p">(</span><span class="n">git</span><span class="o">.</span><span class="n">GitCommandError</span><span class="p">,</span> <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>
567 <span class="n">repo</span><span class="o">.</span><span class="n">heads</span><span class="o">.</span><span class="n">past_branch</span><span class="o">.</span><span class="n">checkout</span><span class="p">()</span>
568 </pre></div>
569 </div>
570 </div>
571 <div class="section" id="initializing-a-repository">
572 <h2>Initializing a repository<a class="headerlink" href="#initializing-a-repository" title="Permalink to this headline">¶</a></h2>
573 <p>In this example, we will initialize an empty repository, add an empty file to the index, and commit the change.</p>
574 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="kn">import</span> <span class="nn">git</span>
575
576 <span class="n">repo_dir</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">rw_dir</span><span class="p">,</span> <span class="s1">&#39;my-new-repo&#39;</span><span class="p">)</span>
577 <span class="n">file_name</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">repo_dir</span><span class="p">,</span> <span class="s1">&#39;new-file&#39;</span><span class="p">)</span>
578
579 <span class="n">r</span> <span class="o">=</span> <span class="n">git</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="n">repo_dir</span><span class="p">)</span>
580 <span class="c1"># This function just creates an empty file ...</span>
581 <span class="nb">open</span><span class="p">(</span><span class="n">file_name</span><span class="p">,</span> <span class="s1">&#39;wb&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
582 <span class="n">r</span><span class="o">.</span><span class="n">index</span><span class="o">.</span><span class="n">add</span><span class="p">([</span><span class="n">file_name</span><span class="p">])</span>
583 <span class="n">r</span><span class="o">.</span><span class="n">index</span><span class="o">.</span><span class="n">commit</span><span class="p">(</span><span class="s2">&quot;initial commit&quot;</span><span class="p">)</span>
584
585 </pre></div>
586 </div>
587 <p>Please have a look at the individual methods as they usually support a vast amount of arguments to customize their behavior.</p>
588 </div>
589 <div class="section" id="using-git-directly">
590 <h2>Using git directly<a class="headerlink" href="#using-git-directly" title="Permalink to this headline">¶</a></h2>
591 <p>In case you are missing functionality as it has not been wrapped, you may conveniently use the <a class="reference internal" href="reference.html#git.cmd.Git" title="git.cmd.Git"><code class="xref py py-class docutils literal"><span class="pre">git</span></code></a> command directly. It is owned by each repository instance.</p>
592 <div class="highlight-python"><div class="highlight"><pre><span></span> <span class="n">git</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">git</span>
593 <span class="n">git</span><span class="o">.</span><span class="n">checkout</span><span class="p">(</span><span class="s1">&#39;HEAD&#39;</span><span class="p">,</span> <span class="n">b</span><span class="o">=</span><span class="s2">&quot;my_new_branch&quot;</span><span class="p">)</span> <span class="c1"># create a new branch</span>
594 <span class="n">git</span><span class="o">.</span><span class="n">branch</span><span class="p">(</span><span class="s1">&#39;another-new-one&#39;</span><span class="p">)</span>
595 <span class="n">git</span><span class="o">.</span><span class="n">branch</span><span class="p">(</span><span class="s1">&#39;-D&#39;</span><span class="p">,</span> <span class="s1">&#39;another-new-one&#39;</span><span class="p">)</span> <span class="c1"># pass strings for full control over argument order</span>
596 <span class="n">git</span><span class="o">.</span><span class="n">for_each_ref</span><span class="p">()</span> <span class="c1"># &#39;-&#39; becomes &#39;_&#39; when calling it</span>
597 </pre></div>
598 </div>
599 <p>The return value will by default be a string of the standard output channel produced by the command.</p>
600 <p>Keyword arguments translate to short and long keyword arguments on the command-line.
601 The special notion <code class="docutils literal"><span class="pre">git.command(flag=True)</span></code> will create a flag without value like <code class="docutils literal"><span class="pre">command</span> <span class="pre">--flag</span></code>.</p>
602 <p>If <code class="docutils literal"><span class="pre">None</span></code> 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 <code class="docutils literal"><span class="pre">str(...)</span></code> function.</p>
603 </div>
604 <div class="section" id="object-databases">
605 <h2>Object Databases<a class="headerlink" href="#object-databases" title="Permalink to this headline">¶</a></h2>
606 <p><a class="reference internal" href="reference.html#git.repo.base.Repo" title="git.repo.base.Repo"><code class="xref py py-class docutils literal"><span class="pre">git.Repo</span></code></a> instances are powered by its object database instance which will be used when extracting any data, or when writing new objects.</p>
607 <p>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.</p>
608 <div class="section" id="gitdb">
609 <h3>GitDB<a class="headerlink" href="#gitdb" title="Permalink to this headline">¶</a></h3>
610 <p>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:</p>
611 <div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">repo</span> <span class="o">=</span> <span class="n">Repo</span><span class="p">(</span><span class="s2">&quot;path/to/repo&quot;</span><span class="p">,</span> <span class="n">odbt</span><span class="o">=</span><span class="n">GitDB</span><span class="p">)</span>
612 </pre></div>
613 </div>
614 </div>
615 <div class="section" id="gitcmdobjectdb">
616 <h3>GitCmdObjectDB<a class="headerlink" href="#gitcmdobjectdb" title="Permalink to this headline">¶</a></h3>
617 <p>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 <code class="docutils literal"><span class="pre">GitDB</span></code>:</p>
618 <div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">repo</span> <span class="o">=</span> <span class="n">Repo</span><span class="p">(</span><span class="s2">&quot;path/to/repo&quot;</span><span class="p">,</span> <span class="n">odbt</span><span class="o">=</span><span class="n">GitCmdObjectDB</span><span class="p">)</span>
619 </pre></div>
620 </div>
621 </div>
622 </div>
623 <div class="section" id="git-command-debugging-and-customization">
624 <h2>Git Command Debugging and Customization<a class="headerlink" href="#git-command-debugging-and-customization" title="Permalink to this headline">¶</a></h2>
625 <p>Using environment variables, you can further adjust the behaviour of the git command.</p>
626 <ul class="simple">
627 <li><strong>GIT_PYTHON_TRACE</strong></li>
628 </ul>
629 <blockquote>
630 <div><ul class="simple">
631 <li>If set to non-0, all executed git commands will be shown as they happen</li>
632 <li>If set to <em>full</em>, the executed git command _and_ its entire output on stdout and stderr will be shown as they happen</li>
633 </ul>
634 <p><strong>NOTE</strong>: All logging is outputted using a Python logger, so make sure your program is configured to show INFO-level messages. If this is not the case, try adding the following to your program:</p>
635 <div class="highlight-python"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">logging</span>
636 <span class="n">logging</span><span class="o">.</span><span class="n">basicConfig</span><span class="p">(</span><span class="n">level</span><span class="o">=</span><span class="n">logging</span><span class="o">.</span><span class="n">INFO</span><span class="p">)</span>
637 </pre></div>
638 </div>
639 </div></blockquote>
640 <ul class="simple">
641 <li><strong>GIT_PYTHON_GIT_EXECUTABLE</strong></li>
642 </ul>
643 <blockquote>
644 <div><ul class="simple">
645 <li>If set, it should contain the full path to the git executable, e.g. <em>c:\Program Files (x86)\Git\bin\git.exe</em> on windows or <em>/usr/bin/git</em> on linux.</li>
646 </ul>
647 </div></blockquote>
648 </div>
649 <div class="section" id="and-even-more">
650 <h2>And even more ...<a class="headerlink" href="#and-even-more" title="Permalink to this headline">¶</a></h2>
651 <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>
652 <p>Check the unit tests for an in-depth introduction on how each function is supposed to be used.</p>
653 </div>
654 </div>
655
656
657 </div>
658 </div>
659 </div>
660 <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
661 <div class="sphinxsidebarwrapper">
662 <h3><a href="index.html">Table Of Contents</a></h3>
663 <ul>
664 <li><a class="reference internal" href="#">GitPython Tutorial</a><ul>
665 <li><a class="reference internal" href="#meet-the-repo-type">Meet the Repo type</a><ul>
666 <li><a class="reference internal" href="#advanced-repo-usage">Advanced Repo Usage</a></li>
667 </ul>
668 </li>
669 <li><a class="reference internal" href="#examining-references">Examining References</a></li>
670 <li><a class="reference internal" href="#modifying-references">Modifying References</a></li>
671 <li><a class="reference internal" href="#understanding-objects">Understanding Objects</a></li>
672 <li><a class="reference internal" href="#the-commit-object">The Commit object</a></li>
673 <li><a class="reference internal" href="#the-tree-object">The Tree object</a></li>
674 <li><a class="reference internal" href="#the-index-object">The Index Object</a></li>
675 <li><a class="reference internal" href="#handling-remotes">Handling Remotes</a></li>
676 <li><a class="reference internal" href="#submodule-handling">Submodule Handling</a></li>
677 <li><a class="reference internal" href="#obtaining-diff-information">Obtaining Diff Information</a></li>
678 <li><a class="reference internal" href="#switching-branches">Switching Branches</a></li>
679 <li><a class="reference internal" href="#initializing-a-repository">Initializing a repository</a></li>
680 <li><a class="reference internal" href="#using-git-directly">Using git directly</a></li>
681 <li><a class="reference internal" href="#object-databases">Object Databases</a><ul>
682 <li><a class="reference internal" href="#gitdb">GitDB</a></li>
683 <li><a class="reference internal" href="#gitcmdobjectdb">GitCmdObjectDB</a></li>
684 </ul>
685 </li>
686 <li><a class="reference internal" href="#git-command-debugging-and-customization">Git Command Debugging and Customization</a></li>
687 <li><a class="reference internal" href="#and-even-more">And even more ...</a></li>
688 </ul>
689 </li>
690 </ul>
691 <div class="relations">
692 <h3>Related Topics</h3>
693 <ul>
694 <li><a href="index.html">Documentation overview</a><ul>
695 <li>Previous: <a href="whatsnew.html" title="previous chapter">Whats New in 0.3</a></li>
696 <li>Next: <a href="reference.html" title="next chapter">API Reference</a></li>
697 </ul></li>
698 </ul>
699 </div>
700 <div role="note" aria-label="source link">
701 <h3>This Page</h3>
702 <ul class="this-page-menu">
703 <li><a href="_sources/tutorial.txt"
704 rel="nofollow">Show Source</a></li>
705 </ul>
706 </div>
707 <div id="searchbox" style="display: none" role="search">
708 <h3>Quick search</h3>
709 <form class="search" action="search.html" method="get">
710 <input type="text" name="q" />
711 <input type="submit" value="Go" />
712 <input type="hidden" name="check_keywords" value="yes" />
713 <input type="hidden" name="area" value="default" />
714 </form>
715 </div>
716 <script type="text/javascript">$('#searchbox').show(0);</script>
717 </div>
718 </div>
719 <div class="clearer"></div>
720 </div>
721 <div class="footer">
722 &copy;Copyright (C) 2008, 2009 Michael Trier and contributors, 2010-2015 Sebastian Thiel.
723
724 |
725 Powered by <a href="http://sphinx-doc.org/">Sphinx 1.4.1</a>
726 &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.7</a>
727
728 |
729 <a href="_sources/tutorial.txt"
730 rel="nofollow">Page source</a>
731 </div>
732
733
734
735
736 </body>
737 </html>
+0
-119
doc/build/html/whatsnew.html less more
0 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
1 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
3
4 <html xmlns="http://www.w3.org/1999/xhtml">
5 <head>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
8 <title>Whats New in 0.3 &mdash; GitPython 2.0.9dev0 documentation</title>
9
10 <link rel="stylesheet" href="_static/default.css" type="text/css" />
11 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
12
13 <script type="text/javascript">
14 var DOCUMENTATION_OPTIONS = {
15 URL_ROOT: './',
16 VERSION: '2.0.9dev0',
17 COLLAPSE_INDEX: false,
18 FILE_SUFFIX: '.html',
19 HAS_SOURCE: true
20 };
21 </script>
22 <script type="text/javascript" src="_static/jquery.js"></script>
23 <script type="text/javascript" src="_static/underscore.js"></script>
24 <script type="text/javascript" src="_static/doctools.js"></script>
25 <link rel="top" title="GitPython 2.0.9dev0 documentation" href="index.html" />
26 <link rel="next" title="GitPython Tutorial" href="tutorial.html" />
27 <link rel="prev" title="Overview / Install" href="intro.html" />
28
29
30 <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
31
32 </head>
33 <body role="document">
34
35 <div class="document">
36 <div class="documentwrapper">
37 <div class="bodywrapper">
38 <div class="body" role="main">
39
40 <div class="section" id="whats-new-in-0-3">
41 <h1>Whats New in 0.3<a class="headerlink" href="#whats-new-in-0-3" title="Permalink to this headline">¶</a></h1>
42 <p>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.</p>
43 <p>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.</p>
44 <p>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.</p>
45 <div class="section" id="object-databases">
46 <h2>Object Databases<a class="headerlink" href="#object-databases" title="Permalink to this headline">¶</a></h2>
47 <p>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.</p>
48 <p>GitPython uses the <code class="docutils literal"><span class="pre">gitdb</span></code> 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.</p>
49 <p>The great thing about this is that <code class="docutils literal"><span class="pre">Repo</span></code> 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.</p>
50 </div>
51 <div class="section" id="reduced-memory-footprint">
52 <h2>Reduced Memory Footprint<a class="headerlink" href="#reduced-memory-footprint" title="Permalink to this headline">¶</a></h2>
53 <p>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.</p>
54 <p>The internal caches of tree objects were improved to use less memory as well.</p>
55 </div>
56 </div>
57
58
59 </div>
60 </div>
61 </div>
62 <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
63 <div class="sphinxsidebarwrapper">
64 <h3><a href="index.html">Table Of Contents</a></h3>
65 <ul>
66 <li><a class="reference internal" href="#">Whats New in 0.3</a><ul>
67 <li><a class="reference internal" href="#object-databases">Object Databases</a></li>
68 <li><a class="reference internal" href="#reduced-memory-footprint">Reduced Memory Footprint</a></li>
69 </ul>
70 </li>
71 </ul>
72 <div class="relations">
73 <h3>Related Topics</h3>
74 <ul>
75 <li><a href="index.html">Documentation overview</a><ul>
76 <li>Previous: <a href="intro.html" title="previous chapter">Overview / Install</a></li>
77 <li>Next: <a href="tutorial.html" title="next chapter">GitPython Tutorial</a></li>
78 </ul></li>
79 </ul>
80 </div>
81 <div role="note" aria-label="source link">
82 <h3>This Page</h3>
83 <ul class="this-page-menu">
84 <li><a href="_sources/whatsnew.txt"
85 rel="nofollow">Show Source</a></li>
86 </ul>
87 </div>
88 <div id="searchbox" style="display: none" role="search">
89 <h3>Quick search</h3>
90 <form class="search" action="search.html" method="get">
91 <input type="text" name="q" />
92 <input type="submit" value="Go" />
93 <input type="hidden" name="check_keywords" value="yes" />
94 <input type="hidden" name="area" value="default" />
95 </form>
96 </div>
97 <script type="text/javascript">$('#searchbox').show(0);</script>
98 </div>
99 </div>
100 <div class="clearer"></div>
101 </div>
102 <div class="footer">
103 &copy;Copyright (C) 2008, 2009 Michael Trier and contributors, 2010-2015 Sebastian Thiel.
104
105 |
106 Powered by <a href="http://sphinx-doc.org/">Sphinx 1.4.1</a>
107 &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.7</a>
108
109 |
110 <a href="_sources/whatsnew.txt"
111 rel="nofollow">Page source</a>
112 </div>
113
114
115
116
117 </body>
118 </html>
00 =========
11 Changelog
22 =========
3
4 2.1.3 - Bugfixes
5 ====================================
6
7 All issues and PRs can be viewed in all detail when following this URL:
8 https://github.com/gitpython-developers/GitPython/milestone/21?closed=1
9
310
411 2.1.1 - Bugfixes
512 ====================================
134141 1.0.2 - Fixes
135142 =============
136143
137 * IMPORTANT: Changed default object database of `Repo` objects to `GitComdObjectDB`. The pure-python implementation
144 * IMPORTANT: Changed default object database of `Repo` objects to `GitCmdObjectDB`. The pure-python implementation
138145 used previously usually fails to release its resources (i.e. file handles), which can lead to problems when working
139146 with large repositories.
140147 * CRITICAL: fixed incorrect `Commit` object serialization when authored or commit date had timezones which were not
1111 import os.path as osp
1212
1313
14 __version__ = '2.1.1'
14 __version__ = '2.1.3'
1515
1616
1717 #{ Initialization
1818 def _init_externals():
1919 """Initialize external projects by putting them into the path"""
20 if __version__ == '2.1.1':
20 if __version__ == '2.1.3':
2121 sys.path.insert(0, osp.join(osp.dirname(__file__), 'ext', 'gitdb'))
2222
2323 try:
4848 LockFile,
4949 BlockingLockFile,
5050 Stats,
51 Actor
51 Actor,
52 rmtree,
5253 )
5354
5455 #} END imports
253253 proc.terminate()
254254 proc.wait() # ensure process goes away
255255 except OSError as ex:
256 log.info("Ignored error after process has dies: %r", ex)
256 log.info("Ignored error after process had died: %r", ex)
257257 pass # ignore error when process already died
258258 except AttributeError:
259259 # try windows
260260 # for some reason, providing None for stdout/stderr still prints something. This is why
261261 # we simply use the shell and redirect to nul. Its slower than CreateProcess, question
262262 # is whether we really want to see all these messages. Its annoying no matter what.
263 call(("TASKKILL /F /T /PID %s 2>nul 1>nul" % str(proc.pid)), shell=True)
263 if is_win:
264 call(("TASKKILL /F /T /PID %s 2>nul 1>nul" % str(proc.pid)), shell=True)
264265 # END exception handling
265266
266267 def __getattr__(self, attr):
579580
580581 stdout_sink = (PIPE
581582 if with_stdout
582 else getattr(subprocess, 'DEVNULL', open(os.devnull, 'wb')))
583 else getattr(subprocess, 'DEVNULL', None) or open(os.devnull, 'wb'))
583584 log.debug("Popen(%s, cwd=%s, universal_newlines=%s, shell=%s)",
584585 command, cwd, universal_newlines, shell)
585586 try:
821822 is realized as non-existent
822823
823824 :param kwargs:
824 is a dict of keyword arguments.
825 This function accepts the same optional keyword arguments
826 as execute().
827
828 ``Examples``::
825 It contains key-values for the following:
826 - the :meth:`execute()` kwds, as listed in :var:`execute_kwargs`;
827 - "command options" to be converted by :meth:`transform_kwargs()`;
828 - the `'insert_kwargs_after'` key which its value must match one of ``*args``,
829 and any cmd-options will be appended after the matched arg.
830
831 Examples::
832
829833 git.rev_list('master', max_count=10, header=True)
834
835 turns into::
836
837 git rev-list max-count 10 --header master
830838
831839 :return: Same as ``execute``"""
832840 # Handle optional arguments prior to calling transform_kwargs
833841 # otherwise these'll end up in args, which is bad.
834 _kwargs = dict()
835 for kwarg in execute_kwargs:
836 try:
837 _kwargs[kwarg] = kwargs.pop(kwarg)
838 except KeyError:
839 pass
840
841 insert_after_this_arg = kwargs.pop('insert_kwargs_after', None)
842 exec_kwargs = dict((k, v) for k, v in kwargs.items() if k in execute_kwargs)
843 opts_kwargs = dict((k, v) for k, v in kwargs.items() if k not in execute_kwargs)
844
845 insert_after_this_arg = opts_kwargs.pop('insert_kwargs_after', None)
842846
843847 # Prepare the argument list
844 opt_args = self.transform_kwargs(**kwargs)
848 opt_args = self.transform_kwargs(**opts_kwargs)
845849 ext_args = self.__unpack_args([a for a in args if a is not None])
846850
847851 if insert_after_this_arg is None:
850854 try:
851855 index = ext_args.index(insert_after_this_arg)
852856 except ValueError:
853 raise ValueError("Couldn't find argument '%s' in args %s to insert kwargs after"
857 raise ValueError("Couldn't find argument '%s' in args %s to insert cmd options after"
854858 % (insert_after_this_arg, str(ext_args)))
855859 # end handle error
856860 args = ext_args[:index + 1] + opt_args + ext_args[index + 1:]
857 # end handle kwargs
861 # end handle opts_kwargs
858862
859863 call = [self.GIT_PYTHON_GIT_EXECUTABLE]
860864
869873 call.append(dashify(method))
870874 call.extend(args)
871875
872 return self.execute(call, **_kwargs)
876 return self.execute(call, **exec_kwargs)
873877
874878 def _parse_object_header(self, header_line):
875879 """
176176 # exception anyway after this function is called, even though I think
177177 # it's doing what it should. It seems that the strict encoder is called
178178 # to encode the unicode string that this function returns ...
179 decoded = replace_surrogate_encode(mystring)
179 decoded = replace_surrogate_encode(mystring, exc)
180180 else:
181181 raise exc
182182 except NotASurrogateError:
188188 pass
189189
190190
191 def replace_surrogate_encode(mystring):
191 def replace_surrogate_encode(mystring, exc):
192192 """
193193 Returns a (unicode) string, not the more logical bytes, because the codecs
194194 register_error functionality expects this.
9292 is the committed DateTime - use time.gmtime() to convert it into a
9393 different format
9494 :param committer_tz_offset: int_seconds_west_of_utc
95 is the timezone that the authored_date is in
95 is the timezone that the committed_date is in
9696 :param message: string
9797 is the commit message
9898 :param encoding: string
573573 # walk loose refs
574574 # Currently we do not follow links
575575 for root, dirs, files in os.walk(join_path_native(repo.git_dir, common_path)):
576 if 'refs/' not in root: # skip non-refs subfolders
576 if 'refs' not in root.split(os.sep): # skip non-refs subfolders
577577 refs_id = [d for d in dirs if d == 'refs']
578578 if refs_id:
579579 dirs[0:] = ['refs']
2121
2222 @property
2323 def commit(self):
24 """:return: Commit object the tag ref points to"""
24 """:return: Commit object the tag ref points to
25
26 :raise ValueError: if the tag points to a tree or blob"""
2527 obj = self.object
2628 while obj.type != 'commit':
2729 if obj.type == "tag":
2830 # it is a tag object which carries the commit as an object - we can point to anything
2931 obj = obj.object
3032 else:
31 raise ValueError("Tag %s points to a Blob or Tree - have never seen that before" % self)
33 raise ValueError(("Cannot resolve commit as tag %s points to a %s object - " +
34 "use the `.object` property instead to access it") % (self, obj.type))
3235 return obj
3336
3437 @property
467467 scmd = 'set-url'
468468 kwargs['insert_kwargs_after'] = scmd
469469 if old_url:
470 self.repo.git.remote(scmd, self.name, old_url, new_url, **kwargs)
470 self.repo.git.remote(scmd, self.name, new_url, old_url, **kwargs)
471471 else:
472472 self.repo.git.remote(scmd, self.name, new_url, **kwargs)
473473 return self
705705 if config.get_value('fetch', default=unset) is unset:
706706 msg = "Remote '%s' has no refspec set.\n"
707707 msg += "You can set it as follows:"
708 msg += " 'git config --add \"remote.%s.fetch +refs/heads/*:refs/heads/*\"'." % (self.name, self.name)
709 raise AssertionError(msg)
708 msg += " 'git config --add \"remote.%s.fetch +refs/heads/*:refs/heads/*\"'."
709 raise AssertionError(msg % (self.name, self.name))
710710 finally:
711711 config.release()
712712
3232 import os.path as osp
3333
3434 from .fun import rev_parse, is_git_dir, find_submodule_git_dir, touch
35 import gc
36 import gitdb
3537
3638
3739 log = logging.getLogger(__name__)
132134 # removed. It's just cleaner.
133135 if is_git_dir(curpath):
134136 self.git_dir = curpath
135 self._working_tree_dir = os.path.dirname(self.git_dir)
137 self._working_tree_dir = os.getenv('GIT_WORK_TREE', os.path.dirname(self.git_dir))
136138 break
137139
138140 sm_gitpath = find_submodule_git_dir(osp.join(curpath, '.git'))
176178 args.append(self.git)
177179 self.odb = odbt(*args)
178180
181 def __enter__(self):
182 return self
183
184 def __exit__(self, exc_type, exc_value, traceback):
185 self.close()
186
179187 def __del__(self):
188 self.close()
189
190 def close(self):
180191 if self.git:
181192 self.git.clear_cache()
193 gc.collect()
194 gitdb.util.mman.collect()
195 gc.collect()
182196
183197 def __eq__(self, rhs):
184198 if isinstance(rhs, Repo):
458472 :note: to receive only commits between two named revisions, use the
459473 "revA...revB" revision specifier
460474
461 :return ``git.Commit[]``"""
475 :return: ``git.Commit[]``"""
462476 if rev is None:
463477 rev = self.head.commit
464478
698712 committed_date=int(props[b'committer-time']))
699713 commits[hexsha] = c
700714 else:
701 # Discard the next line (it's a filename end tag)
702 line = next(stream)
703 tag, value = line.split(b' ', 1)
704 assert tag == b'filename', 'Unexpected git blame output'
705 orig_filename = value
715 # Discard all lines until we find "filename" which is
716 # guaranteed to be the last line
717 while True:
718 line = next(stream) # will fail if we reach the EOF unexpectedly
719 tag, value = line.split(b' ', 1)
720 if tag == b'filename':
721 orig_filename = value
722 break
706723
707724 yield BlameEntry(commits[hexsha],
708725 range(lineno, lineno + num_lines),
0 82b8902e033430000481eb355733cd7065342037 2 2 1
1 author Sebastian Thiel
2 author-mail <byronimo@gmail.com>
3 author-time 1270634931
4 author-tz +0200
5 committer Sebastian Thiel
6 committer-mail <byronimo@gmail.com>
7 committer-time 1270634931
8 committer-tz +0200
9 summary Used this release for a first beta of the 0.2 branch of development
10 previous 501bf602abea7d21c3dbb409b435976e92033145 AUTHORS
11 filename AUTHORS
12 82b8902e033430000481eb355733cd7065342037 14 14 1
13 previous 501bf602abea7d21c3dbb409b435976e92033145 AUTHORS
14 filename AUTHORS
15 c76852d0bff115720af3f27acdb084c59361e5f6 1 1 1
16 author Michael Trier
17 author-mail <mtrier@gmail.com>
18 author-time 1232829627
19 author-tz -0500
20 committer Michael Trier
21 committer-mail <mtrier@gmail.com>
22 committer-time 1232829627
23 committer-tz -0500
24 summary Lots of spring cleaning and added in Sphinx documentation.
25 previous bcd57e349c08bd7f076f8d6d2f39b702015358c1 AUTHORS
26 filename AUTHORS
27 c76852d0bff115720af3f27acdb084c59361e5f6 2 3 11
28 previous bcd57e349c08bd7f076f8d6d2f39b702015358c1 AUTHORS
29 filename AUTHORS
30 c76852d0bff115720af3f27acdb084c59361e5f6 13 15 2
31 previous bcd57e349c08bd7f076f8d6d2f39b702015358c1 AUTHORS
32 filename AUTHORS
66
77 import contextlib
88 from functools import wraps
9 import sys
9 import gc
1010 import io
1111 import logging
1212 import os
13 import sys
1314 import tempfile
1415 import textwrap
1516 import time
1617
1718 from git.compat import string_types, is_win
1819 from git.util import rmtree, cwd
20 import gitdb
1921
2022 import os.path as osp
23
24
2125 if sys.version_info[0:2] == (2, 6):
2226 import unittest2 as unittest
2327 else:
9599 # a windows-only issue. In fact things should be deleted, as well as
96100 # memory maps closed, once objects go out of scope. For some reason
97101 # though this is not the case here unless we collect explicitly.
98 import gc
99102 gc.collect()
100103 if not keep:
101104 rmtree(path)
143146 os.chdir(prev_cwd)
144147 rw_repo.git.clear_cache()
145148 rw_repo = None
146 import gc
147 gc.collect()
148149 if repo_dir is not None:
150 gc.collect()
151 gitdb.util.mman.collect()
152 gc.collect()
149153 rmtree(repo_dir)
150154 # END rm test repo if possible
151155 # END cleanup
302306 rw_daemon_repo.git.clear_cache()
303307 del rw_repo
304308 del rw_daemon_repo
305 import gc
309 gc.collect()
310 gitdb.util.mman.collect()
306311 gc.collect()
307312 if rw_repo_dir:
308313 rmtree(rw_repo_dir)
356361 each test type has its own repository
357362 """
358363 from git import Repo
359 import gc
360364 gc.collect()
361365 cls.rorepo = Repo(GIT_REPO)
362366
612612 remote.set_url(test2, delete=True)
613613 self.assertEqual(list(remote.urls), [test1, test3])
614614 # Testing changing an URL
615 remote.set_url(test3, test2)
615 remote.set_url(test2, test3)
616616 self.assertEqual(list(remote.urls), [test1, test2])
617617
618618 # will raise: fatal: --add --delete doesn't make sense
386386
387387 @patch.object(Git, '_call_process')
388388 def test_blame_incremental(self, git):
389 git.return_value = fixture('blame_incremental')
390 blame_output = self.rorepo.blame_incremental('9debf6b0aafb6f7781ea9d1383c86939a1aacde3', 'AUTHORS')
391 blame_output = list(blame_output)
392 self.assertEqual(len(blame_output), 5)
393
394 # Check all outputted line numbers
395 ranges = flatten([entry.linenos for entry in blame_output])
396 self.assertEqual(ranges, flatten([range(2, 3), range(14, 15), range(1, 2), range(3, 14), range(15, 17)]))
397
398 commits = [entry.commit.hexsha[:7] for entry in blame_output]
399 self.assertEqual(commits, ['82b8902', '82b8902', 'c76852d', 'c76852d', 'c76852d'])
400
401 # Original filenames
402 self.assertSequenceEqual([entry.orig_path for entry in blame_output], [u'AUTHORS'] * len(blame_output))
403
404 # Original line numbers
405 orig_ranges = flatten([entry.orig_linenos for entry in blame_output])
406 self.assertEqual(orig_ranges, flatten([range(2, 3), range(14, 15), range(1, 2), range(2, 13), range(13, 15)])) # noqa E501
389 # loop over two fixtures, create a test fixture for 2.11.1+ syntax
390 for git_fixture in ('blame_incremental', 'blame_incremental_2.11.1_plus'):
391 git.return_value = fixture(git_fixture)
392 blame_output = self.rorepo.blame_incremental('9debf6b0aafb6f7781ea9d1383c86939a1aacde3', 'AUTHORS')
393 blame_output = list(blame_output)
394 self.assertEqual(len(blame_output), 5)
395
396 # Check all outputted line numbers
397 ranges = flatten([entry.linenos for entry in blame_output])
398 self.assertEqual(ranges, flatten([range(2, 3), range(14, 15), range(1, 2), range(3, 14), range(15, 17)]))
399
400 commits = [entry.commit.hexsha[:7] for entry in blame_output]
401 self.assertEqual(commits, ['82b8902', '82b8902', 'c76852d', 'c76852d', 'c76852d'])
402
403 # Original filenames
404 self.assertSequenceEqual([entry.orig_path for entry in blame_output], [u'AUTHORS'] * len(blame_output))
405
406 # Original line numbers
407 orig_ranges = flatten([entry.orig_linenos for entry in blame_output])
408 self.assertEqual(orig_ranges, flatten([range(2, 3), range(14, 15), range(1, 2), range(2, 13), range(13, 15)])) # noqa E501
407409
408410 @patch.object(Git, '_call_process')
409411 def test_blame_complex_revision(self, git):
924926 raise AssertionError(ex, "It's ok if TC not running from `master`.")
925927
926928 self.failUnlessRaises(InvalidGitRepositoryError, Repo, worktree_path)
929
930 @with_rw_directory
931 def test_git_work_tree_env(self, rw_dir):
932 """Check that we yield to GIT_WORK_TREE"""
933 # clone a repo
934 # move .git directory to a subdirectory
935 # set GIT_DIR and GIT_WORK_TREE appropriately
936 # check that repo.working_tree_dir == rw_dir
937 self.rorepo.clone(join_path_native(rw_dir, 'master_repo'))
938
939 repo_dir = join_path_native(rw_dir, 'master_repo')
940 old_git_dir = join_path_native(repo_dir, '.git')
941 new_subdir = join_path_native(repo_dir, 'gitdir')
942 new_git_dir = join_path_native(new_subdir, 'git')
943 os.mkdir(new_subdir)
944 os.rename(old_git_dir, new_git_dir)
945
946 oldenv = os.environ.copy()
947 os.environ['GIT_DIR'] = new_git_dir
948 os.environ['GIT_WORK_TREE'] = repo_dir
949
950 try:
951 r = Repo()
952 self.assertEqual(r.working_tree_dir, repo_dir)
953 self.assertEqual(r.working_dir, repo_dir)
954 finally:
955 os.environ = oldenv