| Comment: | Merge remote-tracking branch 'origin/main' into fix/merge3-markers |
|---|---|
| Timelines: | family | ancestors | descendants | both | main | trunk | feat/submanifest-reader |
| Files: | files | file ages | folders |
| SHA3-256: |
4f1f98b70d5ba74d98b5da376c09ec79 |
| User & Date: | [email protected] on 2026-10-19 01:50:21.000 |
| Other Links: | branch diff | manifest | tags |
|
2026-10-19
| ||
| 01:52 |
fix(merge): IsText converts as fossil's text_diff does
Read data through the ported BOM/UTF-16 conversion and line splitter, so the Update gate and the merge agree on what is text. Tracked in #447 check-in: eb1791acd5 user: [email protected] tags: feat/submanifest-reader, main, trunk | |
| 01:50 | Merge remote-tracking branch 'origin/main' into fix/merge3-markers check-in: 4f1f98b70d user: [email protected] tags: feat/submanifest-reader, main, trunk | |
| 01:50 |
fix(merge): write fossil's merge3 output byte for byte
Port fossil 2.28's merge3.c and the diff it runs on (break_into_lines, break_into_tokens, longestCommonSequence, diff_step, diff_optimize, the UTF-8/UTF-16 BOM handling) so Merge and Update align, merge and mark conflicts exactly as fossil does: line-numbered markers, the token-level suggested resolution, CRLF markers, and binary input left unmerged. HasConflictMarkers follows contains_merge_marker in skipping CR runs. A fossil-binary comparison test checks 1237 generated and hand-written cases against "fossil 3-way-merge" and UTF-16 cases against "fossil merge"; fossil commit refuses a file holding our markers. Tracked in #447 check-in: dcec15d91f user: [email protected] tags: feat/submanifest-reader, main, trunk | |
|
2026-10-18
| ||
| 21:59 |
fix(checkout): keep uncommitted changes across Update, as fossil does (#450)
* fix(checkout): keep uncommitted changes across Update, as fossil does Update compared only committed versions: it wrote the target over a locally edited file, deleted an edited file the target removed, and merged the current and target check-ins with their ancestor while ignoring the working file. It now follows fossil's update (src/update.c): scan the checkout, then for each file take the target's content when there is no local change, merge a local edit three ways (the checkout's version as base, the working file as local, the target as other) with conflicts listed in Conflicted, keep an edited file the target deletes as an untracked file, keep pending adds and removals, restore a missing file, and copy an untracked file the target adds over to NAME-original first. A dry run writes nothing. Files written with the target's content record the mtime of the write. Files are matched by name; a target-side rename is not followed. The two tests that relied on merging two branches' committed changes now make the clashing edit locally. A fossil 2.28 interop test runs the same edits through fossil update and compares files, fossil changes and Status. Tracked in #443 * fix(checkout): make Update safe on binary files, failures and dry runs A binary file (a NUL byte, or a line over 32,767 bytes, as fossil's line diff refuses) is no longer line-merged. Update saves the working copy as NAME-original and writes the target, as fossil's update does; Merge keeps the checkout's copy, as fossil's merge does. Both used to splice the versions and report a clean merge. merge.IsText is fossil's test. Update refuses before writing anything when a file it must write or delete has a directory or a read-only file in the way, moves the checkout database to the target in one transaction, and in a dry run leaves the database untouched (the scan's findings stay in memory). Every target file gets the target's executable bit, as fossil's checkout_set_all_exe does, so a bit-only change reaches the disk. UpdateResult.Unmerged lists files left to reconcile without markers: edited files the target deletes, files added both locally and by the target, and binary conflicts. The interop test now covers a binary conflict against fossil 2.28. Tracked in #443 * fix(checkout): check real write access before Update writes anything The pre-write check read the owner-write bit: it missed an unwritable directory (a remove failed after a merge had been written), files owned by others, and wrongly refused for root. It now asks the storage, via an optional CheckWritable: OSStorage uses access(2) with W_OK on unix and a read-only-attribute check elsewhere (js/wasm, Windows). Every step needs its directory writable; a write or merge over an existing file needs the file writable too. A read-only untracked file where the target adds one is backed up to NAME-original, deleted and replaced, as fossil does, instead of refused. Merge keeps a binary file whatever its strategy, as fossil's merge does. setVVar's precondition now catches a nil *sql.DB or *sql.Tx inside the interface. Tracked in #443 check-in: 6e6969bf97 user: [email protected] tags: main, trunk | |