44
55 From https://github.com/saltstack/salt (Apache License):
66
7- - [`GitRepo .remote`](libvcs.git.GitRepo .remote) (renamed to ``remote``)
8- - [`GitRepo .remote`](libvcs.git.GitRepo .remote_set) (renamed to ``set_remote``)
7+ - [`GitProject .remote`](libvcs.git.GitProject .remote) (renamed to ``remote``)
8+ - [`GitProject .remote`](libvcs.git.GitProject .remote_set) (renamed to ``set_remote``)
99
1010 From pip (MIT Licnese):
1111
12- - [`GitRepo .remote`](libvcs.git.GitRepo .remote_set) (renamed to ``set_remote``)
13- - [`GitRepo .convert_pip_url`](libvcs.git.GitRepo .convert_pip_url`) (``get_url_rev``)
14- - [`GitRepo .get_revision`](libvcs.git.GitRepo .get_revision)
15- - [`GitRepo .get_git_version`](libvcs.git.GitRepo .get_git_version)
12+ - [`GitProject .remote`](libvcs.git.GitProject .remote_set) (renamed to ``set_remote``)
13+ - [`GitProject .convert_pip_url`](libvcs.git.GitProject .convert_pip_url`) (``get_url_rev``)
14+ - [`GitProject .get_revision`](libvcs.git.GitProject .get_revision)
15+ - [`GitProject .get_git_version`](libvcs.git.GitProject .get_git_version)
1616""" # NOQA: E501
1717import logging
1818import pathlib
2222
2323from .. import exc
2424from ..projects .base import (
25- BaseRepo ,
25+ BaseProject ,
2626 VCSLocation ,
2727 convert_pip_url as base_convert_pip_url ,
2828)
@@ -134,12 +134,12 @@ class GitRemoteDict(TypedDict):
134134 push_url : str
135135
136136
137- GitRepoRemoteDict = Dict [str , GitRemote ]
137+ GitProjectRemoteDict = Dict [str , GitRemote ]
138138GitFullRemoteDict = Dict [str , GitRemoteDict ]
139139GitRemotesArgs = Union [None , GitFullRemoteDict , Dict [str , str ]]
140140
141141
142- class GitRepo ( BaseRepo ):
142+ class GitProject ( BaseProject ):
143143 bin_name = "git"
144144 schemes = ("git" , "git+http" , "git+https" , "git+ssh" , "git+git" , "git+file" )
145145
@@ -162,11 +162,11 @@ def __init__(
162162 .. code-block:: python
163163
164164 import os
165- from libvcs.git import GitRepo
165+ from libvcs.git import GitProject
166166
167167 checkout = pathlib.Path(__name__) + '/' + 'my_libvcs'
168168
169- repo = GitRepo (
169+ repo = GitProject (
170170 url="https://github.com/vcs-python/libvcs",
171171 dir=checkout,
172172 remotes={
@@ -177,11 +177,11 @@ def __init__(
177177 .. code-block:: python
178178
179179 import os
180- from libvcs.git import GitRepo
180+ from libvcs.git import GitProject
181181
182182 checkout = pathlib.Path(__name__) + '/' + 'my_libvcs'
183183
184- repo = GitRepo (
184+ repo = GitProject (
185185 url="https://github.com/vcs-python/libvcs",
186186 dir=checkout,
187187 remotes={
@@ -197,10 +197,10 @@ def __init__(
197197 if "tls_verify" not in kwargs :
198198 self .tls_verify = False
199199
200- self ._remotes : GitRepoRemoteDict
200+ self ._remotes : GitProjectRemoteDict
201201
202202 if remotes is None :
203- self ._remotes : GitRepoRemoteDict = {
203+ self ._remotes : GitProjectRemoteDict = {
204204 "origin" : GitRemote (name = "origin" , fetch_url = url , push_url = url )
205205 }
206206 elif isinstance (remotes , dict ):
@@ -225,7 +225,7 @@ def __init__(
225225 fetch_url = url ,
226226 push_url = url ,
227227 )
228- BaseRepo .__init__ (self , url , dir , * args , ** kwargs )
228+ BaseProject .__init__ (self , url , dir , * args , ** kwargs )
229229 self .url = self .chomp_protocol (
230230 (
231231 self ._remotes .get ("origin" )
@@ -594,7 +594,7 @@ def status(self) -> dict:
594594
595595 Examples
596596 --------
597- >>> git_repo = GitRepo (
597+ >>> git_repo = GitProject (
598598 ... url=f'file://{create_git_remote_repo()}',
599599 ... dir=tmp_path
600600 ... )
0 commit comments