-
Notifications
You must be signed in to change notification settings - Fork 1.2k
dvc: add checkout --relink #2922
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
Conversation
|
@efiop this should be it. |
|
@Suor we need to update the command reference doc to explain this option, please |
dvc/command/config.py
Outdated
| is_write = self.args.unset or self.args.value is not None | ||
| if is_write and self.args.name == "cache.type": | ||
| logger.warning( | ||
| "You have changed cache.type, this doesn't update link types " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have changed the `cache.type` option.
This doesn't update existing file links/copies in
the workspace, but it can be done with:
dvc checkout --relink
I'm not sure this formatting with 12 spaces before the command is consistent with other dvc output, like when you dvc add and it gives you the exact git add command, in which case it seems to use a tab\t instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without those spaces it looks really weird on a wider screen:
WARNING: You have changed the 'cache.type' option ...
dvc checkout --relink
Since we don't have any policy about it, let's keep it this way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see this you used most of my suggestion, thanks. Also this is merged and I don't know if there's an output indentation policy but my 2c here is that the default should be to keep things consistent with existing instances, and I see mainly tabs in existing output (not sure though). Up to you guys cc @efiop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jorgeorpinel Good point. We don't have any set style right now, so I would leave it as is for now and just keep the thought in my head to unify this later. Thanks for the heads up! 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
|
Made messages go smoother. |
| " any existing workspace file links, but it can be done with:" | ||
| "\n dvc checkout --relink" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Continuation of #2922 (comment)
Also, I would've put the \n in the previous line.
Closes #2492 finally.