Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 23311:64ab33ffba14
transaction: use the location value when doing backup
We finally use the 'location' value coupled with the 'vfsmap' to restore backup
for the right file.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Fri, 17 Oct 2014 21:04:35 -0700 |
parents | 5bd1f6572db0 |
children | 86c6f06feb04 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Fri Oct 17 20:49:39 2014 -0700 +++ b/mercurial/localrepo.py Fri Oct 17 21:04:35 2014 -0700 @@ -919,7 +919,9 @@ try: if self.svfs.exists("journal"): self.ui.status(_("rolling back interrupted transaction\n")) - transaction.rollback(self.sopener, "journal", + vfsmap = {'': self.sopener, + 'plain': self.opener,} + transaction.rollback(self.sopener, vfsmap, "journal", self.ui.warn) self.invalidate() return True @@ -975,7 +977,8 @@ parents = self.dirstate.parents() self.destroying() - transaction.rollback(self.sopener, 'undo', ui.warn) + vfsmap = {'plain': self.opener} + transaction.rollback(self.sopener, vfsmap, 'undo', ui.warn) if self.vfs.exists('undo.bookmarks'): self.vfs.rename('undo.bookmarks', 'bookmarks') if self.svfs.exists('undo.phaseroots'):