OpenQuizz
Une application de gestion des contenus pédagogiques
GitCmdObjectDB Class Reference
Inheritance diagram for GitCmdObjectDB:
Collaboration diagram for GitCmdObjectDB:

Public Member Functions

def __init__ (self, root_path, git)
 
def info (self, sha)
 
def stream (self, sha)
 
def partial_to_complete_sha_hex (self, partial_hexsha)
 
- Public Member Functions inherited from LooseObjectDB
def __init__ (self, root_path)
 
def object_path (self, hexsha)
 
def readable_db_object_path (self, hexsha)
 
def set_ostream (self, stream)
 
def has_object (self, sha)
 
def store (self, istream)
 
def sha_iter (self)
 
def size (self)
 
- Public Member Functions inherited from FileDBBase
def root_path (self)
 
def db_path (self, rela_path)
 
- Public Member Functions inherited from ObjectDBR
def __contains__ (self, sha)
 
- Public Member Functions inherited from ObjectDBW
def __init__ (self, *args, **kwargs)
 
def ostream (self)
 

Additional Inherited Members

- Static Public Attributes inherited from LooseObjectDB
 stream_chunk_size
 
 new_objects_mode
 

Detailed Description

A database representing the default git object store, which includes loose
objects, pack files and an alternates file

It will create objects only in the loose object database.
:note: for now, we use the git command to do all the lookup, just until he
    have packs and the other implementations

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  root_path,
  git 
)
Initialize this instance with the root and a git command

Member Function Documentation

◆ info()

def info (   self,
  sha 
)
:return: OInfo instance
:param sha: bytes binary sha
:raise BadObject:

Reimplemented from LooseObjectDB.

◆ partial_to_complete_sha_hex()

def partial_to_complete_sha_hex (   self,
  partial_hexsha 
)
:return: Full binary 20 byte sha from the given partial hexsha
:raise AmbiguousObjectName:
:raise BadObject:
:note: currently we only raise BadObject as git does not communicate
    AmbiguousObjects separately

Reimplemented from LooseObjectDB.

◆ stream()

def stream (   self,
  sha 
)
For now, all lookup is done by git itself

Reimplemented from LooseObjectDB.


The documentation for this class was generated from the following file: