git-project 0.0.29__tar.gz → 0.0.30__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.29 → git_project-0.0.30}/PKG-INFO +1 -1
- {git_project-0.0.29 → git_project-0.0.30}/_version.py +2 -2
- {git_project-0.0.29 → git_project-0.0.30}/src/git_project/git.py +4 -4
- {git_project-0.0.29 → git_project-0.0.30}/tests/test_git.py +28 -0
- {git_project-0.0.29 → git_project-0.0.30}/.git +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/.gitignore +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/CONTRIBUTORS +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/COPYING +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/MANIFEST.in +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/docs/Makefile +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/docs/authors.rst +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/docs/changelog.rst +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/docs/conf.py +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/docs/index.rst +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/docs/intro.rst +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/docs/license.rst +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/docs/make.bat +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/pyproject.toml +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/requirements.txt +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/src/git_project/__init__.py +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/src/git_project/commandline.py +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/src/git_project/configobj.py +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/src/git_project/exception.py +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/src/git_project/gitproject.py +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/src/git_project/main.py +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/src/git_project/parsermanager.py +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/src/git_project/plugin.py +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/src/git_project/pluginmanager.py +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/src/git_project/project.py +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/src/git_project/runnable.py +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/src/git_project/scopedobj.py +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/src/git_project/shell.py +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/src/git_project/substitutable.py +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/src/git_project/test_support/__init__.py +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/src/git_project/test_support/common.py +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/test.out +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/tests/conftest.py +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/tests/test_confobj.py +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/tests/test_gitproject.py +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/tests/test_main.py +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/tests/test_project.py +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/tests/test_runnable.py +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/tests/test_scopedobj.py +0 -0
- {git_project-0.0.29 → git_project-0.0.30}/tests/test_substitutable.py +0 -0
|
@@ -375,10 +375,10 @@ class Git(object):
|
|
|
375
375
|
class RemoteBranchDeleteCallback(pygit2.RemoteCallbacks):
|
|
376
376
|
"""Check the result of remove branch prune operations."""
|
|
377
377
|
def credentials(self, url, username_from_url, allowed_types):
|
|
378
|
-
if allowed_types & pygit2.
|
|
378
|
+
if allowed_types & pygit2.enums.CredentialType.SSH_KEY:
|
|
379
379
|
return pygit2.Keypair(username_from_url, str(Path.home() / '.ssh' / 'id_rsa.pub'),
|
|
380
380
|
str(Path.home() / '.ssh' / 'id_rsa'), '')
|
|
381
|
-
elif allowed_types & pygit2.
|
|
381
|
+
elif allowed_types & pygit2.enums.CredentialType.USERNAME:
|
|
382
382
|
return pygit2.Username(username_from_url)
|
|
383
383
|
return None
|
|
384
384
|
|
|
@@ -389,10 +389,10 @@ class Git(object):
|
|
|
389
389
|
|
|
390
390
|
class LsRemotesCallbacks(pygit2.RemoteCallbacks):
|
|
391
391
|
def credentials(self, url, username_from_url, allowed_types):
|
|
392
|
-
if allowed_types & pygit2.
|
|
392
|
+
if allowed_types & pygit2.enums.CredentialType.SSH_KEY:
|
|
393
393
|
return pygit2.Keypair(username_from_url, str(Path.home() / '.ssh' / 'id_rsa.pub'),
|
|
394
394
|
str(Path.home() / '.ssh' / 'id_rsa'), '')
|
|
395
|
-
elif allowed_types & pygit2.
|
|
395
|
+
elif allowed_types & pygit2.enums.CredentialType.USERNAME:
|
|
396
396
|
return pygit2.Username(username_from_url)
|
|
397
397
|
return None
|
|
398
398
|
|
|
@@ -889,3 +889,31 @@ def test_git_remote_credentials(reset_directory):
|
|
|
889
889
|
|
|
890
890
|
assert isinstance(key_result, pygit2.Keypair)
|
|
891
891
|
assert isinstance(name_result, pygit2.Username)
|
|
892
|
+
|
|
893
|
+
|
|
894
|
+
def test_git_remote_branch_delete_credentials(reset_directory):
|
|
895
|
+
callback = git_project.Git.RemoteBranchDeleteCallback();
|
|
896
|
+
|
|
897
|
+
key_result = callback.credentials(
|
|
898
|
+
'ssh:me@my.org/test.git', 'me', pygit2.enums.CredentialType.SSH_KEY
|
|
899
|
+
)
|
|
900
|
+
name_result = callback.credentials(
|
|
901
|
+
'ssh:me@my.org/test.git', 'me', pygit2.enums.CredentialType.USERNAME
|
|
902
|
+
)
|
|
903
|
+
|
|
904
|
+
assert isinstance(key_result, pygit2.Keypair)
|
|
905
|
+
assert isinstance(name_result, pygit2.Username)
|
|
906
|
+
|
|
907
|
+
|
|
908
|
+
def test_git_ls_remotes_credentials(reset_directory):
|
|
909
|
+
callback = git_project.Git.LsRemotesCallbacks();
|
|
910
|
+
|
|
911
|
+
key_result = callback.credentials(
|
|
912
|
+
'ssh:me@my.org/test.git', 'me', pygit2.enums.CredentialType.SSH_KEY
|
|
913
|
+
)
|
|
914
|
+
name_result = callback.credentials(
|
|
915
|
+
'ssh:me@my.org/test.git', 'me', pygit2.enums.CredentialType.USERNAME
|
|
916
|
+
)
|
|
917
|
+
|
|
918
|
+
assert isinstance(key_result, pygit2.Keypair)
|
|
919
|
+
assert isinstance(name_result, pygit2.Username)
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|