def _get_experiment_repo(self, experiment_id): repo = self.experiment_repo path = experiment_path(experiment_id) if repo is None or repo.path != path: self.debug('make new repomanager for {}'.format(path)) repo = GitRepoManager() repo.path = path repo.open_repo(path) self.experiment_repo = repo return repo
def _get_repository(self, repository_identifier, as_current=True): repo = None if as_current: repo = self.current_repository path = repository_path(repository_identifier) if repo is None or repo.path != path: self.debug('make new repomanager for {}'.format(path)) repo = GitRepoManager() repo.path = path repo.open_repo(path) if as_current: self.current_repository = repo return repo