Skip to content

ui: restore --delete indicates number of deleted files#5100

Merged
MichaelEischer merged 4 commits intorestic:masterfrom
zmanda:fix-gh-5092-restore-output-should-indicate-count-of-deleted-files
Dec 1, 2024
Merged

ui: restore --delete indicates number of deleted files#5100
MichaelEischer merged 4 commits intorestic:masterfrom
zmanda:fix-gh-5092-restore-output-should-indicate-count-of-deleted-files

Conversation

@konidev20
Copy link
Copy Markdown
Contributor

@konidev20 konidev20 commented Oct 20, 2024

What does this PR change? What problem does it solve?

  • adds new field FilesDeleted to the State struct, JSON and text progress updaters
  • renamed ReportDeletedFile to ReportDeletion
  • increment FilesDeleted count when ReportedDeletion is called

Was the change previously discussed in an issue or on the forum?

Closes #5092

Checklist

  • I have read the contribution guidelines.
  • I have enabled maintainer edits.
  • I have added tests for all code changes.
  • I have added documentation for relevant changes (in the manual).
  • There's a new file in changelog/unreleased/ that describes the changes for our users (see template).
  • I have run gofmt on the code in all commits.
  • All commit messages are formatted in the same style as the other commits in the repo.
  • I'm done! This pull request is ready for review.

@konidev20 konidev20 force-pushed the fix-gh-5092-restore-output-should-indicate-count-of-deleted-files branch 2 times, most recently from 14b2932 to a372d72 Compare October 20, 2024 19:22
@konidev20 konidev20 force-pushed the fix-gh-5092-restore-output-should-indicate-count-of-deleted-files branch from a372d72 to 30585cc Compare November 16, 2024 09:36
Copy link
Copy Markdown
Member

@MichaelEischer MichaelEischer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have only one small nit remaining for the code. Besides that, please add a short changelog entry.

* adds new field `FilesDeleted` to the State struct, JSON and text progress updaters
* increment FilesDeleted count when ReportedDeletedFile
@konidev20 konidev20 force-pushed the fix-gh-5092-restore-output-should-indicate-count-of-deleted-files branch from 30585cc to 66e5576 Compare December 1, 2024 13:53
ui: report deleted directories and refactor function name to ReportDeletion

changelog: issue-5092

lint: fix unused variable
@konidev20 konidev20 force-pushed the fix-gh-5092-restore-output-should-indicate-count-of-deleted-files branch from 2022c2e to 0d4e684 Compare December 1, 2024 14:05
Copy link
Copy Markdown
Member

@MichaelEischer MichaelEischer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@MichaelEischer MichaelEischer merged commit d7d9af4 into restic:master Dec 1, 2024
Snshadow pushed a commit to Snshadow/restic that referenced this pull request Dec 2, 2024
* ui: restore --delete indicates number of deleted files

* adds new field `FilesDeleted` to the State struct, JSON and text progress updaters
* increment FilesDeleted count when ReportedDeletedFile

* ui: collect the files to be deleted, delete, then update the count post deletion

* docs: update scripting output fields for restore command

ui: report deleted directories and refactor function name to ReportDeletion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

restic restore --delete output should indicate number of files deleted

2 participants