╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ───╮ │src/push.zig│ ╰────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │167 try pch.detectMerged(repo_opts, state, &ctx.core.db, &moment, ctx.io, ctx.allocator, ctx.repo_root_path, ctx.updates.items.items, ctx.error_writer);│ │168 │ │169 // 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.progress); │ │170 + _ = try pch.refreshBranchesInTransaction(.server, repo_opts, state, &moment, ctx.io, ctx.allocator, ctx.updates.items.items, null, ctx.sideband); │ │171 } │ │172 │ │172 - if (ctx.progress.gone) return error.ClientGone; │ │173 + if (ctx.sideband.gone) return error.ClientGone; │ │174 │ │175 // the indexes the pushed refs invalidate belong to the push too │ │175 - _ = try find.refreshInTransaction(repo_opts, state, &moment, ctx.io, ctx.allocator, ctx.progress); │ │176 - _ = try srch_cmmt.refreshInTransaction(repo_opts, state, &moment, ctx.io, ctx.allocator, ctx.updates.items.items, ctx.progress); │ │176 + _ = try find.refreshInTransaction(repo_opts, state, &moment, ctx.io, ctx.allocator, ctx.sideband); │ │177 + _ = try srch_cmmt.refreshInTransaction(repo_opts, state, &moment, ctx.io, ctx.allocator, ctx.updates.items.items, ctx.sideband); │ │178 │ │179 try writeUndo(repo_opts, state, ctx.io, ctx.allocator, ctx.author, ctx.updates.items.items); │ │180 } │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────╮ │199 .response = &response, │ │200 .repo_root_path = repo_root_path,│ │201 .error_writer = error_writer, │ │201 - .progress = &progress, │ │202 + .sideband = &sideband, │ │203 }, │ │204 ); │ │205 }; │ ╰──────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │209 return err; │ │210 }; │ │211 │ │211 - pch.refreshBranches(.server, .xit, repo_opts, io, allocator, repo, updates.items.items, &progress) catch |err| {│ │212 + pch.refreshBranches(.server, .xit, repo_opts, io, allocator, repo, updates.items.items, &sideband) catch |err| {│ │213 serve_common.logError(io, error_writer, "failed to refresh branch patches: {s}\n", .{@errorName(err)}); │ │213 - pch.refreshOpenMergeability(repo_opts, io, allocator, repo, null, &progress); │ │214 + pch.refreshOpenMergeability(repo_opts, io, allocator, repo, null, &sideband); │ │215 }; │ │216 try response.finish(writer, null); │ │217 } │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │261 var revision_id_maybe: ?[evt.event_id_size]u8 = null; │ │262 var response = xit.net_server_receive_pack.Response.init(allocator); │ │263 defer response.deinit(); │ │263 - var progress = serve_common.SidebandProgress{ .response = &response, .writer = writer, .sess = sess };│ │264 + var sideband = progress.Sideband{ .response = &response, .writer = writer, .sess = sess }; │ │265 │ │266 // execute a transaction that receives the push and materializes its revision │ │267 const result = blk: { │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────╮ │284 timestamp: u64, │ │285 newest: ?evt.PatchRev.WithId, │ │286 revision_id_maybe: *?[evt.event_id_size]u8, │ │286 - progress: *serve_common.SidebandProgress, │ │287 + sideband: *progress.Sideband, │ │288 │ │289 pub fn run(ctx: @This(), cursor: *DB.Cursor(.read_write)) !void {│ │290 // receive the branch update │ ╰──────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │291 var moment = try DB.HashMap(.read_write).init(cursor.*); │ │292 const state = State(.read_write){ .core = ctx.core, .extra = .{ .moment = &moment } }; │ │292 - try xit.net_server_receive_pack.run(.xit, repo_opts, state, ctx.io, ctx.allocator, ctx.reader, ctx.writer, .{ .allowed_ref = "refs/heads/" ++ fork.ref.name, .deferred_response = ctx.response }, ctx.progress);│ │293 + try xit.net_server_receive_pack.run(.xit, repo_opts, state, ctx.io, ctx.allocator, ctx.reader, ctx.writer, .{ .allowed_ref = "refs/heads/" ++ fork.ref.name, .deferred_response = ctx.response }, ctx.sideband);│ │294 try writeReceivedPatches(repo_opts, state, ctx.io, ctx.allocator, ctx.response, ctx.writer); │ │294 - if (ctx.progress.gone) return error.ClientGone; │ │295 + if (ctx.sideband.gone) return error.ClientGone; │ │296 │ │297 // copy the target history needed to preserve the merge base │ │298 const source_oid = (try rf.readRecur(.xit, repo_opts, state.readOnly(), ctx.io, .{ .ref = fork.ref })) orelse return error.CancelTransaction; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────╮ │378 .timestamp = timestamp, │ │379 .newest = newest, │ │380 .revision_id_maybe = &revision_id_maybe,│ │380 - .progress = &progress, │ │381 + .sideband = &sideband, │ │382 }); │ │383 }; │ │384 result catch |err| { │ ╰─────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │392 }; │ │393 if (!published) return response.finish(writer, null); │ │394 │ │394 - progress.run(io, .{ .text = "Updating patches" }) catch {}; │ │395 - progress.run(io, .{ .start = .{ .kind = .writing_patch, .estimated_total_items = 1 } }) catch {};│ │395 + sideband.run(io, .{ .text = "Updating patches" }) catch {}; │ │396 + sideband.run(io, .{ .start = .{ .kind = .writing_patch, .estimated_total_items = 1 } }) catch {};│ │397 │ │398 // best-effort update the published patch so it has the new revision │ │399 var refreshed = false; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────╮ │427 } │ │428 │ │429 if (!refreshed) pch.refreshMergeability(repo_opts, io, allocator, target_repo, patch_id);│ │429 - progress.run(io, .{ .complete_one = .writing_patch }) catch {}; │ │430 - progress.run(io, .{ .end = .writing_patch }) catch {}; │ │430 + sideband.run(io, .{ .complete_one = .writing_patch }) catch {}; │ │431 + sideband.run(io, .{ .end = .writing_patch }) catch {}; │ │432 │ │433 // the client may read either repo as soon as it gets the final response. │ │434 try response.finish(writer, null); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ────────────╮ │src/search_commit.zig│ ╰─────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────╮ │ 8 const obj = xit.object; │ │ 9 const mrg = xit.merge; │ │10 const serve_common = @import("serve_common.zig"); │ │11 +const progress = @import("./progress.zig"); │ │12 │ │13 // the repo moment key holding one commit-message index per ref tip. it sits │ │14 // outside the haxy moment because pushes change it and events never do. each│ ╰─────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯