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

"Saving file /{file path}" printed for every file on every command #71

Closed
nalbion opened this issue Sep 8, 2023 · 1 comment
Closed
Labels
enhancement New feature or request

Comments

@nalbion
Copy link
Contributor

nalbion commented Sep 8, 2023

Every time it executes a command the app prints

Saving file /some/file.txt
Saving file /another/file.py
...

for all of the files, whether they've been updated or not. It should calculate a hash/checksum each time it wants to update a file

@nalbion
Copy link
Contributor Author

nalbion commented Sep 9, 2023

Oh, in Project.py:

    def restore_files(self, development_step_id):
        development_step = DevelopmentSteps.get(DevelopmentSteps.id == development_step_id)
        file_snapshots = FileSnapshot.select().where(FileSnapshot.development_step == development_step)

        clear_directory(self.root_path, IGNORE_FOLDERS)
        for file_snapshot in file_snapshots:
            update_file(file_snapshot.file.full_path, file_snapshot.content)

...so any changes that are made manually are wiped out?

There's something not right here, for some reason a snapshot is being taken for every file at every step:

image

@nalbion nalbion added the enhancement New feature or request label Sep 28, 2023
@nalbion nalbion closed this as completed Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant