╭ changed ───────────────╮ │src/test/event/patch.zig│ ╰────────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │763 // merge the selected revision into the target │ │764 // │ │765 │ │766 + try evt.Patch.update(.xit, repo_opts, io, allocator, &target, &patch_id, .{ .status = .closed }, author);│ │767 + try std.testing.expectError(error.PatchClosed, pch.merge(repo_opts, io, allocator, repos_dir, &target, .{│ │768 + .id = patch_id_hex, │ │769 + .revision = merge_revision, │ │770 + .author = author, │ │771 + .timestamp = 5, │ │772 + })); │ │773 + try evt.Patch.update(.xit, repo_opts, io, allocator, &target, &patch_id, .{ .status = .open }, author); │ │774 + │ │775 const selected_oid = switch (merge_revision) { │ │776 .squash => squash_oid, │ │777 .source => source_oid, │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────╮ │778 }; │ │770 - try pch.merge(repo_opts, io, allocator, repos_dir, &target, .{ │ │779 + try pch.mergeAndRemoveFork(repo_opts, io, allocator, repos_dir, &admin, &target, .{│ │780 .id = patch_id_hex, │ │781 .revision = merge_revision, │ │782 .author = author, │ ╰────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │790 const merged = (try evt.Patch.readById(Repo.DB, repo_opts.hash, merged_moment, &arena, &patch_id)) orelse return error.NotFound; │ │791 try std.testing.expectEqual(.merged, merged.event.status); │ │792 try std.testing.expect(null != try evt.PatchRev.readById(Repo.DB, repo_opts.hash, merged_moment, &arena, &first_patchrev_id)); │ │793 + │ │794 + _ = arena.reset(.retain_capacity); │ │795 + const removed_fork = (try evt.Fork.readById(evt.AdminDB, evt.admin_repo_opts.hash, try evt.currentMoment(evt.admin_repo_opts, &admin), &arena, &patch_id)) orelse return error.NotFound;│ │796 + try std.testing.expect(removed_fork.removed); │ │797 } │ │798 │ │799 fn indexedForkCount( │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯