Foundry.Vcs¶
- Subclasses:
Methods¶
- Inherited:
Foundry.Contextual (4), GObject.Object (37), Json.Serializable (8)
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r |
Signals¶
- Inherited:
Name |
Short Description |
|---|---|
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent_instance |
r |
Class Details¶
- class Foundry.Vcs(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
Abstract base class for plugins to implement support for a VCS.
- blame(file, bytes)¶
- Parameters:
file (
Foundry.VcsFile) – a [class`Foundry`.VcsFile]bytes (
GLib.BytesorNone) – optional contents for the file
- Returns:
a [class`Dex`.Future] that resolves to a [class`Foundry`.VcsBlame] or rejects with error
- Return type:
- describe_line_changes(file, contents)¶
- Parameters:
file (
Foundry.VcsFile) – a [class`Foundry`.VcsFile]contents (
GLib.Bytes) – the contents of the file
- Returns:
a [class`Dex`.Future] that resolves to a [class`Foundry`.VcsLineChanges] or rejects with error.
- Return type:
- diff(tree_a, tree_b)¶
- Parameters:
tree_a (
Foundry.VcsTree) – the old treetree_b (
Foundry.VcsTree) – the new tree
- Returns:
a [class`Dex`.Future] that resolves to a [class`Foundry`.VcsDiff] or rejects with error.
- Return type:
Diffs two [class`Foundry`.VcsTree] resulting in a [class`Foundry`.VcsDiff]
- dup_branch_name()¶
- Returns:
a string containing the branch name
- Return type:
Gets the name of the branch such as “main”.
- dup_id()¶
- Returns:
a string containing the identifier
- Return type:
Gets the identifier for the VCS such as “git” or “none”.
- dup_name()¶
- Returns:
a string containing the name
- Return type:
Gets the name of the vcs in title format such as “Git”
- emit_tip_changed()¶
Emits the “tip-changed” signal. This method is intended for use by subclasses to notify when the tip (most recent commit) has changed.
New in version 1.1.
- fetch(remote, operation)¶
- Parameters:
remote (
Foundry.VcsRemote) – a [class`Foundry`.VcsRemote]operation (
Foundry.Operation) – a [class`Foundry`.Operation]
- Returns:
a [class`Dex`.Future] that resolves to any value or rejects with error.
- Return type:
- find_commit(id)¶
- Parameters:
id (
str) – the identifier of the commit- Returns:
a [class`Dex`.Future] that resolves to a [class`Foundry`.VcsCommit].
- Return type:
Finds a commit by identifier
- find_file(file)¶
- Parameters:
file (
Gio.File) – the file to locate- Returns:
a [class`Dex`.Future] that resolves to a [class`Foundry`.VcsFile] or rejects with error
- Return type:
- find_remote(name)¶
- Parameters:
name (
str) – the name of the remote- Returns:
a [class`Dex`.Future] that resolves to a [class`Foundry`.VcsRemote].
- Return type:
- find_tree(id)¶
- Parameters:
id (
str) – the identifier of the tree- Returns:
a [class`Dex`.Future] that resolves to a [class`Foundry`.VcsTree].
- Return type:
Finds a [class`Foundry`.VcsTree] by tree identifier
- list_branches()¶
- Returns:
a [class`Dex`.Future] that resolves to a [iface`Gio`.ListModel] of [class`Foundry`.VcsBranch].
- Return type:
- list_commits_with_file(file)¶
- Parameters:
file (
Foundry.VcsFile) – a [class`Foundry`.VcsFile]- Returns:
a [class`Dex`.Future] that resolves to a [iface`Gio`.ListModel] of [class`Foundry`.VcsCommit]
- Return type:
- list_files()¶
- Returns:
a [class`Dex`.Future] that resolves to [iface`Gio`.ListModel] of [class`Foundry`.VcsFile].
- Return type:
List all files in the repository.
It is not required that implementations return files that are not indexed in their caches from this method.
- list_remotes()¶
- Returns:
a [class`Dex`.Future] that resolves to a [iface`Gio`.ListModel] of [class`Foundry`.VcsRemote].
- Return type:
- list_tags()¶
- Returns:
a [class`Dex`.Future] that resolves to a [iface`Gio`.ListModel] of [class`Foundry`.VcsTag].
- Return type:
- load_tip()¶
- Returns:
a [class`Dex`.Future] that resolves to a [class`Foundry`.VcsCommit] or rejects with error.
- Return type:
Loads the tip (most recent commit) from the repository.
New in version 1.1.
- query_file_status(file)¶
- Parameters:
file (
Gio.File) –- Returns:
a [class`Dex`.Future] that resolves to a [flags`Foundry`.VcsFileStatus] or rejects with error.
- Return type:
Queries the state of file in the repository.
- do_blame(file, bytes) virtual¶
- Parameters:
file (
Foundry.VcsFile) – a [class`Foundry`.VcsFile]bytes (
GLib.BytesorNone) – optional contents for the file
- Returns:
a [class`Dex`.Future] that resolves to a [class`Foundry`.VcsBlame] or rejects with error
- Return type:
- do_describe_line_changes(file, contents) virtual¶
- Parameters:
file (
Foundry.VcsFile) – a [class`Foundry`.VcsFile]contents (
GLib.Bytes) – the contents of the file
- Returns:
a [class`Dex`.Future] that resolves to a [class`Foundry`.VcsLineChanges] or rejects with error.
- Return type:
- do_diff(tree_a, tree_b) virtual¶
- Parameters:
tree_a (
Foundry.VcsTree) – the old treetree_b (
Foundry.VcsTree) – the new tree
- Returns:
a [class`Dex`.Future] that resolves to a [class`Foundry`.VcsDiff] or rejects with error.
- Return type:
Diffs two [class`Foundry`.VcsTree] resulting in a [class`Foundry`.VcsDiff]
- do_dup_branch_name() virtual¶
- Returns:
a string containing the branch name
- Return type:
Gets the name of the branch such as “main”.
- do_dup_id() virtual¶
- Returns:
a string containing the identifier
- Return type:
Gets the identifier for the VCS such as “git” or “none”.
- do_dup_name() virtual¶
- Returns:
a string containing the name
- Return type:
Gets the name of the vcs in title format such as “Git”
- do_fetch(remote, operation) virtual¶
- Parameters:
remote (
Foundry.VcsRemote) – a [class`Foundry`.VcsRemote]operation (
Foundry.Operation) – a [class`Foundry`.Operation]
- Returns:
a [class`Dex`.Future] that resolves to any value or rejects with error.
- Return type:
- do_find_commit(id) virtual¶
- Parameters:
id (
str) – the identifier of the commit- Returns:
a [class`Dex`.Future] that resolves to a [class`Foundry`.VcsCommit].
- Return type:
Finds a commit by identifier
- do_find_file(file) virtual¶
- Parameters:
file (
Gio.File) – the file to locate- Returns:
a [class`Dex`.Future] that resolves to a [class`Foundry`.VcsFile] or rejects with error
- Return type:
- do_find_remote(name) virtual¶
- Parameters:
name (
str) – the name of the remote- Returns:
a [class`Dex`.Future] that resolves to a [class`Foundry`.VcsRemote].
- Return type:
- do_find_tree(id) virtual¶
- Parameters:
id (
str) – the identifier of the tree- Returns:
a [class`Dex`.Future] that resolves to a [class`Foundry`.VcsTree].
- Return type:
Finds a [class`Foundry`.VcsTree] by tree identifier
- do_list_branches() virtual¶
- Returns:
a [class`Dex`.Future] that resolves to a [iface`Gio`.ListModel] of [class`Foundry`.VcsBranch].
- Return type:
- do_list_commits_with_file(file) virtual¶
- Parameters:
file (
Foundry.VcsFile) – a [class`Foundry`.VcsFile]- Returns:
a [class`Dex`.Future] that resolves to a [iface`Gio`.ListModel] of [class`Foundry`.VcsCommit]
- Return type:
- do_list_files() virtual¶
- Returns:
a [class`Dex`.Future] that resolves to [iface`Gio`.ListModel] of [class`Foundry`.VcsFile].
- Return type:
List all files in the repository.
It is not required that implementations return files that are not indexed in their caches from this method.
- do_list_remotes() virtual¶
- Returns:
a [class`Dex`.Future] that resolves to a [iface`Gio`.ListModel] of [class`Foundry`.VcsRemote].
- Return type:
- do_list_tags() virtual¶
- Returns:
a [class`Dex`.Future] that resolves to a [iface`Gio`.ListModel] of [class`Foundry`.VcsTag].
- Return type:
- do_load_tip() virtual¶
- Returns:
a [class`Dex`.Future] that resolves to a [class`Foundry`.VcsCommit] or rejects with error.
- Return type:
Loads the tip (most recent commit) from the repository.
New in version 1.1.
Signal Details¶
- Foundry.Vcs.signals.tip_changed(vcs)¶
- Signal Name:
tip-changed- Flags:
- Parameters:
vcs (
Foundry.Vcs) – The object which received the signal
Property Details¶
- Foundry.Vcs.props.provider¶
- Name:
provider- Type:
- Default Value:
- Flags: