mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
Revert "scm: use dulwich backend when fetching exps during clone/pull" (#9041)
Revert "scm: use dulwich backend when fetching exps during clone/pull (#9023)"
This reverts commit ed1ab7fa75.
This commit is contained in:
@@ -253,7 +253,7 @@ def _pull(git: "Git", unshallow: bool = False):
|
|||||||
|
|
||||||
git.fetch(unshallow=unshallow)
|
git.fetch(unshallow=unshallow)
|
||||||
_merge_upstream(git)
|
_merge_upstream(git)
|
||||||
fetch_all_exps(git, "origin", backends=["dulwich"])
|
fetch_all_exps(git, "origin")
|
||||||
|
|
||||||
|
|
||||||
def _merge_upstream(git: "Git"):
|
def _merge_upstream(git: "Git"):
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ from collections import defaultdict
|
|||||||
from functools import wraps
|
from functools import wraps
|
||||||
from typing import (
|
from typing import (
|
||||||
TYPE_CHECKING,
|
TYPE_CHECKING,
|
||||||
Any,
|
|
||||||
Callable,
|
Callable,
|
||||||
Dict,
|
Dict,
|
||||||
Generator,
|
Generator,
|
||||||
@@ -280,15 +279,17 @@ def check_ref_format(scm: "Git", ref: ExpRefInfo):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def fetch_all_exps(
|
def fetch_all_exps(scm: "Git", url: str, progress: Optional[Callable] = None):
|
||||||
scm: "Git", url: str, progress: Optional[Callable] = None, **kwargs: Any
|
|
||||||
):
|
|
||||||
refspecs = [
|
refspecs = [
|
||||||
f"{ref}:{ref}"
|
f"{ref}:{ref}"
|
||||||
for ref in iter_remote_refs(scm, url, base=EXPS_NAMESPACE, **kwargs)
|
for ref in iter_remote_refs(scm, url, base=EXPS_NAMESPACE)
|
||||||
if not (ref.startswith(EXEC_NAMESPACE) or ref in STASHES)
|
if not (ref.startswith(EXEC_NAMESPACE) or ref in STASHES)
|
||||||
]
|
]
|
||||||
scm.fetch_refspecs(url, refspecs, progress=progress, **kwargs)
|
scm.fetch_refspecs(
|
||||||
|
url,
|
||||||
|
refspecs,
|
||||||
|
progress=progress,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def get_random_exp_name(scm, baseline_rev):
|
def get_random_exp_name(scm, baseline_rev):
|
||||||
|
|||||||
+1
-1
@@ -179,7 +179,7 @@ def clone(url: str, to_path: str, **kwargs):
|
|||||||
try:
|
try:
|
||||||
git = Git.clone(url, to_path, progress=pbar.update_git, **kwargs)
|
git = Git.clone(url, to_path, progress=pbar.update_git, **kwargs)
|
||||||
if "shallow_branch" not in kwargs:
|
if "shallow_branch" not in kwargs:
|
||||||
fetch_all_exps(git, url, progress=pbar.update_git, backends=["dulwich"])
|
fetch_all_exps(git, url, progress=pbar.update_git)
|
||||||
return git
|
return git
|
||||||
except InternalCloneError as exc:
|
except InternalCloneError as exc:
|
||||||
raise CloneError("SCM error") from exc
|
raise CloneError("SCM error") from exc
|
||||||
|
|||||||
Reference in New Issue
Block a user