Ggit.Remote¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent_instance |
r |
Class Details¶
- class Ggit.Remote(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Represents a git remote.
- classmethod new(repository, name, url)¶
- Parameters:
repository (
Ggit.Repository) – aGgit.Repository.name (
str) – the remote’s name.url (
str) – the remote repository’s URL.
- Raises:
- Returns:
a newly allocated
Ggit.RemoteorNone.- Return type:
Ggit.RemoteorNone
Creates a remote with the default refspecs in memory. You can use this when you have a URL instead of a remote’s name.
- classmethod new_anonymous(repository, url)¶
- Parameters:
repository (
Ggit.Repository) – aGgit.Repository.url (
str) – the remote repository’s URL.
- Raises:
- Returns:
a newly allocated
Ggit.RemoteorNone.- Return type:
Ggit.RemoteorNone
Creates a remote with the specified refspec in memory. You can use this when you have a URL instead of a remote’s name.
- connect(direction, callbacks, proxy_options, custom_headers)¶
- Parameters:
direction (
Ggit.Direction) – whether you want to receive or send data.callbacks (
Ggit.RemoteCallbacks) – the callbacks to use for this connection.proxy_options (
Ggit.ProxyOptionsorNone) – the proxy options.custom_headers (
strorNone) – extra HTTP headers to use in this connection.
- Raises:
Opens a connection to a remote. The transport is selected based on the URL. The direction argument is due to a limitation of the git protocol (over TCP or SSH) which starts up a specific binary which can only do the one or the other.
- disconnect()¶
Closes the connection to the remote and frees the underlying transport.
- download(specs, fetch_options)¶
- Parameters:
fetch_options (
Ggit.FetchOptions) – aGgit.FetchOptions.
- Raises:
- Returns:
- Return type:
Connect to the remote if not yet connected, negotiate with the remote about which objects are missing and download the resulting packfile and its index.
- get_connected()¶
-
Check whether self is connected.
- get_fetch_specs()¶
- Raises:
- Returns:
a list of fetch refspecs or
None.- Return type:
Get the list of fetch refspecs for the given remote.
- get_owner()¶
- Returns:
the repository where the remote resides or
None.- Return type:
Gets the repository where self resides.
- get_push_specs()¶
- Raises:
- Returns:
a list of push refspecs or
None.- Return type:
Get the list of push refspecs for the given remote.
- list()¶
- Raises:
- Returns:
the remote heads or
None.- Return type:
[
Ggit.RemoteHead] orNone
Get a list of refs at the remote.
- prune(callbacks)¶
- Parameters:
callbacks (
Ggit.RemoteCallbacks) – the callbacks to use for this connection.- Raises:
Prune tracking refs that are no longer present on remote.
- push(specs, push_options)¶
- Parameters:
push_options (
Ggit.PushOptions) – aGgit.PushOptions.
- Raises:
- Returns:
- Return type:
Connect to the remote if not yet connected, negotiate with the remote about which objects are missing, create a packfile with the missing objects and send it.
- update_tips(callbacks, update_fetch_head, tags_type, message)¶
- Parameters:
callbacks (
Ggit.RemoteCallbacks) – aGgit.RemoteCallbacks.update_fetch_head (
bool) – whether to write to FETCH_HEAD.Trueto behave like git.tags_type (
Ggit.RemoteDownloadTagsType) – what the behaviour for downloading tags is for this fetch. This is ignored for push. This must be the same value passed toGgit.Remote.download().message (
strorNone) – reflog_message The message to insert into the reflogs. IfNoneand fetching, the default is “fetch <name>”, where <name> is the name of the remote (or its url, for in-memory remotes). This parameter is ignored when pushing.
- Raises:
- Returns:
- Return type:
Update tips to the new state.
- upload(specs, push_options)¶
- Parameters:
push_options (
Ggit.PushOptions) – aGgit.PushOptions
- Raises:
- Returns:
- Return type:
Create a packfile and send it to the server