def _init_executors(self, to_run):
    executors = {}
    for (stash_rev, item) in to_run.items():
        self.scm.set_ref(EXEC_HEAD, item.rev)
        self.scm.set_ref(EXEC_MERGE, stash_rev)
        self.scm.set_ref(EXEC_BASELINE, item.baseline_rev)
        executor = LocalExecutor(self.scm, self.dvc_dir, name=item.name, branch=item.branch, cache_dir=self.repo.cache.local.cache_dir)
        executors[item.rev] = executor
    for ref in (EXEC_HEAD, EXEC_MERGE, EXEC_BASELINE):
        self.scm.remove_ref(ref)
    return executors
def _init_executors(self, to_run):
    executors = {}
    for (stash_rev, item) in to_run.items():
        self.scm.set_ref(EXEC_HEAD, item.rev)
        self.scm.set_ref(EXEC_MERGE, stash_rev)
        self.scm.set_ref(EXEC_BASELINE, item.baseline_rev)
        executor = LocalExecutor(self.scm, self.dvc_dir, name=item.name, branch=item.branch, cache_dir=self.repo.cache.local.cache_dir)
        executors[item.rev] = executor
    for ref in (EXEC_HEAD, EXEC_MERGE, EXEC_BASELINE):
        self.scm.remove_ref(ref)
    return executors