Page MenuHomePhabricator

shelve: add method for storing mergestate in changeset extras
AbandonedPublic

Authored by navaneeth.suresh on Aug 17 2019, 4:38 PM.

Details

Reviewers
None
Group Reviewers
hg-reviewers
Summary

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.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

pulkit added a subscriber: pulkit.Aug 19 2019, 11:06 AM
pulkit added inline comments.
mercurial/shelve.py
416

What do you think about refactoring the code to write mergestate v2 on disk and use that encoding to achieve this?

mercurial/shelve.py
416

i feel like the current approach is more simpler and easy to understand.

pulkit added inline comments.Sep 12 2019, 1:46 AM
mercurial/shelve.py
416

It will be nice to use only way to encode mergestates at all the places.

mercurial/shelve.py
416

Done and created D6966. Abandoning this.