mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
unprotect: add progress bar (#10152)
* unprotect: add progress bar * Update pyproject.toml
This commit is contained in:
+4
-1
@@ -1092,7 +1092,10 @@ class Output:
|
||||
|
||||
def unprotect(self):
|
||||
if self.exists and self.use_cache:
|
||||
self.cache.unprotect(self.fs_path)
|
||||
with Callback.as_tqdm_callback(
|
||||
size=self.meta.nfiles or -1, desc=f"Unprotecting {self}"
|
||||
) as callback:
|
||||
self.cache.unprotect(self.fs_path, callback=callback)
|
||||
|
||||
def get_dir_cache(self, **kwargs) -> Optional["Tree"]:
|
||||
if not self.is_dir_checksum:
|
||||
|
||||
@@ -447,7 +447,10 @@ class Repo:
|
||||
return init(root_dir=root_dir, no_scm=no_scm, force=force, subdir=subdir)
|
||||
|
||||
def unprotect(self, target):
|
||||
return self.cache.repo.unprotect(target)
|
||||
from dvc_objects.fs.callbacks import Callback
|
||||
|
||||
with Callback.as_tqdm_callback(desc=f"Unprotecting {target}") as callback:
|
||||
return self.cache.repo.unprotect(target, callback=callback)
|
||||
|
||||
def _ignore(self):
|
||||
flist = [self.config.files["local"]]
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ dependencies = [
|
||||
"configobj>=5.0.6",
|
||||
"distro>=1.3",
|
||||
"dpath<3,>=2.1.0",
|
||||
"dvc-data>=2.22.6,<2.23.0",
|
||||
"dvc-data>=2.23.1,<2.24",
|
||||
"dvc-http>=2.29.0",
|
||||
"dvc-render>=1.0.0,<2",
|
||||
"dvc-studio-client>=0.17.1,<1",
|
||||
|
||||
Reference in New Issue
Block a user