# HG changeset patch # User David Ignjić # Date 2020-06-12 16:47:30 # Node ID 6c13c599d43dce24ab795cdc6395d8d2f2a74a1c # Parent 84b3d6248a80036457c8c8cd2e9917648e5dc2fc hg: fix crash on displaying bookmarks - add lost hex conversion when computing bookmark property The crash was seen for example when using "Switch To" with bookmarks. The problem was introduced with py3 conversion in e7dbe089e10d. diff --git a/kallithea/lib/vcs/backends/hg/repository.py b/kallithea/lib/vcs/backends/hg/repository.py --- a/kallithea/lib/vcs/backends/hg/repository.py +++ b/kallithea/lib/vcs/backends/hg/repository.py @@ -230,7 +230,7 @@ class MercurialRepository(BaseRepository return {} return OrderedDict(sorted( - ((safe_str(n), ascii_str(h)) for n, h in self._repo._bookmarks.items()), + ((safe_str(n), ascii_str(mercurial.node.hex(h))) for n, h in self._repo._bookmarks.items()), reverse=True, key=lambda x: x[0], # sort by name ))