sync (#656)
This commit is contained in:
		
							parent
							
								
									132afcc2a2
								
							
						
					
					
						commit
						cac8af0928
					
				@ -22,7 +22,8 @@ def get_empty_folder(path):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
comfy_repo = "https://github.com/comfyanonymous/ComfyUI"
 | 
					comfy_repo = "https://github.com/comfyanonymous/ComfyUI"
 | 
				
			||||||
comfy_commit_hash = "8cc75c64ff7188ce72cd4ba595119586e425c09f"
 | 
					comfy_commit_hash = None
 | 
				
			||||||
 | 
					
 | 
				
			||||||
comfy_temp_path = get_empty_folder(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'backend', 'comfy_temp'))
 | 
					comfy_temp_path = get_empty_folder(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'backend', 'comfy_temp'))
 | 
				
			||||||
comfy_core_path = get_empty_folder(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'backend', 'headless'))
 | 
					comfy_core_path = get_empty_folder(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'backend', 'headless'))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -52,14 +52,12 @@ def git_clone(url, dir, name, hash=None):
 | 
				
			|||||||
            repo = pygit2.clone_repository(url, dir)
 | 
					            repo = pygit2.clone_repository(url, dir)
 | 
				
			||||||
            print(f'{name} cloned from {url}.')
 | 
					            print(f'{name} cloned from {url}.')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if hash is not None:
 | 
				
			||||||
            remote = repo.remotes['origin']
 | 
					            remote = repo.remotes['origin']
 | 
				
			||||||
            remote.fetch()
 | 
					            remote.fetch()
 | 
				
			||||||
 | 
					 | 
				
			||||||
            commit = repo.get(hash)
 | 
					            commit = repo.get(hash)
 | 
				
			||||||
 | 
					 | 
				
			||||||
            repo.checkout_tree(commit, strategy=pygit2.GIT_CHECKOUT_FORCE)
 | 
					            repo.checkout_tree(commit, strategy=pygit2.GIT_CHECKOUT_FORCE)
 | 
				
			||||||
            repo.set_head(commit.id)
 | 
					            repo.set_head(commit.id)
 | 
				
			||||||
 | 
					 | 
				
			||||||
            print(f'{name} checkout finished for {hash}.')
 | 
					            print(f'{name} checkout finished for {hash}.')
 | 
				
			||||||
    except Exception as e:
 | 
					    except Exception as e:
 | 
				
			||||||
        print(f'Git clone failed for {name}: {str(e)}')
 | 
					        print(f'Git clone failed for {name}: {str(e)}')
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user