╭ changed ───────────────╮ │src/test/event/patch.zig│ ╰────────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │182 try pch.refreshBranches(.server, .xit, opts, io, allocator, &repo, null, &progress); │ │183 try std.testing.expect(std.mem.indexOf(u8, output.written(), "Updating patches: 100% (1/1)\n") != null); │ │184 │ │185 + // closed patches skip source updates and contribute no progress │ │186 + try evt.Patch.update(.server, .xit, opts, io, allocator, &repo, &id, .{ .status = .closed }, author); │ │187 + const next = try repo.commitAtRef(io, allocator, .{ .message = "revise while closed" }, null, .{ .kind = .head, .name = "feature" });│ │188 + const closed_tip = (try repo.readRef(io, evt.events_ref)) orelse return error.NotFound; │ │189 + const closed_progress_len = output.written().len; │ │190 + try pch.refreshBranches(.server, .xit, opts, io, allocator, &repo, null, &progress); │ │191 + try std.testing.expectEqualStrings(&closed_tip, &(try repo.readRef(io, evt.events_ref) orelse return error.NotFound)); │ │192 + try std.testing.expectEqual(closed_progress_len, output.written().len); │ │193 + │ │194 + // reopening captures the latest source and checks both merge styles │ │195 + try evt.Patch.update(.server, .xit, opts, io, allocator, &repo, &id, .{ .status = .open }, author); │ │196 var arena = std.heap.ArenaAllocator.init(allocator); │ │197 defer arena.deinit(); │ │198 const before = (try evt.Patch.readFromRepo(.xit, opts, io, allocator, &arena, &repo, &id)) orelse return error.NotFound; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │199 const revision = before.event.revision orelse return error.NotFound; │ │200 + try std.testing.expectEqualStrings(&next, revision.source_oid); │ │201 + { │ │202 + var moment = try repo.core.latestMoment(); │ │203 + const result = try pch.readMergeability(opts, .{ .core = &repo.core, .extra = .{ .moment = &moment } }, io, &arena, &id, before.event);│ │204 + try std.testing.expectEqualDeep(pch.Mergeability{ .source = .clean, .squash = .clean }, result); │ │205 + } │ │206 │ │207 // both merge styles use the stored revision, without fork data │ │208 try pch.merge(opts, io, allocator, path, &repo, .{ .id = id_hex, .revision = selection, .author = author, .timestamp = 100 }); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯