Ggit.Remote¶
| Subclasses: | None | 
|---|
Methods¶
| Inherited: | GObject.Object (37) | 
|---|---|
| Structs: | GObject.ObjectClass (5) | 
| class | new(repository, name, url) | 
| class | new_anonymous(repository, url) | 
| connect(direction, callbacks, proxy_options, custom_headers) | |
| disconnect() | |
| download(specs, fetch_options) | |
| get_connected() | |
| get_fetch_specs() | |
| get_name() | |
| get_owner() | |
| get_push_specs() | |
| get_url() | |
| list() | |
| push(specs, push_options) | |
| update_tips(callbacks, update_fetch_head, tags_type, message) | |
| upload(specs, push_options) | 
Virtual Methods¶
| Inherited: | GObject.Object (7) | 
|---|
Properties¶
| Inherited: | Ggit.Native (1) | 
|---|
Signals¶
| Inherited: | GObject.Object (1) | 
|---|
Class Details¶
- 
class Ggit.Remote(**kwargs)¶
- Bases: - Ggit.Native- Abstract: - No - Structure: - Ggit.RemoteClass- 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.Remoteor- None.- Return type: - Ggit.Remoteor- None- Creates a remote with the default refspecs in memory. You can use this when you have a URL instead of a remote’s name. 
- repository (
 - 
classmethod new_anonymous(repository, url)¶
- Parameters: - repository (Ggit.Repository) – aGgit.Repository.
- url (str) – the remote repository’s URL.
 - Raises: - Returns: - a newly allocated - Ggit.Remoteor- None.- Return type: - Ggit.Remoteor- None- Creates a remote with the specified refspec in memory. You can use this when you have a URL instead of a remote’s name. 
- repository (
 - 
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. 
- direction (
 - 
disconnect()¶
- Closes the connection to the remote and frees the underlying transport. 
 - 
download(specs, fetch_options)¶
- Parameters: - specs ([str] orNone) – the ref specs.
- 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. 
- specs ([
 - 
get_fetch_specs()¶
- Raises: - GLib.Error- Returns: - a list of fetch refspecs or - None.- Return type: - [ - str] or- None- Get the list of fetch refspecs for the given remote. 
 - 
get_owner()¶
- Returns: - the repository where the remote resides or - None.- Return type: - Ggit.Repositoryor- None- Gets the repository where self resides. 
 - 
get_push_specs()¶
- Raises: - GLib.Error- Returns: - a list of push refspecs or - None.- Return type: - [ - str] or- None- Get the list of push refspecs for the given remote. 
 - 
list()¶
- Raises: - GLib.Error- Returns: - the remote heads or - None.- Return type: - [ - Ggit.RemoteHead] or- None- Get a list of refs at the remote. 
 - 
push(specs, push_options)¶
- Parameters: - specs ([str] orNone) – the ref specs.
- 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. 
- specs ([
 - 
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. 
- callbacks (
 - 
upload(specs, push_options)¶
- Parameters: - specs ([str] orNone) – the ref specs.
- push_options (Ggit.PushOptions) – aGgit.PushOptions
 - Raises: - Returns: - Return type: - Create a packfile and send it to the server 
- specs ([
 
- 
classmethod