Mercurial > public > mercurial-scm > hg-stable
comparison 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 |
comparison
equal
deleted
inserted
replaced
23309:7eb520f5efe4 | 23310:5bd1f6572db0 |
---|---|
880 self.store.write(self._transref()) | 880 self.store.write(self._transref()) |
881 | 881 |
882 self._writejournal(desc) | 882 self._writejournal(desc) |
883 renames = [(vfs, x, undoname(x)) for vfs, x in self._journalfiles()] | 883 renames = [(vfs, x, undoname(x)) for vfs, x in self._journalfiles()] |
884 rp = report and report or self.ui.warn | 884 rp = report and report or self.ui.warn |
885 tr = transaction.transaction(rp, self.sopener, | 885 vfsmap = {'plain': self.opener} # root of .hg/ |
886 tr = transaction.transaction(rp, self.sopener, vfsmap, | |
886 "journal", | 887 "journal", |
887 aftertrans(renames), | 888 aftertrans(renames), |
888 self.store.createmode, | 889 self.store.createmode, |
889 onclose) | 890 onclose) |
890 self._transref = weakref.ref(tr) | 891 self._transref = weakref.ref(tr) |