mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-11 15:15:18 +02:00
update test_incremental_dev.py
This commit is contained in:
parent
7a5485bc8b
commit
a9e0b67b71
1 changed files with 4 additions and 4 deletions
|
|
@ -278,11 +278,11 @@ def check_or_create_base_tag(project_path):
|
|||
if has_base_tag:
|
||||
logger.info("Base tag exists")
|
||||
# Switch to the 'base' branch if it exists
|
||||
stash_cmd = ["git", "stash"]
|
||||
switch_to_base_branch_cmd = ["git", "checkout", "-f", "base"]
|
||||
try:
|
||||
subprocess.run(stash_cmd, check=True)
|
||||
subprocess.run(switch_to_base_branch_cmd, check=True)
|
||||
status = subprocess.run(["git", "status", "-s"], capture_output=True, text=True).stdout.strip()
|
||||
if status:
|
||||
subprocess.run(["git", "clean", "-df"])
|
||||
subprocess.run(["git", "checkout", "-f", "base"], check=True)
|
||||
logger.info("Switched to base branch")
|
||||
except Exception as e:
|
||||
logger.error("Failed to switch to base branch")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue