diff -r c166b212bdee -r 7a8bfc05b691 mercurial/shelve.py --- a/mercurial/shelve.py Wed Jan 25 18:46:20 2023 +0100 +++ b/mercurial/shelve.py Wed Jan 25 19:12:31 2023 +0100 @@ -637,7 +637,7 @@ ui.status(_(b'shelved as %s\n') % name) if opts[b'keep']: - with repo.dirstate.parentchange(repo): + with repo.dirstate.changing_parents(repo): scmutil.movedirstate(repo, parent, match) else: hg.update(repo, parent.node()) @@ -862,14 +862,14 @@ shelvectx = repo[state.parents[1]] pendingctx = state.pendingctx - with repo.dirstate.parentchange(repo): + with repo.dirstate.changing_parents(repo): repo.setparents(state.pendingctx.node(), repo.nullid) repo.dirstate.write(repo.currenttransaction()) targetphase = _target_phase(repo) overrides = {(b'phases', b'new-commit'): targetphase} with repo.ui.configoverride(overrides, b'unshelve'): - with repo.dirstate.parentchange(repo): + with repo.dirstate.changing_parents(repo): repo.setparents(state.parents[0], repo.nullid) newnode, ispartialunshelve = _createunshelvectx( ui, repo, shelvectx, basename, interactive, opts @@ -1068,7 +1068,7 @@ ) raise error.ConflictResolutionRequired(b'unshelve') - with repo.dirstate.parentchange(repo): + with repo.dirstate.changing_parents(repo): repo.setparents(tmpwctx.node(), repo.nullid) newnode, ispartialunshelve = _createunshelvectx( ui, repo, shelvectx, basename, interactive, opts