# HG changeset patch # User Pierre-Yves David # Date 2014-11-12 14:57:41 # Node ID 918c77775df6ea2f09b355e1f2bd8dbfb8b237e2 # Parent c2907334276b5cc6c468661ff12dc8a78653b766 transaction: accept a 'location' argument for registertmp This will allow generation of temporary files outside of store. This will be useful for bookmarks. diff --git a/mercurial/transaction.py b/mercurial/transaction.py --- a/mercurial/transaction.py +++ b/mercurial/transaction.py @@ -225,13 +225,13 @@ class transaction(object): 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,