╭ changed ───╮ │src/push.zig│ ╰────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭─────────────────────────────────────────────────────────────────────╮ │33 .end => |kind| { │ │34 if (kind != .writing_patch) return; │ │35 }, │ │36 + // each phase names itself before reporting its count│ │37 + .text => |text| { │ │38 + self.label = text; │ │39 + return; │ │40 + }, │ │41 else => return, │ │42 } │ │43 if (self.total == 0) return; │ ╰─────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────╮ │119 │ │120 var updates = xit.net_server_receive_pack.AppliedRefUpdates.init(allocator);│ │121 defer updates.deinit(); │ │122 + │ │123 + var progress = PushProgress{ .response = &response, .writer = writer }; │ │124 const Ctx = struct { │ │125 updates: *xit.net_server_receive_pack.AppliedRefUpdates, │ │126 core: *rp.Repo(.xit, repo_opts).Core, │ ╰─────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────╮ │133 response: *xit.net_server_receive_pack.Response, │ │134 repo_root_path: []const u8, │ │135 error_writer: *std.Io.Writer, │ │136 + progress: *PushProgress, │ │137 │ │138 pub fn run(ctx: @This(), cursor: *DB.Cursor(.read_write)) !void {│ │139 var moment = try DB.HashMap(.read_write).init(cursor.*); │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │153 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);│ │154 │ │155 // the revisions the pushed branches cause belong to the push │ │148 - _ = try pch.refreshBranchesInTransaction(.server, repo_opts, state, &moment, ctx.io, ctx.allocator, ctx.updates.items.items, null); │ │156 + _ = try pch.refreshBranchesInTransaction(.server, repo_opts, state, &moment, ctx.io, ctx.allocator, ctx.updates.items.items, null, ctx.progress); │ │157 } │ │158 try writeUndo(repo_opts, state, ctx.io, ctx.allocator, ctx.author); │ │159 } │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────╮ │178 .response = &response, │ │179 .repo_root_path = repo_root_path,│ │180 .error_writer = error_writer, │ │181 + .progress = &progress, │ │182 }, │ │183 ); │ │184 }; │ ╰──────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │188 return err; │ │189 }; │ │190 │ │182 - var progress = PushProgress{ .response = &response, .writer = writer, .label = "Updating patches" }; │ │191 pch.refreshBranches(.server, .xit, repo_opts, io, allocator, repo, updates.items.items, &progress) catch |err| {│ │192 serve_common.logError(io, error_writer, "failed to refresh branch patches: {s}\n", .{@errorName(err)}); │ │185 - pch.refreshOpenMergeability(repo_opts, io, allocator, repo, null); │ │193 + pch.refreshOpenMergeability(repo_opts, io, allocator, repo, null, &progress); │ │194 }; │ │195 find.refresh(repo_opts, io, allocator, repo) catch |err| { │ │196 serve_common.logError(io, error_writer, "failed to refresh file index: {s}\n", .{@errorName(err)}); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯