def commit_transaction(self, log=None):
        """Commit a transaction, with *log* as the log entry."""
        self.current_transaction['rollback'].pop('log')
        self.current_transaction['rollback'].pop('rollforward')
        self.contents['log'].insert(
            0, log and log or self.current_transaction['log'])
        self.contents['rollback'] = self.current_transaction['rollback']
        self.contents['rollforward'] = None  # We can't roll forward anymore
        self.current_transaction = None
        self._sync_to_disk()
Commit a transaction, with *log* as the log entry.