obsolete: store user name and note in UTF-8 (issue5754) (BC)
Before, user names were stored in local encoding and transferred across repositories, which made it impossible to restore non-ASCII user names on different platforms. This patch fixes new markers to be encoded in UTF-8 and decoded back to local encoding when displaying. Existing markers are unfixable so they may result in mojibake. I don't like the API that requires metadata dict to be UTF-8 encoded, which is a source of bugs, but there's no abstraction layer to process the encoding thingy efficiently. So we apply the same rule as extras dict to obsstore metadata.
Showing
- mercurial/cmdutil.py 1 addition, 1 deletionmercurial/cmdutil.py
- mercurial/debugcommands.py 1 addition, 1 deletionmercurial/debugcommands.py
- mercurial/obsolete.py 6 additions, 7 deletionsmercurial/obsolete.py
- mercurial/obsutil.py 3 additions, 1 deletionmercurial/obsutil.py
- tests/test-obsmarker-template.t 58 additions, 0 deletionstests/test-obsmarker-template.t
Loading
Please register or sign in to comment