Found a regression with the fix, but we'll get reworked version in for 5.0.2 (which is going out tonight/tomorrow).
force_text()/force_str() will assume an encoding if the object is a bytes or converts to a bytes. The problem with this is that we can't assume at this particular stage. We instead need to use the configured encoding list. This matters particularly for people working with some Chinese encodings. convert_to_unicode() is responsible for trying the configured encodings, but since the fix was passing in the forced-encode, it never got a chance.
That's not a problem for Revision instances, but is for raw revisions. Probably not even a problem there (revisions are generally effectively ASCII in most SCMs), but it's more of a problem when forcing the encoding for filenames (which are completely at the whim of the developers committing code).
Making a change to specifically check for and cast the Revision before storing it instead, which should be a bit safer.