Foundry.VcsProvider

g Foundry.Contextual Foundry.Contextual Foundry.VcsProvider Foundry.VcsProvider Foundry.Contextual->Foundry.VcsProvider GObject.GInterface GObject.GInterface Gio.ListModel Gio.ListModel GObject.GInterface->Gio.ListModel Json.Serializable Json.Serializable GObject.GInterface->Json.Serializable GObject.Object GObject.Object GObject.Object->Foundry.Contextual Gio.ListModel->Foundry.VcsProvider Json.Serializable->Foundry.Contextual

Subclasses:

None

Methods

Inherited:

Foundry.Contextual (4), GObject.Object (37), Json.Serializable (8), Gio.ListModel (4)

Structs:

GObject.ObjectClass (5)

dup_name ()

dup_plugin_info ()

initialize ()

set_vcs (vcs)

supports_uri (uri_string)

Virtual Methods

Inherited:

GObject.Object (7), Json.Serializable (5), Gio.ListModel (3)

do_dup_name ()

do_initialize ()

do_supports_uri (uri_string)

Properties

Inherited:

Foundry.Contextual (1)

Name

Type

Flags

Short Description

plugin-info

Peas.PluginInfo

r/w/co

Signals

Inherited:

GObject.Object (1), Gio.ListModel (1)

Fields

Inherited:

GObject.Object (1), Gio.ListModel (1)

Name

Type

Access

Description

parent_instance

Foundry.Contextual

r

Class Details

class Foundry.VcsProvider(**kwargs)
Bases:

Foundry.Contextual, Gio.ListModel

Abstract:

Yes

Structure:

Foundry.VcsProviderClass

Abstract base class for plugins to implement a version control system such as Git, Mercurial, Subversion, or CVS.

dup_name()
Returns:

the name of the provider

Return type:

str

Gets a name for the provider that is expected to be displayed to users such as “Flatpak”.

dup_plugin_info()
Returns:

a [class`Peas`.PluginInfo] or None

Return type:

Peas.PluginInfo or None

Gets the plugin the provider belongs to.

New in version 1.1.

initialize()
Returns:

a [class`Dex`.Future] that resolves to any value or rejects with error.

Return type:

Dex.Future

Initialize a repository for the current project.

The provider should also update the VcsManager to the new Vcs that is created/initialized as part of this.

New in version 1.1.

set_vcs(vcs)
Parameters:

vcs (Foundry.Vcs) –

supports_uri(uri_string)
Parameters:

uri_string (str) –

Returns:

true if the URI is supported

Return type:

bool

Checks if a URI is supported by the VCS provider.

This is useful to determine if you can get a downloader for a URI to clone the repository.

do_dup_name() virtual
Returns:

the name of the provider

Return type:

str

Gets a name for the provider that is expected to be displayed to users such as “Flatpak”.

do_initialize() virtual
Returns:

a [class`Dex`.Future] that resolves to any value or rejects with error.

Return type:

Dex.Future

Initialize a repository for the current project.

The provider should also update the VcsManager to the new Vcs that is created/initialized as part of this.

New in version 1.1.

do_supports_uri(uri_string) virtual
Parameters:

uri_string (str) –

Returns:

true if the URI is supported

Return type:

bool

Checks if a URI is supported by the VCS provider.

This is useful to determine if you can get a downloader for a URI to clone the repository.

Property Details

Foundry.VcsProvider.props.plugin_info
Name:

plugin-info

Type:

Peas.PluginInfo

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY