Top | ![]() |
![]() |
![]() |
![]() |
IdeVcs *
ide_vcs_from_context (IdeContext *context
);
Gets the IdeVcs for the context.
Since: 3.32
IdeVcs *
ide_vcs_ref_from_context (IdeContext *context
);
A thread-safe version of ide_vcs_from_context()
.
Since: 3.32
GFile *
ide_vcs_get_workdir (IdeVcs *self
);
Retrieves the working directory for the context. This is the root of where the project files exist.
This function is safe to call from threads holding a reference to self
.
Since: 3.32
gboolean ide_vcs_is_ignored (IdeVcs *self
,GFile *file
,GError **error
);
This function will check if file
is considered an "ignored file" by
the underlying Version Control System.
For convenience, this function will return TRUE
if file
is NULL
.
If self
is NULL
, only static checks against known ignored files
will be performed (such as .git, .flatpak-builder, etc).
TRUE
if the path should be ignored.
Thread safety: This function is safe to call from a thread as IdeVcs implementations are required to ensure this function is thread-safe.
Since: 3.32
gboolean ide_vcs_path_is_ignored (IdeVcs *self
,const gchar *path
,GError **error
);
This function acts like ide_vcs_is_ignored()
except that it
allows for using a regular file-system path.
It will check if the path is absolute or relative to the project directory and adjust as necessary.
For convenience, this function will return TRUE
if path
is NULL
.
If self
is NULL
, only registered ignore patterns will be checked.
TRUE
if the path should be ignored.
Thread safety: This function is safe to call from a thread as IdeVcs implementations are required to ensure this function is thread-safe.
Since: 3.32
IdeVcsConfig *
ide_vcs_get_config (IdeVcs *self
);
Retrieves an IdeVcsConfig for the IdeVcs provided. If the IdeVcs implementation does not
support access to configuration, then NULL
is returned.
Since: 3.32
gchar *
ide_vcs_get_branch_name (IdeVcs *self
);
Retrieves the name of the branch in the current working directory.
Since: 3.32
void ide_vcs_list_status_async (IdeVcs *self
,GFile *directory_or_file
,gboolean include_descendants
,gint io_priority
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Retrieves the status of the files matching the request. If
directory_or_file
is a directory, then all files within that directory
will be scanned for changes. If include_descendants
is TRUE
, the
IdeVcs will scan sub-directories for changes as well.
The function specified by callback
should call ide_vcs_list_status_finish()
to retrieve the result of this asynchronous operation.
self |
a IdeVcs |
|
directory_or_file |
a GFile containing a file or directory within the working tree to retrieve the status of. |
|
include_descendants |
if descendants of |
|
io_priority |
a priority for the IO, such as |
|
cancellable |
A GCancellable or |
[nullable] |
callback |
a callback for the operation |
|
user_data |
closure data for |
Since: 3.32
GListModel * ide_vcs_list_status_finish (IdeVcs *self
,GAsyncResult *result
,GError **error
);
Completes an asynchronous request to ide_vcs_list_status_async()
.
The result of this function is a GListModel containing objects that are IdeVcsFileInfo.
self |
a IdeVcs |
|
result |
a GAsyncResult provided to the callback |
|
error |
a location for a GError |
A GListModel containing an IdeVcsFileInfo for each of the files scanned
by the IdeVcs. Upon failure, NULL
is returned and error
is set.
[transfer full][nullable]
Since: 3.32
void ide_vcs_list_branches_async (IdeVcs *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
GPtrArray * ide_vcs_list_branches_finish (IdeVcs *self
,GAsyncResult *result
,GError **error
);
Since: 3.32
void ide_vcs_list_tags_async (IdeVcs *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
GPtrArray * ide_vcs_list_tags_finish (IdeVcs *self
,GAsyncResult *result
,GError **error
);
Since: 3.32
void ide_vcs_switch_branch_async (IdeVcs *self
,IdeVcsBranch *branch
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
gboolean ide_vcs_switch_branch_finish (IdeVcs *self
,GAsyncResult *result
,GError **error
);
void ide_vcs_push_branch_async (IdeVcs *self
,IdeVcsBranch *branch
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
gboolean ide_vcs_push_branch_finish (IdeVcs *self
,GAsyncResult *result
,GError **error
);
struct IdeVcsInterface { GTypeInterface parent_interface; GFile *(*get_workdir) (IdeVcs *self); gboolean (*is_ignored) (IdeVcs *self, GFile *file, GError **error); gint (*get_priority) (IdeVcs *self); void (*changed) (IdeVcs *self); IdeVcsConfig *(*get_config) (IdeVcs *self); gchar *(*get_branch_name) (IdeVcs *self); void (*list_status_async) (IdeVcs *self, GFile *directory_or_file, gboolean include_descendants, gint io_priority, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); GListModel *(*list_status_finish) (IdeVcs *self, GAsyncResult *result, GError **error); void (*list_branches_async) (IdeVcs *self, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); GPtrArray *(*list_branches_finish) (IdeVcs *self, GAsyncResult *result, GError **error); void (*list_tags_async) (IdeVcs *self, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); GPtrArray *(*list_tags_finish) (IdeVcs *self, GAsyncResult *result, GError **error); void (*switch_branch_async) (IdeVcs *self, IdeVcsBranch *branch, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gboolean (*switch_branch_finish) (IdeVcs *self, GAsyncResult *result, GError **error); void (*push_branch_async) (IdeVcs *self, IdeVcsBranch *branch, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gboolean (*push_branch_finish) (IdeVcs *self, GAsyncResult *result, GError **error); };
“branch-name”
property“branch-name” gchar *
The current name of the branch.
Owner: IdeVcs
Flags: Read
Default value: NULL
“workdir”
property“workdir” GFile *
The working directory for the VCS.
Owner: IdeVcs
Flags: Read