We store mergestate records in .hg/merge. This patch adds a method
of storage in changeset extras. This will help in the exchange of
mergestate records to other repos. Also, this can be used by
shelve --unresolved to store the mergestate records.
It uses the storage format supported for hg versions 3.7 or later. For the
time being, I have omitted the storage of the content of the local version
of unresolved files.
What do you think about refactoring the code to write mergestate v2 on disk and use that encoding to achieve this?