transaction: no longer explicitly cache bookmarks
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 23 Feb 2023 04:53:34 +0100
changeset 50233 8fb391363aad
parent 50232 ab806355fccb
child 50234 11e6eee4b063
transaction: no longer explicitly cache bookmarks The transaction file generation is already dealing with the backup for this. So, no need to duplicate such backup.
mercurial/localrepo.py
tests/test-fncache.t
tests/test-hardlinks.t
tests/test-inherit-mode.t
--- a/mercurial/localrepo.py	Wed Feb 22 18:58:02 2023 +0100
+++ b/mercurial/localrepo.py	Thu Feb 23 04:53:34 2023 +0100
@@ -2687,7 +2687,6 @@
             (self.svfs, b'journal'),
             (self.vfs, b'journal.branch'),
             (self.vfs, b'journal.desc'),
-            (bookmarks.bookmarksvfs(self), b'journal.bookmarks'),
         )
 
     def undofiles(self):
@@ -2699,10 +2698,6 @@
             b"journal.branch", encoding.fromlocal(self.dirstate.branch())
         )
         self.vfs.write(b"journal.desc", b"%d\n%s\n" % (len(self), desc))
-        bookmarksvfs = bookmarks.bookmarksvfs(self)
-        bookmarksvfs.write(
-            b"journal.bookmarks", bookmarksvfs.tryread(b"bookmarks")
-        )
 
     def recover(self):
         with self.lock():
@@ -2791,11 +2786,6 @@
             checkambigfiles=_cachedfiles,
             skip_journal_pattern=skip_journal_pattern,
         )
-        bookmarksvfs = bookmarks.bookmarksvfs(self)
-        if bookmarksvfs.exists(b'undo.bookmarks'):
-            bookmarksvfs.rename(
-                b'undo.bookmarks', b'bookmarks', checkambig=True
-            )
         self.invalidate()
         self.dirstate.invalidate()
 
--- a/tests/test-fncache.t	Wed Feb 22 18:58:02 2023 +0100
+++ b/tests/test-fncache.t	Thu Feb 23 04:53:34 2023 +0100
@@ -104,7 +104,6 @@
   .hg/requires
   .hg/undo
   .hg/undo.backupfiles
-  .hg/undo.bookmarks
   .hg/undo.branch
   .hg/undo.desc
   .hg/wcache
@@ -143,7 +142,6 @@
   .hg/store/requires
   .hg/store/undo
   .hg/store/undo.backupfiles
-  .hg/undo.bookmarks
   .hg/undo.branch
   .hg/undo.desc
   .hg/wcache
--- a/tests/test-hardlinks.t	Wed Feb 22 18:58:02 2023 +0100
+++ b/tests/test-hardlinks.t	Thu Feb 23 04:53:34 2023 +0100
@@ -257,7 +257,6 @@
   2 r4/.hg/store/undo.backup.phaseroots
   2 r4/.hg/store/undo.backupfiles
   2 r4/\.hg/undo\.backup\.dirstate (re)
-  2 r4/.hg/undo.bookmarks
   2 r4/.hg/undo.branch
   2 r4/.hg/undo.desc
   2 r4/.hg/wcache/checkisexec (execbit !)
@@ -313,7 +312,6 @@
   2 r4/.hg/store/undo.backup.phaseroots
   2 r4/.hg/store/undo.backupfiles
   2 r4/\.hg/undo\.backup\.dirstate (re)
-  2 r4/.hg/undo.bookmarks
   2 r4/.hg/undo.branch
   2 r4/.hg/undo.desc
   2 r4/.hg/wcache/checkisexec (execbit !)
--- a/tests/test-inherit-mode.t	Wed Feb 22 18:58:02 2023 +0100
+++ b/tests/test-inherit-mode.t	Thu Feb 23 04:53:34 2023 +0100
@@ -94,7 +94,6 @@
   00600 ./.hg/store/requires
   00660 ./.hg/store/undo
   00660 ./.hg/store/undo.backupfiles
-  00660 ./.hg/undo.bookmarks
   00660 ./.hg/undo.branch
   00660 ./.hg/undo.desc
   00770 ./.hg/wcache/
@@ -152,7 +151,6 @@
   00660 ../push/.hg/store/requires
   00660 ../push/.hg/store/undo
   00660 ../push/.hg/store/undo.backupfiles
-  00660 ../push/.hg/undo.bookmarks
   00660 ../push/.hg/undo.branch
   00660 ../push/.hg/undo.desc
   00770 ../push/.hg/wcache/