log_data['run_extra_targets'] = job['run_extra_targets']
            log_data['test_locales'] = job['test_locales']

            log_data['start_time'] = int(time.time())
            current_time = time.strftime("%Y-%m-%d_%H%M%S", time.localtime(log_data['start_time']))
            log_data['start_time_local'] = current_time
            log_data['is_buildfarm'] = True


            # create a repository instance
            repository = Repository(config, database, log_data['repository'], config.get('cache-dir'))
            # do not update the repository again, assume that all necessary updates were fetched during job creation
            repository.handle_update(False, log_data)
            # from here on a local copy of the repository is available

            log_data['repository_type'] = repository.identify_repository_type(repository.full_path)

            logging.info("repository: " + log_data['repository'])
            if (log_data['is_head'] == 1):
                logging.info("building branch/revision: " + log_data['branch'] + '/' + log_data['revision'] + ' (HEAD)')
            else:
                logging.info("building branch/revision: " + log_data['branch'] + '/' + log_data['revision'])


            build_dir_name = str(current_time).replace('-', '') + '_bf_' + log_data['branch']

            # the config module ensures that all necessary --run-* options are set
            build_dir = repository.copy_repository(build_dir_name, log_data['branch'], log_data['revision'])

            build = Build(config, repository, build_dir)