Commit 71ae7899 authored by Laurent Peuch's avatar Laurent Peuch
Browse files

fix(core): handle rare case where the repository is so broken than 'hg up' fails

parent 73226eb63be0
......@@ -423,10 +423,19 @@ class Command:
cube, repo, root_files, branches, other_args
)
while True:
repo.run_command(
'hg up -C -r "last(public() and branch(default))"',
capture_output=True,
)
try:
repo.run_command(
'hg up -C -r "last(public() and branch(default))"',
capture_output=True,
)
except Exception:
import traceback
traceback.print_exc()
logger.error(
"failed to 'hg up', the repository is probably broken, skip it"
)
return
try:
# {"branch_name": ..., "commit_message": ...}
logger.info(f"run modification command for {self}")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment