shelve: adjust what happens in some `changing_parents` context
It seems like the rest is more about changing tracked_files, so we let start
with moving them out of the `changing_parents` contexts.
--- a/mercurial/shelve.py Mon Feb 13 23:29:30 2023 +0100
+++ b/mercurial/shelve.py Thu Dec 15 06:22:23 2022 +0100
@@ -871,9 +871,9 @@
with repo.ui.configoverride(overrides, b'unshelve'):
with repo.dirstate.changing_parents(repo):
repo.setparents(state.parents[0], repo.nullid)
- newnode, ispartialunshelve = _createunshelvectx(
- ui, repo, shelvectx, basename, interactive, opts
- )
+ newnode, ispartialunshelve = _createunshelvectx(
+ ui, repo, shelvectx, basename, interactive, opts
+ )
if newnode is None:
shelvectx = state.pendingctx
@@ -1070,9 +1070,9 @@
with repo.dirstate.changing_parents(repo):
repo.setparents(tmpwctx.node(), repo.nullid)
- newnode, ispartialunshelve = _createunshelvectx(
- ui, repo, shelvectx, basename, interactive, opts
- )
+ newnode, ispartialunshelve = _createunshelvectx(
+ ui, repo, shelvectx, basename, interactive, opts
+ )
if newnode is None:
shelvectx = tmpwctx