D6478: shelve: first prototype of storing unresolved changes

navaneeth.suresh (Navaneeth Suresh) phabricator at mercurial-scm.org
Mon Jun 10 15:50:03 EDT 2019


navaneeth.suresh added inline comments.

INLINE COMMENTS

> pulkit wrote in shelve.py:605
> can we look into changeset extras here to decide whether this is an unresolved shelve or not here?
> 
> It will be nice to remove any details of our storage layer and only keep them to functions which stores and restores merge states.

i don't think we can get `shelvectx` here. i tried the following code but, that failed to work(got the error: node not found). the shelve changesets can't be used during other than unshelve i guess (reference from `_unshelverestorecommit()`).

  snode = shelvedfile(repo, sname, 'shelve').readinfo()['node']
  shelvectx = repo[snode]

also, i can't find any global variable declarations to make the extra parsing one time only. one workaround should be adding a `unresolved-merge: True` to the `shelvedfile`. but, it uses `scmutil.simplekeyvaluefile()` to write only a key-value pair which is its node id.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D6478

To: navaneeth.suresh, #hg-reviewers
Cc: pulkit, mercurial-devel


More information about the Mercurial-devel mailing list