╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ──────╮ │src/test/ui.zig│ ╰───────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │146 - const unchanged = ui.RoutablePage.repoDiffRoute("alice/project", .object, &head, 0, "", &head) orelse return error.BadRoute; │ │146 + const unchanged = ui.RoutablePage.repoDiffRoute("alice:project", .object, &head, 0, "", &head) orelse return error.BadRoute; │ │147 try std.testing.expectEqual(0, (try Diff.init(kind, opts, &arena, &repo, io, allocator, unchanged.repo_diff)).window.hunks.len);│ │148 │ │149 // a zero base includes files that were already present in the first commit │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │150 const zero = [_]u8{'0'} ** xit.hash.hexLen(opts.hash); │ │151 - const created = ui.RoutablePage.repoDiffRoute("alice/project", .object, &head, 0, "shared.txt", &zero) orelse return error.BadRoute;│ │151 + const created = ui.RoutablePage.repoDiffRoute("alice:project", .object, &head, 0, "shared.txt", &zero) orelse return error.BadRoute;│ │152 const created_diff = try Diff.init(kind, opts, &arena, &repo, io, allocator, created.repo_diff); │ │153 try std.testing.expectEqual(1, created_diff.window.hunks.len); │ │154 try std.testing.expectEqualStrings("shared.txt", created_diff.window.hunks[0].path orelse return error.MissingPath); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │155 │ │156 // standalone panes keep their comparison when filtering or paginating │ │157 const id = "11111111111111111111111111111111"; │ │158 - const fork_diff = Diff{ .route = .{ .fork = .{ .identity = "alice/project", .id = id } }, .window = first };│ │158 + const fork_diff = Diff{ .route = .{ .fork = .{ .identity = "alice:project", .id = id } }, .window = first };│ │159 for ([_]Diff{ diff, fork_diff }) |data| { │ │160 for ([_]bool{ true, false }) |terminal| { │ │161 var session = ui.Session{ .arena = &arena, .page_arena = &arena, .is_terminal = terminal }; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │162 - session.data.current_page = if (data.route == .repo) route else ui.RoutablePage.forkDiffRoute("alice/project", id, "", "", 0, "") orelse return error.BadRoute;│ │162 + session.data.current_page = if (data.route == .repo) route else ui.RoutablePage.forkDiffRoute("alice:project", id, "", "", 0, "") orelse return error.BadRoute;│ │163 var view = try Diff.View.init(allocator, &data, &session); │ │164 defer view.deinit(allocator); │ │165 const focus = view.getFocus(); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────╮ │189 │ │190 var arena = std.heap.ArenaAllocator.init(allocator); │ │191 defer arena.deinit(); │ │192 - const identity = "alice/ziglings"; │ │192 + const identity = "alice:ziglings"; │ │193 const oid0 = "1111111111111111111111111111111111111111"; │ │194 const next_oid = "2222222222222222222222222222222222222222";│ │195 const base_oid = "3333333333333333333333333333333333333333";│ ╰─────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │239 const base_oid = "3333333333333333333333333333333333333333"; │ │240 │ │241 // the route layer holds the value already url-encoded ("feature%2Ffoo"). │ │242 - const route = RP.repoCommitsRoute("alice/ziglings", .branch, "feature%2Ffoo", base_oid).?; │ │242 + const route = RP.repoCommitsRoute("alice:ziglings", .branch, "feature%2Ffoo", base_oid).?; │ │243 const url = try route.toUrl(&arena); │ │244 - try std.testing.expectEqualStrings("/repo/alice/ziglings/commits/branch:feature%2Ffoo/base:" ++ base_oid, url);│ │244 + try std.testing.expectEqualStrings("/alice:ziglings/commits/branch:feature%2Ffoo/base:" ++ base_oid, url); │ │245 │ │246 // parsing it back yields the same route, and the ref splits out intact. │ │247 const parsed = RP.fromUrl(url); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────╮ │250 try std.testing.expectEqual(RP.RefOrOid.branch, parsed_route.ref_or_oid.?); │ │251 try std.testing.expectEqualStrings("feature%2Ffoo", parsed_route.value.slice()); │ │252 try std.testing.expectEqualStrings(base_oid, parsed_route.base_oid.slice()); │ │253 - const unfiltered = RP.repoCommitsRoute("alice/ziglings", .branch, "feature%2Ffoo", "").?;│ │253 + const unfiltered = RP.repoCommitsRoute("alice:ziglings", .branch, "feature%2Ffoo", "").?;│ │254 try std.testing.expect(!RP.eql(route, unfiltered)); │ │255 } │ │256 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ────────╮ │src/test/undo.zig│ ╰─────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────╮ │ 95 var session = try ui.Session.init(&arena, &admin, .{ .user_id = user }); │ │ 96 session.io = io; │ │ 97 session.users_dir = users_dir; │ │ 98 - const files = ui.RoutablePage.repoFilesRoute("alice/demo", null, "", "", 0).?;│ │ 98 + const files = ui.RoutablePage.repoFilesRoute("alice:demo", null, "", "", 0).?;│ │ 99 session.data.current_page = files; │ │100 const page = try ui.Repo.init(&arena, &session, files); │ │101 try std.testing.expectEqual(allowed, page.undo != null); │ ╰───────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │105 try root.build(allocator, constraint, root.getFocus()); │ │106 const html = try @import("../web.zig").generateHtml(allocator, &root, &session); │ │107 defer allocator.free(html); │ │108 - try std.testing.expectEqual(allowed, std.mem.indexOf(u8, html, "/repo/alice/demo/undo") != null);│ │109 - const route = ui.RoutablePage.repoUndoRoute("alice/demo", null).?; │ │108 + try std.testing.expectEqual(allowed, std.mem.indexOf(u8, html, "/alice:demo/undo") != null); │ │109 + const route = ui.RoutablePage.repoUndoRoute("alice:demo", null).?; │ │110 if (allowed) { │ │111 _ = try ui.Repo.init(&arena, &session, route); │ │112 } else { │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │113 try std.testing.expectError(error.NotFound, ui.Repo.init(&arena, &session, route)); │ │114 } │ │115 if (user == null or !std.mem.eql(u8, user.?, &owner)) { │ │116 - try std.testing.expectError(error.Forbidden, Undo.perform(allocator, &session, ui.RoutablePage.repoUndoRoute("alice/demo", 2).?.repo_undo));│ │116 + try std.testing.expectError(error.Forbidden, Undo.perform(allocator, &session, ui.RoutablePage.repoUndoRoute("alice:demo", 2).?.repo_undo));│ │117 } │ │118 } │ │119 var session = try ui.Session.init(&arena, &admin, .{ .user_id = &owner }); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯