Skip to content

LT-21752: Add Send/Receive data option to backup/restore#907

Open
jasonleenaylor wants to merge 2 commits into
mainfrom
claude/infallible-tharp-7d2294
Open

LT-21752: Add Send/Receive data option to backup/restore#907
jasonleenaylor wants to merge 2 commits into
mainfrom
claude/infallible-tharp-7d2294

Conversation

@jasonleenaylor
Copy link
Copy Markdown
Contributor

@jasonleenaylor jasonleenaylor commented May 21, 2026

Summary

  • Adds a new "Send/Receive data" checkbox to the Backup and Restore dialogs, allowing users to include .hg (Mercurial) directories and OtherRepositories/ folders in backups
  • The backup checkbox is checked by default when S/R data exists in the project; the restore checkbox is informational-only (disabled) reflecting what the backup contains
  • Updates RestoreProjectPresenter.IsOkayToRestoreProject() to allow restoring over S/R projects when the backup includes S/R data
  • Fixes Manage-LocalLibraries.ps1: uses XmlWriter with tab-indented settings instead of XmlDocument.Save() to preserve SilVersions.props formatting; makes -Library ValidateSet names (lcm, palaso) consistent with pack-mode switch names (-Lcm, -Palaso)

Companion PR

The liblcm side of this feature (interface, settings, serialization, backup/restore service changes, and tests) has already been merged: the IBackupInfo.IncludeSendReceiveData property, BackupFileSettings serialization, ProjectBackupService file gathering, ProjectRestoreService extraction, and RestoreProjectSettings command-line option.

Test plan

  • New unit tests in RestoreProjectPresenterTests.cs (3 tests for IncludesFiles with S/R flag variations)
  • Verify backup dialog shows S/R checkbox, enabled and checked when .hg exists in project
  • Verify backup zip contains .hg/ and OtherRepositories/ entries when checked
  • Verify restore dialog shows S/R checkbox as disabled/informational, reflecting backup contents
  • Verify restoring over an S/R project is allowed when backup includes S/R data
  • Verify Manage-LocalLibraries.ps1 -Library lcm -Version X works (previously required -Library liblcm)
  • Verify SilVersions.props retains tab indentation after running Manage-LocalLibraries.ps1

Note: Build/SilVersions.props contains a temporary local version (11.0.0-chore-updateperm0157) used during integration testing. This should be reverted to the upstream version before merge.

🤖 Generated with Claude Code


This change is Reviewable

* Add a user choice for including Send/Receive data on by default
  for projects using Send/Receive
* Always restore the repository if it is in the backup but display
  a checkbox to show if the data is there
* Only Block the restore if the backup does not have Send/Receive
  data in it
* Update liblcm to the version including this backup option
* -Libary requried liblcm, while the default option wanted Lcm
* File was written out with spaces but tabs were expected
@github-actions
Copy link
Copy Markdown

NUnit Tests

    1 files  ±0      1 suites  ±0   12m 22s ⏱️ + 1m 20s
4 207 tests +2  4 137 ✅ +3  70 💤  - 1  0 ❌ ±0 
4 216 runs  +2  4 146 ✅ +3  70 💤  - 1  0 ❌ ±0 

Results for commit 3bc4f51. ± Comparison against base commit 9345700.

This pull request removes 1 and adds 3 tests. Note that renamed tests count towards both.
SIL.FieldWorks.FwCoreDlgs.RestoreProjectPresenterTests ‑ ObsoletePresenterApi_Disabled
SIL.FieldWorks.FwCoreDlgs.RestoreProjectPresenterTests ‑ IncludesFiles_AllFlags_CorrectCombination
SIL.FieldWorks.FwCoreDlgs.RestoreProjectPresenterTests ‑ IncludesFiles_WithSendReceiveData_ShowsInLabel
SIL.FieldWorks.FwCoreDlgs.RestoreProjectPresenterTests ‑ IncludesFiles_WithoutSendReceiveData_OmitsFromLabel

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.

1 participant