|
OpenQuizz
Une application de gestion des contenus pédagogiques
|


Public Member Functions | |
| def | __init__ (self, repo, binsha, mode=tree_id<< 12, path=None) |
| def | join (self, file) |
| def | __div__ (self, file) |
| def | __truediv__ (self, file) |
| def | trees (self) |
| def | blobs (self) |
| def | cache (self) |
| def | traverse (self, predicate=lambda i, True d, prune=lambda i, False d, depth=-1, branch_first=True, visit_once=False, ignore_self=1) |
| def | __getslice__ (self, i, j) |
| def | __iter__ (self) |
| def | __len__ (self) |
| def | __getitem__ (self, item) |
| def | __contains__ (self, item) |
| def | __reversed__ (self) |
Public Member Functions inherited from IndexObject | |
| def | __hash__ (self) |
| def | name (self) |
| def | abspath (self) |
Public Member Functions inherited from Object | |
| def | __init__ (self, repo, binsha) |
| def | new (cls, repo, id) |
| def | new_from_sha (cls, repo, sha1) |
| def | __eq__ (self, other) |
| def | __ne__ (self, other) |
| def | __str__ (self) |
| def | __repr__ (self) |
| def | hexsha (self) |
| def | data_stream (self) |
| def | stream_data (self, ostream) |
Public Member Functions inherited from Diffable | |
| def | diff (self, other=Index, paths=None, create_patch=False, **kwargs) |
Public Member Functions inherited from Traversable | |
| def | list_traverse (self, *args, **kwargs) |
| def | traverse (self, predicate=lambda i, True d, prune=lambda i, False d, depth=-1, branch_first=True, visit_once=True, ignore_self=1, as_edge=False) |
Static Public Attributes | |
| type | |
| commit_id | |
| blob_id | |
| symlink_id | |
| tree_id | |
Static Public Attributes inherited from Object | |
| NULL_HEX_SHA | |
| NULL_BIN_SHA | |
| TYPES | |
| type | |
Additional Inherited Members | |
Data Fields inherited from IndexObject | |
| mode | |
| path | |
Data Fields inherited from Object | |
| repo | |
| binsha | |
| size | |
Tree objects represent an ordered list of Blobs and other Trees.
``Tree as a list``::
Access a specific blob using the
tree['filename'] notation.
You may as well access by index
blob = tree[0]
| def __init__ | ( | self, | |
| repo, | |||
| binsha, | |||
mode = tree_id << 12, |
|||
path = None |
|||
| ) |
Initialize a newly instanced IndexObject
:param repo: is the Repo we are located in
:param binsha: 20 byte sha1
:param mode:
is the stat compatible file mode as int, use the stat module
to evaluate the information
:param path:
is the path to the file in the file system, relative to the git repository root, i.e.
file.ext or folder/other.ext
:note:
Path may not be set of the index object has been created directly as it cannot
be retrieved without knowing the parent tree.
Reimplemented from IndexObject.
| def __contains__ | ( | self, | |
| item | |||
| ) |
| def __div__ | ( | self, | |
| file | |||
| ) |
For PY2 only
| def __getitem__ | ( | self, | |
| item | |||
| ) |
| def __getslice__ | ( | self, | |
| i, | |||
| j | |||
| ) |
| def __iter__ | ( | self | ) |
| def __len__ | ( | self | ) |
| def __reversed__ | ( | self | ) |
| def __truediv__ | ( | self, | |
| file | |||
| ) |
For PY3 only
| def blobs | ( | self | ) |
:return: list(Blob, ...) list of blobs directly below this tree
| def cache | ( | self | ) |
:return: An object allowing to modify the internal cache. This can be used
to change the tree's contents. When done, make sure you call ``set_done``
on the tree modifier, or serialization behaviour will be incorrect.
See the ``TreeModifier`` for more information on how to alter the cache
| def join | ( | self, | |
| file | |||
| ) |
Find the named object in this tree's contents :return: ``git.Blob`` or ``git.Tree`` or ``git.Submodule`` :raise KeyError: if given file or tree does not exist in tree
| def traverse | ( | self, | |
predicate = lambda i, |
|||
| True | d, | ||
prune = lambda i, |
|||
| False | d, | ||
depth = -1, |
|||
branch_first = True, |
|||
visit_once = False, |
|||
ignore_self = 1 |
|||
| ) |
For documentation, see util.Traversable.traverse Trees are set to visit_once = False to gain more performance in the traversal
| def trees | ( | self | ) |
:return: list(Tree, ...) list of trees directly below this tree
|
static |
|
static |
|
static |
|
static |
|
static |