コード例 #1
0
ファイル: diff.py プロジェクト: zang3tsu/dvc
def _filter_missing(repo, paths):
    repo_tree = RepoTree(repo, stream=True)
    for path in paths:
        metadata = repo_tree.metadata(path)
        if metadata.is_dvc:
            out = metadata.outs[0]
            if out.status()[str(out)] == "not in cache":
                yield path
コード例 #2
0
ファイル: diff.py プロジェクト: hitman56/dvc
def _filter_missing(repo, paths):
    repo_tree = RepoTree(repo, stream=True)
    for path in paths:
        try:
            metadata = repo_tree.metadata(path)
            if metadata.is_dvc:
                out = metadata.outs[0]
                if out.status().get(str(out)) == "not in cache":
                    yield path
        except FileNotFoundError:
            pass
コード例 #3
0
ファイル: diff.py プロジェクト: hitman56/dvc
def _targets_to_path_infos(repo, targets):
    path_infos = []
    missing = []

    repo_tree = RepoTree(repo, stream=True)

    for target in targets:
        if repo_tree.exists(target):
            path_infos.append(repo_tree.metadata(target).path_info)
        else:
            missing.append(target)

    return path_infos, missing