mercurial/obsutil.py
changeset 51815 460e80488cf0
parent 51703 ca7bde5dbafb
child 51863 f4733654f144
--- a/mercurial/obsutil.py	Tue Aug 20 17:46:17 2024 -0400
+++ b/mercurial/obsutil.py	Tue Aug 20 18:30:47 2024 -0400
@@ -947,7 +947,7 @@
 }
 
 
-def _getfilteredreason(repo, changeid, ctx):
+def _getfilteredreason(repo, changeid, ctx) -> bytes:
     """return a human-friendly string on why a obsolete changeset is hidden"""
     successors = successorssets(repo, ctx.node())
     fate = _getobsfate(successors)
@@ -974,6 +974,8 @@
 
             args = (changeid, firstsuccessors, remainingnumber)
             return filteredmsgtable[b'superseded_split_several'] % args
+    else:
+        raise error.ProgrammingError("unhandled fate: %r" % fate)
 
 
 def divergentsets(repo, ctx):