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

freev (refs)

class

new (collection_id, ref_name)

dup ()

equal (ref2)

free ()

hash ()

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 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 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

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.

equal(ref2)
Parameters:

ref2 (OSTree.CollectionRef) – another OSTree.CollectionRef

Returns:

True if self and ref2 are equal, False otherwise

Return type:

bool

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

New in version 2018.6.

free()

Free the given self.

New in version 2018.6.

hash()
Returns:

hash value for self

Return type:

int

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

New in version 2018.6.