mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-04-28 18:36:22 +02:00
Update prompt and fix up some bug
This commit is contained in:
parent
0168c99323
commit
e3cd1a2cc1
9 changed files with 35 additions and 60 deletions
|
|
@ -189,7 +189,7 @@ class GitRepository:
|
|||
return self._dependency
|
||||
|
||||
def rename_root(self, new_dir_name):
|
||||
"""Rename/Copy the root directory of the Git repository.
|
||||
"""Rename the root directory of the Git repository.
|
||||
|
||||
:param new_dir_name: The new name for the root directory.
|
||||
"""
|
||||
|
|
@ -200,15 +200,10 @@ class GitRepository:
|
|||
logger.info(f"Delete directory {str(new_path)}")
|
||||
shutil.rmtree(new_path)
|
||||
try:
|
||||
shutil.copytree(src=str(self.workdir), dst=str(new_path))
|
||||
shutil.move(src=str(self.workdir), dst=str(new_path))
|
||||
except Exception as e:
|
||||
logger.warning(f"Copy {str(self.workdir)} to {str(new_path)} error: {e}")
|
||||
logger.info(f"Copy directory {str(self.workdir)} to {str(new_path)}")
|
||||
# try:
|
||||
# shutil.move(src=str(self.workdir), dst=str(new_path))
|
||||
# except Exception as e:
|
||||
# logger.warning(f"Move {str(self.workdir)} to {str(new_path)} error: {e}")
|
||||
# logger.info(f"Rename directory {str(self.workdir)} to {str(new_path)}")
|
||||
logger.warning(f"Move {str(self.workdir)} to {str(new_path)} error: {e}")
|
||||
logger.info(f"Rename directory {str(self.workdir)} to {str(new_path)}")
|
||||
self._repository = Repo(new_path)
|
||||
self._gitignore_rules = parse_gitignore(full_path=str(new_path / ".gitignore"))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue