diff -r c1b603cdc95a -r 5c8230ca37f2 mercurial/shelve.py --- a/mercurial/shelve.py Mon Sep 21 09:57:29 2020 -0700 +++ b/mercurial/shelve.py Mon Sep 21 11:53:44 2020 -0700 @@ -839,7 +839,7 @@ state.nodestoremove.append(newnode) shelvectx = repo[newnode] - hg.updaterepo(repo, pendingctx.node(), overwrite=False) + merge.update(pendingctx) mergefiles(ui, repo, state.wctx, shelvectx) restorebranch(ui, repo, state.branchtorestore) @@ -1031,7 +1031,7 @@ ui.status(msg) else: shelvectx = repo[newnode] - hg.updaterepo(repo, tmpwctx.node(), False) + merge.update(tmpwctx) return shelvectx, ispartialunshelve