d.r.InfoRefsContainer(RefsContainer) : class documentation

Part of dulwich.repo View In Hierarchy

Refs container that reads refs from a info/refs file.
Method __init__ Undocumented
Method allkeys All refs present in this container.
Method read_loose_ref Read a loose reference and return its contents.
Method get_packed_refs Get contents of the packed-refs file.
Method get_peeled Return the cached peeled value of a ref, if available.

Inherited from RefsContainer:

Method set_ref Undocumented
Method set_symbolic_ref Make a ref point at another ref.
Method import_refs Undocumented
Method keys Refs present in this container.
Method subkeys Refs present in this container under a base.
Method as_dict Return the contents of this container as a dictionary.
Method read_ref Read a reference without following any references.
Method __contains__ Undocumented
Method __getitem__ Get the SHA1 for a reference name.
Method set_if_equals Set a refname to new_ref only if it currently equals old_ref.
Method add_if_new Add a new reference only if it does not already exist.
Method __setitem__ Set a reference name to point to the given SHA1.
Method remove_if_equals Remove a refname only if it currently equals old_ref.
Method __delitem__ Remove a refname.
Method _check_refname Ensure a refname is valid and lives in refs or is HEAD.
Method _follow Follow a reference name.
def __init__(self, f):
Undocumented
def allkeys(self):
All refs present in this container.
def read_loose_ref(self, name):
Read a loose reference and return its contents.
Parametersnamethe refname to read
ReturnsThe contents of the ref file, or None if it does not exist.
def get_packed_refs(self):
Get contents of the packed-refs file.
ReturnsDictionary mapping ref names to SHA1s
NoteWill return an empty dictionary when no packed-refs file is present.
def get_peeled(self, name):
Return the cached peeled value of a ref, if available.
ParametersnameName of the ref to peel
ReturnsThe peeled value of the ref. If the ref is known not point to a tag, this will be the SHA the ref refers to. If the ref may point to a tag, but no cached information is available, None is returned.
API Documentation for Dulwich, generated by pydoctor at 2013-10-16 22:58:09.