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 <sokcevic@google.com> Reviewed-by: Josip Sokcevic <sokcevic@google.com> Commit-Queue: Josip Sokcevic <sokcevic@google.com>
diff --git a/subcmds/sync.py b/subcmds/sync.py index 233c9f4..6004e30 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py
@@ -1628,7 +1628,7 @@ errors = [] try: self._ExecuteHelper(opt, args, errors) - except RepoExitError: + except (RepoExitError, RepoChangedException): raise except (KeyboardInterrupt, Exception) as e: raise RepoUnhandledExceptionError(e, aggregate_errors=errors)