OSTree.CollectionRef

Fields

Name Type Access Description
collection_id str r/w collection ID which provided the ref, or None if there is no associated collection
ref_name str r/w ref name

Methods

class dupv (refs)
class equal (ref1, ref2)
class freev (refs)
class hash (ref)
class new (collection_id, ref_name)
  dup ()
  free ()

Details

class OSTree.CollectionRef

A structure which globally uniquely identifies a ref as the tuple (collection_id, ref_name). For backwards compatibility, collection_id may be None, indicating a ref name which is not globally unique.

New in version 2018.6.

classmethod dupv(refs)
Parameters:refs ([OSTree.CollectionRef]) – None-terminated array of OSTree.CollectionRefs
Returns:a newly allocated copy of refs
Return type:[OSTree.CollectionRef]

Copy an array of OSTree.CollectionRefs, including deep copies of all its elements. refs must be None-terminated; it may be empty, but must not be None.

New in version 2018.6.

classmethod equal(ref1, ref2)
Parameters:
Returns:

True if ref1 and ref2 are equal, False otherwise

Return type:

bool

Compare ref1 and ref2 and return True if they have the same collection ID and ref name, and False otherwise. Both ref1 and ref2 must be non-None.

New in version 2018.6.

classmethod freev(refs)
Parameters:refs ([OSTree.CollectionRef]) – an array of OSTree.CollectionRefs

Free the given array of refs, including freeing all its elements. refs must be None-terminated; it may be empty, but must not be None.

New in version 2018.6.

classmethod hash(ref)
Parameters:ref (object) – an OSTree.CollectionRef
Returns:hash value for ref
Return type:int

Hash the given ref. This function is suitable for use with GLib.HashTable. ref must be non-None.

New in version 2018.6.

classmethod new(collection_id, ref_name)
Parameters:
  • collection_id (str or None) – a collection ID, or None for a plain ref
  • ref_name (str) – a ref name
Returns:

a new OSTree.CollectionRef

Return type:

OSTree.CollectionRef or None

Create a new OSTree.CollectionRef containing (collection_id, ref_name). If collection_id is None, this is equivalent to a plain ref name string (not a refspec; no remote name is included), which can be used for non-P2P operations.

New in version 2018.6.

dup()
Returns:a newly allocated copy of self
Return type:OSTree.CollectionRef

Create a copy of the given self.

New in version 2018.6.

free()

Free the given self.

New in version 2018.6.