mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-25 23:09:49 +01:00
data status: fix for scmrepo 0.1.0
This commit is contained in:
committed by
Ruslan Kuprieiev
parent
6cada6dc12
commit
76e7c76ae5
@@ -153,6 +153,8 @@ def _git_info(scm: "Base", untracked_files: str = "all") -> GitInfo:
|
||||
empty_repo = False
|
||||
|
||||
staged, unstaged, untracked = scm.status(untracked_files=untracked_files)
|
||||
if os.name == "nt":
|
||||
untracked = [posixpath_to_os_path(path) for path in untracked]
|
||||
# NOTE: order is important here.
|
||||
return GitInfo(
|
||||
staged=staged,
|
||||
|
||||
@@ -62,8 +62,7 @@ install_requires =
|
||||
rich>=10.13.0
|
||||
pyparsing>=2.4.7
|
||||
typing-extensions>=3.7.4
|
||||
scmrepo==0.0.25
|
||||
dulwich<0.20.46
|
||||
scmrepo==0.1.0
|
||||
dvc-render==0.0.10
|
||||
dvc-task==0.1.2
|
||||
dvclive>=0.10.0
|
||||
|
||||
@@ -4,7 +4,7 @@ from os.path import join
|
||||
import pytest
|
||||
|
||||
from dvc.repo import Repo
|
||||
from dvc.repo.data import _transform_git_paths_to_dvc
|
||||
from dvc.repo.data import _transform_git_paths_to_dvc, posixpath_to_os_path
|
||||
from dvc.testing.tmp_dir import make_subrepo
|
||||
from dvc.utils.fs import remove
|
||||
|
||||
@@ -31,7 +31,7 @@ def test_git_to_dvc_path_wdir_transformation(tmp_dir, scm, path):
|
||||
subdir.gen(struct)
|
||||
_, _, untracked = scm.status(untracked_files="all")
|
||||
# make order independent of the platforms for easier test assertions
|
||||
untracked = sorted(untracked, reverse=True)
|
||||
untracked = sorted(map(posixpath_to_os_path, untracked), reverse=True)
|
||||
assert _transform_git_paths_to_dvc(dvc, untracked) == [
|
||||
"file",
|
||||
join("dir", "foo"),
|
||||
|
||||
Reference in New Issue
Block a user