diff mercurial/localrepo.py @ 23310:5bd1f6572db0

transaction: pass a vfs map to the transaction The goal is to allow access to file outside ofthe store directory from the transaction. The obvious target are the `bookmarks` file. But we can envision usage for cache too. We keep passing a main opener explicitly because a lot of code rely on this default opener. The main opener (operating on store) is using an empty key ''.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 17 Oct 2014 20:49:39 -0700
parents 1c11393d5dfb
children 64ab33ffba14
line wrap: on
line diff
--- a/mercurial/localrepo.py	Wed Nov 05 01:52:46 2014 +0000
+++ b/mercurial/localrepo.py	Fri Oct 17 20:49:39 2014 -0700
@@ -882,7 +882,8 @@
         self._writejournal(desc)
         renames = [(vfs, x, undoname(x)) for vfs, x in self._journalfiles()]
         rp = report and report or self.ui.warn
-        tr = transaction.transaction(rp, self.sopener,
+        vfsmap = {'plain': self.opener} # root of .hg/
+        tr = transaction.transaction(rp, self.sopener, vfsmap,
                                      "journal",
                                      aftertrans(renames),
                                      self.store.createmode,