D5505: narrow: include working copy narrowspec in transaction journal

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Wed Jan 16 02:49:50 EST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG3b35ebdb9f8c: narrow: include working copy narrowspec in transaction journal (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5505?vs=13145&id=13238

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

AFFECTED FILES
  mercurial/localrepo.py

CHANGE DETAILS

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -1836,6 +1836,7 @@
                 # discard all changes (including ones already written
                 # out) in this transaction
                 narrowspec.restorebackup(self, 'journal.narrowspec')
+                narrowspec.restorewcbackup(self, 'journal.narrowspec.dirstate')
                 repo.dirstate.restorebackup(None, 'journal.dirstate')
 
                 repo.invalidate(clearfilecache=True)
@@ -1913,6 +1914,7 @@
     def _journalfiles(self):
         return ((self.svfs, 'journal'),
                 (self.svfs, 'journal.narrowspec'),
+                (self.vfs, 'journal.narrowspec.dirstate'),
                 (self.vfs, 'journal.dirstate'),
                 (self.vfs, 'journal.branch'),
                 (self.vfs, 'journal.desc'),
@@ -1925,6 +1927,7 @@
     @unfilteredmethod
     def _writejournal(self, desc):
         self.dirstate.savebackup(None, 'journal.dirstate')
+        narrowspec.savewcbackup(self, 'journal.narrowspec.dirstate')
         narrowspec.savebackup(self, 'journal.narrowspec')
         self.vfs.write("journal.branch",
                           encoding.fromlocal(self.dirstate.branch()))
@@ -2014,6 +2017,7 @@
             dsguard.close()
 
             narrowspec.restorebackup(self, 'undo.narrowspec')
+            narrowspec.restorewcbackup(self, 'undo.narrowspec.dirstate')
             self.dirstate.restorebackup(None, 'undo.dirstate')
             try:
                 branch = self.vfs.read('undo.branch')



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


More information about the Mercurial-devel mailing list