mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2025-12-16 10:02:28 +08:00
fixed: Removed the possibility of locking by opening the git repo.
https://github.com/Comfy-Org/ComfyUI-Manager/issues/1717
This commit is contained in:
parent
821fded09d
commit
27bfc539f7
@ -43,7 +43,7 @@ import manager_downloader
|
||||
from node_package import InstalledNodePackage
|
||||
|
||||
|
||||
version_code = [3, 31, 9]
|
||||
version_code = [3, 31, 10]
|
||||
version_str = f"V{version_code[0]}.{version_code[1]}" + (f'.{version_code[2]}' if len(version_code) > 2 else '')
|
||||
|
||||
|
||||
@ -1320,8 +1320,7 @@ class UnifiedManager:
|
||||
return result.fail(f'Path not found: {repo_path}')
|
||||
|
||||
# version check
|
||||
repo = git.Repo(repo_path)
|
||||
|
||||
with git.Repo(repo_path) as repo:
|
||||
if repo.head.is_detached:
|
||||
if not switch_to_default_branch(repo):
|
||||
return result.fail(f"Failed to switch to default branch: {repo_path}")
|
||||
@ -2640,22 +2639,8 @@ async def get_current_snapshot(custom_nodes_only = False):
|
||||
|
||||
cnr_custom_nodes[info['id']] = info['ver']
|
||||
else:
|
||||
repo = git.Repo(fullpath)
|
||||
|
||||
if repo.head.is_detached:
|
||||
remote_name = get_remote_name(repo)
|
||||
else:
|
||||
current_branch = repo.active_branch
|
||||
|
||||
if current_branch.tracking_branch() is None:
|
||||
remote_name = get_remote_name(repo)
|
||||
else:
|
||||
remote_name = current_branch.tracking_branch().remote_name
|
||||
|
||||
commit_hash = repo.head.commit.hexsha
|
||||
|
||||
url = repo.remotes[remote_name].url
|
||||
|
||||
commit_hash = git_utils.get_commit_hash(fullpath)
|
||||
url = git_utils.git_url(fullpath)
|
||||
git_custom_nodes[url] = dict(hash=commit_hash, disabled=is_disabled)
|
||||
except:
|
||||
print(f"Failed to extract snapshots for the custom node '{path}'.")
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
[project]
|
||||
name = "comfyui-manager"
|
||||
description = "ComfyUI-Manager provides features to install and manage custom nodes for ComfyUI, as well as various functionalities to assist with ComfyUI."
|
||||
version = "3.31.9"
|
||||
version = "3.31.10"
|
||||
license = { file = "LICENSE.txt" }
|
||||
dependencies = ["GitPython", "PyGithub", "matrix-client==0.4.0", "transformers", "huggingface-hub>0.20", "typer", "rich", "typing-extensions", "toml", "uv", "chardet"]
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user