changeset 23354:918c77775df6

transaction: accept a 'location' argument for registertmp This will allow generation of temporary files outside of store. This will be useful for bookmarks.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 12 Nov 2014 14:57:41 +0000
parents c2907334276b
children 7faa55c20b0e
files mercurial/transaction.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/transaction.py	Tue Nov 18 23:51:58 2014 -0500
+++ b/mercurial/transaction.py	Wed Nov 12 14:57:41 2014 +0000
@@ -225,13 +225,13 @@
         self._backupsfile.flush()
 
     @active
-    def registertmp(self, tmpfile):
+    def registertmp(self, tmpfile, location=''):
         """register a temporary transaction file
 
         Such file will be delete when the transaction exit (on both failure and
         success).
         """
-        self._addbackupentry(('', '', tmpfile, False))
+        self._addbackupentry((location, '', tmpfile, False))
 
     @active
     def addfilegenerator(self, genid, filenames, genfunc, order=0,