-
Couldn't load subscription status.
- Fork 1.2k
[WIP] save permissions in dvc files #5036
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,3 +12,4 @@ class StageParams: | |
| PARAM_METRICS = "metrics" | ||
| PARAM_PLOTS = "plots" | ||
| PARAM_DESC = "desc" | ||
| PARAM_MODE = "mode" | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -455,7 +455,10 @@ def get(self, path_info): | |||||
| return None | ||||||
|
|
||||||
| self._update_state_record_timestamp_for_inode(actual_inode) | ||||||
| return HashInfo("md5", value, size=int(actual_size)) | ||||||
|
|
||||||
| mode = oct(os.stat(path).st_mode) | ||||||
|
|
||||||
| return HashInfo("md5", value, size=int(actual_size), mode=mode) | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. mode is not really used by state, so we shouldn't include it here (we can probably do that in Output.save with self.tree.stat(self.path_info).st_mode. Also mode is not really related to HashInfo so it shoudn't be.a part of it, unless there are good reasons to include it. 🙂 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it makes sense not to include So there will be two separate outputs. Will it affect anything that uses those files? Could you provide a link to a place where There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dudarev It should be more like: Since that relates to the same output. Maybe you are confused about the way that entry is generated, see Line 299 in f09c27e
ret[self.PARAM_ISEXEC] = self.isexec there and parse it on the roundtrip similar to other fields.
Sure! Line 289 in f09c27e
|
||||||
|
|
||||||
| def save_link(self, path_info): | ||||||
| """Adds the specified path to the list of links created by dvc. This | ||||||
|
|
||||||
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.
Is full mode intentional? Or did you only mean to include permission bits?
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'm leaning now more towards only saving user executable bit, so we could have a boolean parameter: