# HG changeset patch # User Martin von Zweigbergk # Date 2018-12-05 22:08:01 # Node ID d7e44da4dc706e1755a02aab7452320a1c4a22d8 # Parent 1b836cee2d9139e566df2e44ca7583557d35d2cf shelve: drop unnecessary backup of dirstate for phase-based case Regular shelve has a hack using an uncommitted transaction that's then aborted at the end of the operation. It preserves the dirstate across the abort, however, by saving a backup copy of it. Phase-based shelve instead commits the transaction, so the hack shouldn't be necessary there. Differential Revision: https://phab.mercurial-scm.org/D5389 diff --git a/hgext/shelve.py b/hgext/shelve.py --- a/hgext/shelve.py +++ b/hgext/shelve.py @@ -446,11 +446,8 @@ def _includeunknownfiles(repo, pats, opt def _finishshelve(repo): if phases.supportinternal(repo): - backupname = 'dirstate.shelve' tr = repo.currenttransaction() - repo.dirstate.savebackup(tr, backupname) tr.close() - repo.dirstate.restorebackup(None, backupname) else: _aborttransaction(repo)