#14 Complete patch series: ChessBase, PGN, Chess-Results and UI improvements
This is a complete, cumulative three-patch series against upstream master 8ffd1e3a02b9f61b5616e38b18ce932b904e04ff. It includes changes previously submitted in #10, #11, #12 and #13. Please do not apply those tickets as well as this series: patches 0001 and 0002 correspond to the earlier ChessBase submissions, and 0003 contains the current follow-up, including overlapping fixes. This is a combined review submission rather than a request to apply the older patches twice.
Purpose and scope:
- Read-only ChessBase .cbh/.cbv/.cbf/.2cbh import and annotation/compatibility improvements.
- PGN import diagnostics, damaged-game salvage, encoding selection and preview; fix PGN tag escaping.
- PGN game replacement modes: append replace_game, rewrite a clean PGN, or ask each time. Direct rewrite resolves existing replacement records, uses a sibling staging backup and rejects detected external modifications or ambiguous/damaged input. Please review concurrency, cross-platform filesystem semantics and recovery handling carefully; do not edit the same PGN concurrently during a save.
- Load individual and team round pairings from Chess-Results, with rating, result, board and provenance tags.
- Game list navigation and filters, docking and game-information window changes, board shortcut, save validation, draw-offer mark, variation controls and Czech/English help.
- Include regression scripts and tests; no local build artifacts or user configuration.
Apply in order with git am --keep-cr 0001-.patch 0002-.patch 0003-*.patch. --keep-cr is necessary for the existing CRLF Makefile.vc; plain git am failed for that file. The series was applied successfully to a clean worktree at the upstream commit and produces the same tree as the prepared submission. Some existing trailing whitespace remains, particularly in tcl/end.tcl and czech.tcl.
Testing: clean Windows UCRT64 build from the reapplied series; 216 Google Tests passed, 8 external-fixture tests skipped. GCC 16.2 emitted a stringop-overflow warning in the existing Test_FileMap.LargeFile test; the test passed. Also, plus isolated Windows GUI/Tcl tests for PGN direct/append/ask, legacy replacement chains, opening-time snapshots, draw offers, comment actions, Czech/English help and Chess-Results parser. Some ChessBase tests requiring external fixtures are skipped. See attached scripts for test details.
Limitations: Direct PGN rewrite rejects unsupported or ambiguous records rather than silently rewriting them; ordinary untouched records are copied verbatim, while legacy replacement records are serialized again. An opening-time snapshot is removed on normal close. A lasting user backup is still recommended.
Follow-up patch for the three-patch series attached above; apply it after 0003 (git am --keep-cr).
Testing: Windows UCRT64 build; all 226 Google Tests passed with external fixtures enabled. A 10-game ChessBase 2 database matched the reference PGN for player names, results and main-line moves (not a complete comparison of comments or variations). Installed-build tests passed for opening the database and for PGN BOM, direct saving, save choices and opening-time snapshots. External test databases are not included.
Additional follow-up patch: apply after the three original patches and the preceding empty ChessBase 2 / PGN BOM follow-up (git am --keep-cr).
The Windows Chess-Results fetch helper no longer calls wm before Tk is initialized. Loading Chess-Results data no longer adds URL, board or team-pairing PGN tags; existing extra tags are preserved rather than removed. Documentation and tests are updated.
Testing: Tcl parser and helper regression tests passed. The installed Windows build successfully fetched a real round-one pairing and result; installed save/replace and PGN export tests passed, including preservation of existing extra tags. Previously saved provenance tags are not removed automatically.
I’m continuing this work in Scid OpenLine, an independent fork of Scid: https://sourceforge.net/projects/scid-openline/
The initial master branch includes the read-only ChessBase importers from the first two patches in this series. It retains Scid’s Git history so I can continue to merge updates from upstream. The full patch series remains available here for review.