git-project 0.0.33__tar.gz → 0.0.35__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {git_project-0.0.33 → git_project-0.0.35}/PKG-INFO +1 -1
- {git_project-0.0.33 → git_project-0.0.35}/_version.py +2 -2
- {git_project-0.0.33 → git_project-0.0.35}/src/git_project/git.py +5 -5
- {git_project-0.0.33 → git_project-0.0.35}/src/git_project/substitutable.py +0 -1
- {git_project-0.0.33 → git_project-0.0.35}/tests/test_git.py +6 -6
- {git_project-0.0.33 → git_project-0.0.35}/tests/test_project.py +1 -1
- {git_project-0.0.33 → git_project-0.0.35}/.git +0 -0
- {git_project-0.0.33 → git_project-0.0.35}/.gitignore +0 -0
- {git_project-0.0.33 → git_project-0.0.35}/CONTRIBUTORS +0 -0
- {git_project-0.0.33 → git_project-0.0.35}/COPYING +0 -0
- {git_project-0.0.33 → git_project-0.0.35}/MANIFEST.in +0 -0
- {git_project-0.0.33 → git_project-0.0.35}/docs/Makefile +0 -0
- {git_project-0.0.33 → git_project-0.0.35}/docs/authors.rst +0 -0
- {git_project-0.0.33 → git_project-0.0.35}/docs/changelog.rst +0 -0
- {git_project-0.0.33 → git_project-0.0.35}/docs/conf.py +0 -0
- {git_project-0.0.33 → git_project-0.0.35}/docs/index.rst +0 -0
- {git_project-0.0.33 → git_project-0.0.35}/docs/intro.rst +0 -0
- {git_project-0.0.33 → git_project-0.0.35}/docs/license.rst +0 -0
- {git_project-0.0.33 → git_project-0.0.35}/docs/make.bat +0 -0
- {git_project-0.0.33 → git_project-0.0.35}/pyproject.toml +0 -0
- {git_project-0.0.33 → git_project-0.0.35}/requirements.txt +0 -0
- {git_project-0.0.33 → git_project-0.0.35}/src/git_project/__init__.py +0 -0
- {git_project-0.0.33 → git_project-0.0.35}/src/git_project/commandline.py +0 -0
- {git_project-0.0.33 → git_project-0.0.35}/src/git_project/configobj.py +0 -0
- {git_project-0.0.33 → git_project-0.0.35}/src/git_project/exception.py +0 -0
- {git_project-0.0.33 → git_project-0.0.35}/src/git_project/gitproject.py +0 -0
- {git_project-0.0.33 → git_project-0.0.35}/src/git_project/main.py +0 -0
- {git_project-0.0.33 → git_project-0.0.35}/src/git_project/parsermanager.py +0 -0
- {git_project-0.0.33 → git_project-0.0.35}/src/git_project/plugin.py +0 -0
- {git_project-0.0.33 → git_project-0.0.35}/src/git_project/pluginmanager.py +0 -0
- {git_project-0.0.33 → git_project-0.0.35}/src/git_project/project.py +0 -0
- {git_project-0.0.33 → git_project-0.0.35}/src/git_project/runnable.py +0 -0
- {git_project-0.0.33 → git_project-0.0.35}/src/git_project/scopedobj.py +0 -0
- {git_project-0.0.33 → git_project-0.0.35}/src/git_project/shell.py +0 -0
- {git_project-0.0.33 → git_project-0.0.35}/src/git_project/test_support/__init__.py +0 -0
- {git_project-0.0.33 → git_project-0.0.35}/src/git_project/test_support/common.py +0 -0
- {git_project-0.0.33 → git_project-0.0.35}/tests/conftest.py +0 -0
- {git_project-0.0.33 → git_project-0.0.35}/tests/test_confobj.py +0 -0
- {git_project-0.0.33 → git_project-0.0.35}/tests/test_gitproject.py +0 -0
- {git_project-0.0.33 → git_project-0.0.35}/tests/test_main.py +0 -0
- {git_project-0.0.33 → git_project-0.0.35}/tests/test_runnable.py +0 -0
- {git_project-0.0.33 → git_project-0.0.35}/tests/test_scopedobj.py +0 -0
- {git_project-0.0.33 → git_project-0.0.35}/tests/test_substitutable.py +0 -0
|
@@ -378,7 +378,7 @@ class Git(object):
|
|
|
378
378
|
|
|
379
379
|
class RemoteBranchDeleteCallback(pygit2.RemoteCallbacks):
|
|
380
380
|
def __init__(self, ssh_id: str):
|
|
381
|
-
|
|
381
|
+
self.ssh_id = ssh_id
|
|
382
382
|
|
|
383
383
|
"""Check the result of remove branch prune operations."""
|
|
384
384
|
def credentials(self, url, username_from_url, allowed_types):
|
|
@@ -400,7 +400,7 @@ class Git(object):
|
|
|
400
400
|
|
|
401
401
|
class LsRemotesCallbacks(pygit2.RemoteCallbacks):
|
|
402
402
|
def __init__(self, ssh_id: str):
|
|
403
|
-
|
|
403
|
+
self.ssh_id = ssh_id
|
|
404
404
|
|
|
405
405
|
def credentials(self, url, username_from_url, allowed_types):
|
|
406
406
|
if allowed_types & pygit2.enums.CredentialType.SSH_KEY:
|
|
@@ -604,7 +604,7 @@ class Git(object):
|
|
|
604
604
|
|
|
605
605
|
def fetch_remote(self, remote):
|
|
606
606
|
"""Fetch all refspecs from the given remote."""
|
|
607
|
-
callbacks = Git.RemoteCallbacks()
|
|
607
|
+
callbacks = Git.RemoteCallbacks(self.get_ssh_id())
|
|
608
608
|
self._repo.remotes[remote].fetch(callbacks=callbacks)
|
|
609
609
|
|
|
610
610
|
# Info on refs.
|
|
@@ -770,14 +770,14 @@ class Git(object):
|
|
|
770
770
|
result = branch.upstream.branch_name
|
|
771
771
|
return result
|
|
772
772
|
|
|
773
|
-
def clone(self, url, path=None, bare=False):
|
|
773
|
+
def clone(self, url, ssh_id, path=None, bare=False):
|
|
774
774
|
"""Clone a respository at the given url, making a bare clone if specified."""
|
|
775
775
|
parsed_url = urllib.parse.urlparse(url)
|
|
776
776
|
url_path = Path(parsed_url.path).resolve()
|
|
777
777
|
url_name = url_path.name
|
|
778
778
|
target_path = path if path else str(Path.cwd() / url_name)
|
|
779
779
|
|
|
780
|
-
callbacks = Git.RemoteCallbacks()
|
|
780
|
+
callbacks = Git.RemoteCallbacks(ssh_id)
|
|
781
781
|
self._repo = pygit2.clone_repository(url, target_path, bare, callbacks=callbacks)
|
|
782
782
|
self._config = self.Config(self, self._repo.config)
|
|
783
783
|
|
|
@@ -439,7 +439,7 @@ def test_git_clone(reset_directory, remote_repository, tmp_path_factory):
|
|
|
439
439
|
|
|
440
440
|
remote_url = 'file://' + remote_repository.path
|
|
441
441
|
|
|
442
|
-
clone_path = git.clone(remote_url)
|
|
442
|
+
clone_path = git.clone(remote_url, 'id_rsa')
|
|
443
443
|
assert os.path.exists(clone_path)
|
|
444
444
|
|
|
445
445
|
os.chdir(clone_path)
|
|
@@ -454,7 +454,7 @@ def test_git_clone(reset_directory, remote_repository, tmp_path_factory):
|
|
|
454
454
|
|
|
455
455
|
git = git_project.Git()
|
|
456
456
|
|
|
457
|
-
clone_path = git.clone(remote_url, bare=True)
|
|
457
|
+
clone_path = git.clone(remote_url, 'id_rsa', bare=True)
|
|
458
458
|
|
|
459
459
|
assert os.path.exists(clone_path)
|
|
460
460
|
|
|
@@ -480,7 +480,7 @@ def test_git_clone_with_path(reset_directory,
|
|
|
480
480
|
|
|
481
481
|
path = path / 'test-clone'
|
|
482
482
|
|
|
483
|
-
clone_path = git.clone(remote_url, path)
|
|
483
|
+
clone_path = git.clone(remote_url, 'id_rsa', path)
|
|
484
484
|
|
|
485
485
|
assert os.path.exists(clone_path)
|
|
486
486
|
assert clone_path == str(path)
|
|
@@ -878,7 +878,7 @@ def test_git_get_git_common_dir_renamed(reset_directory, local_repository):
|
|
|
878
878
|
|
|
879
879
|
|
|
880
880
|
def test_git_remote_credentials(reset_directory):
|
|
881
|
-
callback = git_project.Git.RemoteCallbacks();
|
|
881
|
+
callback = git_project.Git.RemoteCallbacks(ssh_id='id_rsa');
|
|
882
882
|
|
|
883
883
|
key_result = callback.credentials(
|
|
884
884
|
'ssh:me@my.org/test.git', 'me', pygit2.enums.CredentialType.SSH_KEY
|
|
@@ -892,7 +892,7 @@ def test_git_remote_credentials(reset_directory):
|
|
|
892
892
|
|
|
893
893
|
|
|
894
894
|
def test_git_remote_branch_delete_credentials(reset_directory):
|
|
895
|
-
callback = git_project.Git.RemoteBranchDeleteCallback();
|
|
895
|
+
callback = git_project.Git.RemoteBranchDeleteCallback(ssh_id='id_rsa');
|
|
896
896
|
|
|
897
897
|
key_result = callback.credentials(
|
|
898
898
|
'ssh:me@my.org/test.git', 'me', pygit2.enums.CredentialType.SSH_KEY
|
|
@@ -906,7 +906,7 @@ def test_git_remote_branch_delete_credentials(reset_directory):
|
|
|
906
906
|
|
|
907
907
|
|
|
908
908
|
def test_git_ls_remotes_credentials(reset_directory):
|
|
909
|
-
callback = git_project.Git.LsRemotesCallbacks();
|
|
909
|
+
callback = git_project.Git.LsRemotesCallbacks(ssh_id='id_rsa');
|
|
910
910
|
|
|
911
911
|
key_result = callback.credentials(
|
|
912
912
|
'ssh:me@my.org/test.git', 'me', pygit2.enums.CredentialType.SSH_KEY
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|