changeset 40853:d7e44da4dc70

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
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 05 Dec 2018 14:08:01 -0800
parents 1b836cee2d91
children 236af7cfa4c3
files hgext/shelve.py
diffstat 1 files changed, 0 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/shelve.py	Wed Dec 05 14:46:09 2018 -0800
+++ b/hgext/shelve.py	Wed Dec 05 14:08:01 2018 -0800
@@ -446,11 +446,8 @@
 
 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)