Skip to content

feat(settings): configure missing-file deletion on commit - #8

Open
znicelya wants to merge 1 commit into
wustites:mainfrom
znicelya:feat/configurable-missing-deletion
Open

znicelya wants to merge 1 commit into
wustites:mainfrom
znicelya:feat/configurable-missing-deletion

Conversation

@znicelya

@znicelya znicelya commented Oct 19, 2026 •

Copy link
Copy Markdown

Summary

Add a settings toggle for automatically scheduling selected missing SVN files for deletion before commit. The toggle is disabled by default for backward compatibility; when enabled, the Tauri commit path runs svn delete --force only for selected missing paths. Localized settings labels, documentation, and integration coverage are included.

Verification

  • npm run build
  • npm run test:unit (57 passed)
  • cargo fmt --manifest-path src-tauri/Cargo.toml -- --check
  • cargo test --manifest-path src-tauri/Cargo.toml --offline -- --test-threads=1 (59 passed, 2 ignored)
  • git diff --check

Checklist

  • Documentation and tests reflect the change.
  • Backward compatibility and migration impact were considered.
  • No credentials, personal data, or generated artifacts were committed.

@ZeroMarker ZeroMarker left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

(superseded — see English review below)

@ZeroMarker ZeroMarker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the contribution! I found two issues that need attention — see inline comments.

}
}
if !missing.is_empty() {
delete_missing(path, &missing).await?;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Working copy left with D entries on failure, no rollback

delete_missing runs svn delete --force before the unselected-descendants check and before svn commit. If that check fails, or the commit fails (auth, out-of-date, hook rejection, etc.), the selected missing files remain scheduled for deletion. The user is left with D entries they never committed, and the UI shows them as ordinary deletions.

Suggestion: move the delete after all pre-commit validation, and svn revert those paths if the commit fails.

})
.collect();

if auto_delete_missing {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Setting has no effect when committing the whole working copy

Auto-delete only runs in the explicit files branch. With the setting enabled and no file list (whole working copy commit), missing files are never scheduled for deletion. svn commit skips ! entries, so they silently stay missing, contrary to what the setting promises.

Suggestion: when no file list is given, collect missing entries via svn status and run the same deletion logic.

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.

2 participants