shelve: drop unnecessary backup of narrowspec
authorMartin von Zweigbergk <martinvonz@google.com>
Wed, 05 Dec 2018 15:37:03 -0800
changeset 41008 e5d37558098a
parent 41007 a06dc62f1c82
child 41009 fcc0a7ac9ebd
shelve: drop unnecessary backup of narrowspec I mechanically added the backup code everywhere in ad24b581e4d9 (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. Differential Revision: https://phab.mercurial-scm.org/D5457
hgext/shelve.py
--- a/hgext/shelve.py	Mon May 07 17:08:17 2018 -0700
+++ b/hgext/shelve.py	Wed Dec 05 15:37:03 2018 -0800
@@ -41,7 +41,6 @@
     lock as lockmod,
     mdiff,
     merge,
-    narrowspec,
     node as nodemod,
     patch,
     phases,
@@ -327,11 +326,8 @@
     '''Abort current transaction for shelve/unshelve, but keep dirstate
     '''
     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):