Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cache: move unrelated helpers out of CloudCache class #5439

Merged
merged 2 commits into from
Feb 10, 2021

Conversation

efiop
Copy link
Contributor

@efiop efiop commented Feb 10, 2021

Moving almost as--is for now, but both transfer and link could use some refactoring.

Pre-requisite for #5337 and #829

Thank you for the contribution - we'll try to review it as soon as possible. πŸ™

Moving it as is for now.
@efiop efiop added refactoring Factoring and re-factoring skip-changelog Skips changelog labels Feb 10, 2021
Comment on lines -60 to -61
if self.cache_types[0] not in ("symlink", "hardlink"):
os.chmod(to_info, self._file_mode)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was only needed to put normal permissions on reflinks (as they initially adopt the original ones), moved to reflink().



def _link(cache, from_info, to_info):
assert cache.tree.isfile(from_info)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasting a call :( As noted in the PR desc, link() could use some refactoring. Keeping as it was before for now, but will get back to this shortly during optimization.

@efiop efiop changed the title cache: move unrelated helpers out of CloudCache class [WIP] cache: move unrelated helpers out of CloudCache class Feb 10, 2021
@efiop efiop changed the title [WIP] cache: move unrelated helpers out of CloudCache class cache: move unrelated helpers out of CloudCache class Feb 10, 2021
@efiop efiop merged commit fa550f9 into iterative:master Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Factoring and re-factoring skip-changelog Skips changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant