sync: Handle KeyboardInterrupt during checkout

KeyboardInterrupt is handled during NetworkHalf. This patch handles
KeyboardInterrupt during LocalHalf.

Bug: b/372069163
Change-Id: I26847f7ca3cdf1fe57b265b4f6b18cc8102d2921
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/447401
Tested-by: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
This commit is contained in:
Josip Sokcevic 2025-01-08 18:31:46 +00:00
parent 61224d01fa
commit d93fe60e89

View File

@ -1058,6 +1058,8 @@ later is required to fix a server side protocol bug.
verbose=verbose, verbose=verbose,
) )
success = syncbuf.Finish() success = syncbuf.Finish()
except KeyboardInterrupt:
logger.error("Keyboard interrupt while processing %s", project.name)
except GitError as e: except GitError as e:
logger.error( logger.error(
"error.GitError: Cannot checkout %s: %s", project.name, e "error.GitError: Cannot checkout %s: %s", project.name, e