summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosip Sokcevic <sokcevic@chromium.org>2025-01-08 18:31:46 +0000
committerJosip Sokcevic <sokcevic@chromium.org>2025-01-08 13:36:52 -0800
commitd93fe60e893435d9eb3a08dd59d92def40798e95 (patch)
treeebfa14bd392285d1fb207401082c81f9aef005eb
parent61224d01fa29bcf54dd6d521e09e09a8c0da77fe (diff)
downloadgit-repo-d93fe60e893435d9eb3a08dd59d92def40798e95.tar.gz
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>
-rw-r--r--subcmds/sync.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py
index 175748a6..3f1faa9f 100644
--- a/subcmds/sync.py
+++ b/subcmds/sync.py
@@ -1058,6 +1058,8 @@ later is required to fix a server side protocol bug.
1058 verbose=verbose, 1058 verbose=verbose,
1059 ) 1059 )
1060 success = syncbuf.Finish() 1060 success = syncbuf.Finish()
1061 except KeyboardInterrupt:
1062 logger.error("Keyboard interrupt while processing %s", project.name)
1061 except GitError as e: 1063 except GitError as e:
1062 logger.error( 1064 logger.error(
1063 "error.GitError: Cannot checkout %s: %s", project.name, e 1065 "error.GitError: Cannot checkout %s: %s", project.name, e