-
-
Notifications
You must be signed in to change notification settings - Fork 158
Implement Backup Feature #272
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
@baile320 Thanks a lot for your proposal! 🔥
I think the Unix timestamps will be enough for the first time.
I think this feature should be by default when a user tries to fix warnings and we should add an argument to skip this action. Also, I have some proposals:
|
Thanks for your comments, I will make those changes and convert this from a draft when I'm finished 👍 |
Just an update/FYI - I haven't forgotten about this, just been busy. I think I'll have time do make the changes later today. |
… into copy-feature
I believe this should be ready for review now. Changes made since discussion:
|
I'm not sure why the |
This is due to a change in the output: |
Please also update all integration tests and write another one to cover the |
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.
Thank you for you contribution! 🚀
I left some comments, please take a look them.
Codecov Report
@@ Coverage Diff @@
## master #272 +/- ##
==========================================
- Coverage 97.64% 97.46% -0.19%
==========================================
Files 31 31
Lines 2634 2679 +45
==========================================
+ Hits 2572 2611 +39
- Misses 62 68 +6
Continue to review full report at Codecov.
|
Still need to complete this task, will get to it later today and post a reply when completed |
hmm... i'm not sure how much detail I should be checking when a backup is created in an integration test. since the file is created with a timestamp, i'm not sure how to know when testing what that timestamp would be? I could just check for a wildcard file or something if that's necessary? I feel a little stuck on testing these fs components. but in the unit test i already do make sure the filepath & backup filepath are different, and that the backup filepath has the original environment. |
In my opinion, in the intragration test you should create a file with some problems, for example:
I think that is all. |
Hm. I think having a separate function for a single test is probably overkill as well, but I think I need a testing function that has some different functionality than the current ones. I think I need a test function that will let me
The reasons for those are:
I'm open to suggestions on any of these points, especially the last one. |
👌 Let it be 🙂 |
@baile320 Thanks a lot! You're awesome! ❤️ |
Hey All, I had some questions/comments about this PR. The basic functionality is in the PR to create a copy of a file via the -c/--copy flag, though.
Questions:
I just used a Unix epoch time timestamp. We could add a more nicely formatted one, but it seems likely we'd need to add a crate (I'm not sure?), and I don't know if that's wanted or needed. The Unix timestamps still allow the copies to easily be sorted by most recent.
Should copying the file be automatic any time there are fixes?