From 26fa3180fbe2380ff20eb94171074d833b210b45 Mon Sep 17 00:00:00 2001 From: Jason Chang Date: Mon, 5 Feb 2024 15:15:20 -0800 Subject: [PATCH] sync: ensure RepoChangedException propagated Prior to this change RepoChangedException would be caught and re-rasied as a different exception. This would prevent RepoChangedException handler from running in main.py Bug: b/323232806 Change-Id: I9055ff95d439d6ff225206c5bf1755cc718bcfcc Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/407144 Tested-by: Josip Sokcevic Reviewed-by: Josip Sokcevic Commit-Queue: Josip Sokcevic --- subcmds/sync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subcmds/sync.py b/subcmds/sync.py index 233c9f40..6004e306 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py @@ -1628,7 +1628,7 @@ later is required to fix a server side protocol bug. errors = [] try: self._ExecuteHelper(opt, args, errors) - except RepoExitError: + except (RepoExitError, RepoChangedException): raise except (KeyboardInterrupt, Exception) as e: raise RepoUnhandledExceptionError(e, aggregate_errors=errors)