╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ───────────────╮ │src/test/event/admin.zig│ ╰────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────╮ │353 }, │ │354 }); │ │355 │ │357 - const target_path = try std.fs.path.join(allocator, &.{ repos_dir, &repo_id_hex }); │ │356 + const target_path = try evt.repoPath(allocator, users_dir, &user_id, &repo_id); │ │357 defer allocator.free(target_path); │ │358 var target = try rp.Repo(.xit, fork_repo_opts).init(io, allocator, .{ .path = target_path });│ │359 defer target.deinit(io, allocator); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────╮ │365 try target.add(io, allocator, &.{"README"}); │ │366 _ = try target.commit(io, allocator, .{ .message = "initial" }); │ │367 │ │369 - const draft_path = try fork.create(fork_repo_opts, io, allocator, repos_dir, &user_repo, .{│ │368 + const draft_path = try fork.create(fork_repo_opts, io, allocator, users_dir, .{ │ │369 .target_branch = "master", │ │370 .id = fork_id_hex, │ │371 .user_id = user_id, │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │396 try std.testing.expectEqualStrings("add a feature", draft.event.title); │ │397 try std.testing.expectEqual(null, draft.event.revision); │ │398 │ │400 - try fork.remove(io, allocator, repos_dir, &user_repo, &fork_id_hex, author); │ │399 + try fork.remove(io, allocator, users_dir, &user_id, &fork_id_hex, author); │ │400 try std.testing.expectError(error.FileNotFound, std.Io.Dir.accessAbsolute(io, draft_path, .{}));│ │401 _ = arena.reset(.retain_capacity); │ │402 moment = try evt.currentMoment(evt.user_repo_opts, &user_repo); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────╮ │405 try std.testing.expectEqual(0, try activeForkCount(moment)); │ │406 try std.testing.expectEqual(0, try draftForkCount(moment, &repo_id)); │ │407 │ │409 - try fork.remove(io, allocator, repos_dir, &user_repo, &fork_id_hex, author); │ │408 + try fork.remove(io, allocator, users_dir, &user_id, &fork_id_hex, author); │ │409 } │ │410 │ │411 fn draftForkCount(moment: evt.UserDB.HashMap(.read_only), repo_id: []const u8) !u64 {│ ╰──────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ───────────────╮ │src/test/event/patch.zig│ ╰────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────╮ │813 const temp_path = try temp.dir.realPathFileAlloc(io, ".", allocator); │ │814 defer allocator.free(temp_path); │ │815 │ │816 - const repos_dir = try std.fs.path.join(allocator, &.{ temp_path, "repos" }); │ │817 - defer allocator.free(repos_dir); │ │816 + const users_dir = try std.fs.path.join(allocator, &.{ temp_path, "users" }); │ │817 + defer allocator.free(users_dir); │ │818 const admin_path = try std.fs.path.join(allocator, &.{ temp_path, "admin" }); │ │819 defer allocator.free(admin_path); │ │820 const upstream_path = try std.fs.path.join(allocator, &.{ temp_path, "upstream" });│ ╰────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │826 const user_id = evt.EventWithId.randomId(prng.random()); │ │827 const repo_id = evt.EventWithId.randomId(prng.random()); │ │828 const repo_id_hex = std.fmt.bytesToHex(repo_id, .lower); │ │829 - const target_path = try std.fs.path.join(allocator, &.{ repos_dir, &repo_id_hex }); │ │829 + const target_path = try evt.repoPath(allocator, users_dir, &user_id, &repo_id); │ │830 defer allocator.free(target_path); │ │831 │ │832 var admin = try rp.Repo(.xit, evt.admin_repo_opts).init(io, allocator, .{ .path = admin_path });│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────╮ │843 } }, │ │844 }, │ │845 }); │ │846 - const user_repo_path = try evt.userRepoPath(allocator, repos_dir, &user_id);│ │846 + const user_repo_path = try evt.userRepoPath(allocator, users_dir, &user_id);│ │847 defer allocator.free(user_repo_path); │ │848 var user_repo = try evt.initUserRepo(io, allocator, user_repo_path); │ │849 defer user_repo.deinit(io, allocator); │ ╰─────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────╮ │882 │ │883 const patch_id = evt.EventWithId.randomId(prng.random()); │ │884 const patch_id_hex = std.fmt.bytesToHex(patch_id, .lower); │ │885 - const draft_path = try fork.create(repo_opts, io, allocator, repos_dir, &user_repo, .{│ │885 + const draft_path = try fork.create(repo_opts, io, allocator, users_dir, .{ │ │886 .target_branch = "master", │ │887 .id = patch_id_hex, │ │888 .user_id = user_id, │ ╰───────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────╮ │968 │ │969 const unpushed_id = evt.EventWithId.randomId(prng.random()); │ │970 const unpushed_id_hex = std.fmt.bytesToHex(unpushed_id, .lower); │ │971 - const unpushed_path = try fork.create(repo_opts, io, allocator, repos_dir, &user_repo, .{│ │971 + const unpushed_path = try fork.create(repo_opts, io, allocator, users_dir, .{ │ │972 .id = unpushed_id_hex, │ │973 .user_id = user_id, │ │974 .repo_id = repo_id, │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────╮ │981 .timestamp = 3, │ │982 }); │ │983 defer allocator.free(unpushed_path); │ │984 - try pch.publish(repo_opts, io, allocator, &admin, &user_repo, &target, unpushed_path, .{│ │984 + try pch.publish(repo_opts, io, allocator, users_dir, &admin, &target, .{ │ │985 .id = unpushed_id_hex, │ │986 .user_id = user_id, │ │987 .repo_id = repo_id, │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯