transaction: clarify the name of 'journal' argument for transaction
authorPierre-Yves David <pierre-yves.david@fb.com>
Fri, 16 Jan 2015 14:54:24 -0800
changeset 23901 13268fde4c4d
parent 23900 5eb3541f907e
child 23902 bfa52f4ecf54
transaction: clarify the name of 'journal' argument for transaction The argument is a string containing the journal name (used as prefix for all other transaction file). This is not the transaction file itself. So we clarify this.
mercurial/transaction.py
--- a/mercurial/transaction.py	Mon Jan 05 12:44:15 2015 -0800
+++ b/mercurial/transaction.py	Fri Jan 16 14:54:24 2015 -0800
@@ -82,7 +82,7 @@
         pass
 
 class transaction(object):
-    def __init__(self, report, opener, vfsmap, journal, after=None,
+    def __init__(self, report, opener, vfsmap, journalname, after=None,
                  createmode=None):
         """Begin a new transaction
 
@@ -104,7 +104,7 @@
         self.after = after
         self.entries = []
         self.map = {}
-        self.journal = journal
+        self.journal = journalname
         self._queue = []
         # a dict of arguments to be passed to hooks
         self.hookargs = {}
@@ -118,7 +118,7 @@
         # (cache is currently unused)
         self._backupentries = []
         self._backupmap = {}
-        self._backupjournal = "%s.backupfiles" % journal
+        self._backupjournal = "%s.backupfiles" % self.journal
         self._backupsfile = opener.open(self._backupjournal, 'w')
         self._backupsfile.write('%d\n' % version)