dvc: add checkout --relink#2922
Conversation
|
@efiop this should be it. |
|
@Suor we need to update the command reference doc to explain this option, please |
| 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.
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.
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.
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.
@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! 🙂
|
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.
Continuation of #2922 (comment)
Also, I would've put the \n in the previous line.
Closes #2492 finally.