D5389: shelve: drop unnecessary backup of dirstate for phase-based case

2018-12-06 Thread martinvonz (Martin von Zweigbergk)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGd7e44da4dc70: shelve: drop unnecessary backup of dirstate 
for phase-based case (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5389?vs=12729=12749

REVISION DETAIL
  https://phab.mercurial-scm.org/D5389

AFFECTED FILES
  hgext/shelve.py

CHANGE DETAILS

diff --git a/hgext/shelve.py b/hgext/shelve.py
--- a/hgext/shelve.py
+++ b/hgext/shelve.py
@@ -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)
 



To: martinvonz, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5389: shelve: drop unnecessary backup of dirstate for phase-based case

2018-12-05 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5389

AFFECTED FILES
  hgext/shelve.py

CHANGE DETAILS

diff --git a/hgext/shelve.py b/hgext/shelve.py
--- a/hgext/shelve.py
+++ b/hgext/shelve.py
@@ -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)
 



To: martinvonz, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel