diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
index bfa52f4ecf541fd76d057c6b849506223dd55648_bWVyY3VyaWFsL2xvY2FscmVwby5weQ==..426607be9c6960588b66e24548dd3cdc8c69d18c_bWVyY3VyaWFsL2xvY2FscmVwby5weQ== 100644
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -912,6 +912,7 @@
         vfsmap = {'plain': self.vfs} # root of .hg/
         tr = transaction.transaction(rp, self.svfs, vfsmap,
                                      "journal",
+                                     "undo",
                                      aftertrans(renames),
                                      self.store.createmode)
         # note: writing the fncache only during finalize mean that the file is
diff --git a/mercurial/transaction.py b/mercurial/transaction.py
index bfa52f4ecf541fd76d057c6b849506223dd55648_bWVyY3VyaWFsL3RyYW5zYWN0aW9uLnB5..426607be9c6960588b66e24548dd3cdc8c69d18c_bWVyY3VyaWFsL3RyYW5zYWN0aW9uLnB5 100644
--- a/mercurial/transaction.py
+++ b/mercurial/transaction.py
@@ -82,8 +82,8 @@
         pass
 
 class transaction(object):
-    def __init__(self, report, opener, vfsmap, journalname, after=None,
-                 createmode=None):
+    def __init__(self, report, opener, vfsmap, journalname, undoname=None,
+                 after=None, createmode=None):
         """Begin a new transaction
 
         Begins a new transaction that allows rolling back writes in the event of
@@ -105,6 +105,7 @@
         self.entries = []
         self.map = {}
         self.journal = journalname
+        self.undoname = undoname
         self._queue = []
         # a dict of arguments to be passed to hooks
         self.hookargs = {}