╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ────────╮ │src/serve_ssh.zig│ ╰─────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │418 │ │419 const user = (try evt.User.readByName(io, allocator, admin_repo_path, &arena, owner_name)) orelse return false;│ │420 │ │421 - var it = std.mem.splitScalar(u8, user.ssh_keys, '\n'); │ │421 + var it = std.mem.splitScalar(u8, user.event.ssh_keys, '\n'); │ │422 while (it.next()) |line| { │ │423 const fp = fingerprintOfAuthorizedKey(line) orelse continue; │ │424 if (std.mem.eql(u8, &fp, fingerprint)) return true; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────╮ │src/test/event.zig│ ╰──────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │132 // get the issue out of the map that was edited │ │133 const first_issue_cursor = try event_id_to_issue.getCursor(hash.hashInt(repo_opts.hash, &first_event_id)) orelse return error.NotFound;│ │134 const first_issue_map = try Repo.DB.HashMap(.read_only).init(first_issue_cursor); │ │135 - const first_issue = try evt.read(evt.Issue, Repo.DB, repo_opts.hash, &arena, first_issue_map); │ │135 + const first_issue = try evt.read(evt.Issue.Record, Repo.DB, repo_opts.hash, &arena, first_issue_map); │ │136 │ │137 // the description was correctly edited │ │138 - try std.testing.expectEqualStrings(events_to_consume[1].event.issue.?.description, first_issue.description); │ │138 + try std.testing.expectEqualStrings(events_to_consume[1].event.issue.?.description, first_issue.event.description); │ │139 │ │140 // the tags were correctly edited │ │141 - try std.testing.expectEqualStrings(events_to_consume[1].event.issue.?.tags, first_issue.tags); │ │141 + try std.testing.expectEqualStrings(events_to_consume[1].event.issue.?.tags, first_issue.event.tags); │ │142 } │ │143 │ │144 // │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │214 // get the issue out of the map that was edited │ │215 const first_issue_cursor = try event_id_to_issue.getCursor(hash.hashInt(repo_opts.hash, &first_event_id)) orelse return error.NotFound;│ │216 const first_issue_map = try Repo.DB.HashMap(.read_only).init(first_issue_cursor); │ │217 - const first_issue = try evt.read(evt.Issue, Repo.DB, repo_opts.hash, &arena, first_issue_map); │ │217 + const first_issue = try evt.read(evt.Issue.Record, Repo.DB, repo_opts.hash, &arena, first_issue_map); │ │218 │ │219 // the description is no longer edited │ │220 - try std.testing.expectEqualStrings(events_to_consume[0].event.issue.?.description, first_issue.description); │ │220 + try std.testing.expectEqualStrings(events_to_consume[0].event.issue.?.description, first_issue.event.description); │ │221 │ │222 // the tags are no longer edited │ │223 - try std.testing.expectEqualStrings(events_to_consume[0].event.issue.?.tags, first_issue.tags); │ │223 + try std.testing.expectEqualStrings(events_to_consume[0].event.issue.?.tags, first_issue.event.tags); │ │224 │ │225 // an event added by the second push is no longer there because it was wiped out by the rebase │ │226 try std.testing.expect(null == try event_id_to_issue.getCursor(hash.hashInt(repo_opts.hash, &events_to_consume2[0].id))); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │390 _ = try std.fmt.hexToBytes(&first_issue_id, &events_to_consume[0].id); │ │391 const first_issue_cursor = try event_id_to_issue.getCursor(hash.hashInt(repo_opts.hash, &first_issue_id)) orelse return error.NotFound;│ │392 const first_issue_map = try Repo.DB.HashMap(.read_only).init(first_issue_cursor); │ │393 - const first_issue = try evt.read(evt.Issue, Repo.DB, repo_opts.hash, &arena, first_issue_map); │ │393 + const first_issue = try evt.read(evt.Issue.Record, Repo.DB, repo_opts.hash, &arena, first_issue_map); │ │394 │ │395 - try std.testing.expectEqualStrings(events_to_consume[0].event.issue.?.description, first_issue.description); │ │396 - try std.testing.expectEqualStrings(events_to_consume[0].event.issue.?.tags, first_issue.tags); │ │395 + try std.testing.expectEqualStrings(events_to_consume[0].event.issue.?.description, first_issue.event.description); │ │396 + try std.testing.expectEqualStrings(events_to_consume[0].event.issue.?.tags, first_issue.event.tags); │ │397 } │ │398 │ │399 // │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │497 _ = try std.fmt.hexToBytes(&first_issue_id, &events_to_consume[0].id); │ │498 const first_issue_cursor = try event_id_to_issue.getCursor(hash.hashInt(repo_opts.hash, &first_issue_id)) orelse return error.NotFound;│ │499 const first_issue_map = try Repo.DB.HashMap(.read_only).init(first_issue_cursor); │ │500 - const first_issue = try evt.read(evt.Issue, Repo.DB, repo_opts.hash, &arena, first_issue_map); │ │500 + const first_issue = try evt.read(evt.Issue.Record, Repo.DB, repo_opts.hash, &arena, first_issue_map); │ │501 │ │502 - try std.testing.expectEqualStrings(events_to_consume[0].event.issue.?.description, first_issue.description); │ │503 - try std.testing.expectEqualStrings(events_to_consume[0].event.issue.?.tags, first_issue.tags); │ │502 + try std.testing.expectEqualStrings(events_to_consume[0].event.issue.?.description, first_issue.event.description); │ │503 + try std.testing.expectEqualStrings(events_to_consume[0].event.issue.?.tags, first_issue.event.tags); │ │504 } │ │505 │ │506 // make sure one of the new issues is there │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │510 _ = try std.fmt.hexToBytes(&first_issue_id, &events_to_consume2[0].id); │ │511 const first_issue_cursor = try event_id_to_issue.getCursor(hash.hashInt(repo_opts.hash, &first_issue_id)) orelse return error.NotFound;│ │512 const first_issue_map = try Repo.DB.HashMap(.read_only).init(first_issue_cursor); │ │513 - const first_issue = try evt.read(evt.Issue, Repo.DB, repo_opts.hash, &arena, first_issue_map); │ │513 + const first_issue = try evt.read(evt.Issue.Record, Repo.DB, repo_opts.hash, &arena, first_issue_map); │ │514 │ │515 - try std.testing.expectEqualStrings(events_to_consume2[0].event.issue.?.description, first_issue.description); │ │516 - try std.testing.expectEqualStrings(events_to_consume2[0].event.issue.?.tags, first_issue.tags); │ │515 + try std.testing.expectEqualStrings(events_to_consume2[0].event.issue.?.description, first_issue.event.description); │ │516 + try std.testing.expectEqualStrings(events_to_consume2[0].event.issue.?.tags, first_issue.event.tags); │ │517 } │ │518 │ │519 // the ordered issue set unions both branches' additions │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │685 │ │686 // the first parent is the events branch, so its version stays live │ │687 const issue = try readIssue(Repo.DB, repo_opts.hash, haxy_moment, &arena, &issue_id); │ │688 - try std.testing.expectEqualStrings("bug priority-low ui", issue.tags); │ │688 + try std.testing.expectEqualStrings("bug priority-low ui", issue.event.tags); │ │689 │ │690 // the issue is listed as conflicted, with the merge base recorded │ │691 const conflicts_cursor = try haxy_moment.getCursor(hash.hashInt(repo_opts.hash, evt.Issue.conflicts_key)) orelse return error.NotFound;│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │697 const conflict = try Repo.DB.HashMap(.read_only).init(conflict_cursor); │ │698 │ │699 const base_cursor = try conflict.getCursor(hash.hashInt(repo_opts.hash, evt.base_record_key)) orelse return error.NotFound; │ │700 - const base = try evt.read(evt.Issue, Repo.DB, repo_opts.hash, &arena, try Repo.DB.HashMap(.read_only).init(base_cursor)); │ │701 - try std.testing.expectEqualStrings("bug priority-high ui", base.tags); │ │700 + const base = try evt.read(evt.Issue.Record, Repo.DB, repo_opts.hash, &arena, try Repo.DB.HashMap(.read_only).init(base_cursor)); │ │701 + try std.testing.expectEqualStrings("bug priority-high ui", base.event.tags); │ │702 │ │703 // tags is the one field both sides changed differently │ │704 const fields_cursor = try conflict.getCursor(hash.hashInt(repo_opts.hash, evt.conflicted_fields_key)) orelse return error.NotFound;│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │707 │ │708 // their whole version is recorded, not just the conflicting field │ │709 const their_cursor = try conflict.getCursor(hash.hashInt(repo_opts.hash, evt.their_record_key)) orelse return error.NotFound; │ │710 - const theirs = try evt.read(evt.Issue, Repo.DB, repo_opts.hash, &arena, try Repo.DB.HashMap(.read_only).init(their_cursor)); │ │711 - try std.testing.expectEqualStrings("bug priority-medium ui", theirs.tags); │ │712 - try std.testing.expectEqualStrings(issue.title, theirs.title); │ │713 - try std.testing.expectEqualStrings(issue.description, theirs.description); │ │710 + const theirs = try evt.read(evt.Issue.Record, Repo.DB, repo_opts.hash, &arena, try Repo.DB.HashMap(.read_only).init(their_cursor));│ │711 + try std.testing.expectEqualStrings("bug priority-medium ui", theirs.event.tags); │ │712 + try std.testing.expectEqualStrings(issue.event.title, theirs.event.title); │ │713 + try std.testing.expectEqualStrings(issue.event.description, theirs.event.description); │ │714 │ │715 // their value is attributed to the commit that set it on their branch │ │716 const oids_cursor = try conflict.getCursor(hash.hashInt(repo_opts.hash, evt.their_field_to_oid_key)) orelse return error.NotFound; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │767 │ │768 // their edit came over, so the merge really did touch the issue │ │769 const issue = try readIssue(Repo.DB, repo_opts.hash, haxy_moment, &arena, &issue_id); │ │770 - try std.testing.expectEqualStrings("Rewritten on a branch that never merged.", issue.description); │ │770 + try std.testing.expectEqualStrings("Rewritten on a branch that never merged.", issue.event.description); │ │771 │ │772 // and the conflict is still waiting to be resolved │ │773 const conflicts_cursor = try haxy_moment.getCursor(hash.hashInt(repo_opts.hash, evt.Issue.conflicts_key)) orelse return error.NotFound;│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯