╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ────╮ │src/patch.zig│ ╰─────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ 999 } │ │1000 │ │1001 // remove the consumed draft from the fork │ │1000 - try evt.consume(.server, .fork, .xit, repo_opts, io, allocator, &fork_repo, evt.events_ref, &.{.{ │ │1002 + try evt.consume(.{ .server = .{ .users_dir = users_dir } }, .fork, .xit, repo_opts, io, allocator, &fork_repo, evt.events_ref, &.{.{│ │1003 .id = input.id, │ │1004 .timestamp = input.timestamp, │ │1005 .author = input.author, │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1011 if (fork_record.event.stage == .draft) { │ │1012 var published = fork_record.event; │ │1013 published.stage = .publish; │ │1012 - try evt.consume(.server, .user, .xit, evt.user_repo_opts, io, allocator, &user_repo, evt.events_ref, &.{.{ │ │1014 + try evt.consume(.{ .server = .{ .users_dir = users_dir } }, .user, .xit, evt.user_repo_opts, io, allocator, &user_repo, evt.events_ref, &.{.{│ │1015 .id = input.id, │ │1016 .timestamp = input.timestamp, │ │1017 .author = input.author, │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1067 patch.target_branch = input.target_branch; │ │1068 │ │1069 // commit the updated draft metadata │ │1068 - try evt.consume(.server, .fork, .xit, repo_opts, io, allocator, &fork_repo, evt.events_ref, &.{.{ │ │1070 + try evt.consume(.{ .server = .{ .users_dir = users_dir } }, .fork, .xit, repo_opts, io, allocator, &fork_repo, evt.events_ref, &.{.{│ │1071 .id = input.id, │ │1072 .timestamp = input.timestamp, │ │1073 .author = input.author, │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────╮ │1088 const patch_id = try evt.parseEventId(&input.id); │ │1089 errdefer |err| { │ │1090 if (err == error.PatchDataUnavailable or err == error.PatchOutOfDate) { │ │1089 - refreshMergeability(repo_opts, io, allocator, target_repo, patch_id); │ │1091 + refreshMergeability(repo_opts, io, allocator, target_repo, users_dir, patch_id);│ │1092 } │ │1093 } │ │1094 var arena = std.heap.ArenaAllocator.init(allocator); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────╮ │1236 } │ │1237 │ │1238 // refresh other patches affected by the updated target branch. │ │1237 - refreshOpenMergeability(repo_opts, io, allocator, target_repo, null, null); │ │1239 + refreshOpenMergeability(repo_opts, io, allocator, target_repo, users_dir, null, null);│ │1240 } │ │1241 │ │1242 // merge a published patch and remove its fork │ ╰────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ───╮ │src/push.zig│ ╰────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │166 try pch.detectMerged(repo_opts, state, &ctx.core.db, &moment, ctx.io, ctx.allocator, ctx.users_dir, ctx.updates.items.items, ctx.error_writer); │ │167 │ │168 // the revisions the pushed branches cause belong to the push │ │169 - _ = try pch.refreshBranchesInTransaction(.server, repo_opts, state, &moment, ctx.io, ctx.allocator, ctx.updates.items.items, null, ctx.sideband); │ │169 + _ = try pch.refreshBranchesInTransaction(.{ .server = .{ .users_dir = ctx.users_dir } }, repo_opts, state, &moment, ctx.io, ctx.allocator, ctx.updates.items.items, null, ctx.sideband);│ │170 } │ │171 │ │172 if (ctx.sideband.gone) return error.ClientGone; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │211 return err; │ │212 }; │ │213 │ │214 - pch.refreshBranches(.server, .xit, repo_opts, io, allocator, repo, updates.items.items, &sideband) catch |err| { │ │214 + pch.refreshBranches(.{ .server = .{ .users_dir = users_dir } }, .xit, repo_opts, io, allocator, repo, updates.items.items, &sideband) catch |err| {│ │215 serve_common.logError(io, error_writer, "failed to refresh branch patches: {s}\n", .{@errorName(err)}); │ │216 - pch.refreshOpenMergeability(repo_opts, io, allocator, repo, null, &sideband); │ │216 + pch.refreshOpenMergeability(repo_opts, io, allocator, repo, users_dir, null, &sideband); │ │217 }; │ │218 try response.finish(writer, null); │ │219 } │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────╮ │224 allocator: std.mem.Allocator, │ │225 fork_repo: *rp.Repo(.xit, repo_opts), │ │226 target_repo: *rp.Repo(.xit, repo_opts),│ │227 + users_dir: []const u8, │ │228 id: *const [evt.event_id_size * 2]u8, │ │229 author: evt.CommitAuthor, │ │230 timestamp: u64, │ ╰────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │416 } │ │417 var patch = published_patch.event; │ │418 patch.revision = selected; │ │418 - evt.consume(.server, .repo, .xit, repo_opts, io, allocator, target_repo, evt.events_ref, &.{.{ │ │419 + evt.consume(.{ .server = .{ .users_dir = users_dir } }, .repo, .xit, repo_opts, io, allocator, target_repo, evt.events_ref, &.{.{│ │420 .id = id.*, │ │421 .timestamp = timestamp, │ │422 .author = author, │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │429 refreshed = true; │ │430 } │ │431 │ │431 - if (!refreshed) pch.refreshMergeability(repo_opts, io, allocator, target_repo, patch_id); │ │432 + if (!refreshed) pch.refreshMergeability(repo_opts, io, allocator, target_repo, users_dir, patch_id);│ │433 sideband.run(io, .{ .complete_one = .writing_patch }) catch {}; │ │434 sideband.run(io, .{ .end = .writing_patch }) catch {}; │ │435 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯