D5457: shelve: drop unnecessary backup of narrowspec

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Wed Dec 19 17:59:18 UTC 2018


martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  I mechanically added the backup code everywhere in https://phab.mercurial-scm.org/rHGad24b581e4d982221de2393b9fc7001e99e7fc46
  (narrow: call narrowspec.{save,restore,clear}backup directly,
  2018-08-03), but I can't think of a reason it would be needed in the
  shelve code, so let's drop it.

REPOSITORY
  rHG Mercurial

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

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
@@ -329,9 +329,7 @@
     dirstatebackupname = 'dirstate.shelve'
     narrowspecbackupname = 'narrowspec.shelve'
     repo.dirstate.savebackup(tr, dirstatebackupname)
-    narrowspec.savebackup(repo, narrowspecbackupname)
     tr.abort()
-    narrowspec.restorebackup(repo, narrowspecbackupname)
     repo.dirstate.restorebackup(None, dirstatebackupname)
 
 def getshelvename(repo, parent, opts):



To: martinvonz, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list