diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -3341,7 +3341,8 @@ ) # checking that newnodes exist because old state files won't have it elif statedata.get(b'newnodes') is not None: - nn = statedata[b'newnodes'] # type: List[bytes] + nn = statedata[b'newnodes'] + assert isinstance(nn, list) # list of bytes nn.append(node) # remove state when we complete successfully