Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion dvc/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,10 @@ def get_files_number(self, filter_info=None):

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:
Expand Down
5 changes: 4 additions & 1 deletion dvc/repo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,10 @@ def init(root_dir=os.curdir, no_scm=False, force=False, subdir=False) -> "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"]]
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down