Build the canonical fixture: `dev` (shared) with two changes, and a draft `orange` forked from it with three more changes on top.
()
| 41 | /// Build the canonical fixture: `dev` (shared) with two changes, and a |
| 42 | /// draft `orange` forked from it with three more changes on top. |
| 43 | fn build_origin() -> (Repository, TempDir, PathBuf, Vec<Hash>) { |
| 44 | let (mut repo, temp, root) = init_repo(); |
| 45 | |
| 46 | write_and_add(&repo, &root, "base.txt", "base\n"); |
| 47 | let c1 = record(&repo, "initial"); |
| 48 | write_and_add(&repo, &root, "map.txt", "map\n"); |
| 49 | let c2 = record(&repo, "concepts"); |
| 50 | |
| 51 | // Fork a draft the way session views are created: copy of the log, |
| 52 | // Draft scope, parented on dev. |
| 53 | repo.create_view_from("orange", "dev").expect("fork draft"); |
| 54 | repo.switch_view("orange").expect("switch to draft"); |
| 55 | |
| 56 | write_and_add(&repo, &root, "tracks.txt", "A -> B\n"); |
| 57 | let c3 = record(&repo, "inbound track"); |
| 58 | write_and_add(&repo, &root, "rules.txt", "numbers\n"); |
| 59 | let c4 = record(&repo, "key concepts"); |
| 60 | fs::write(root.join("tracks.txt"), "A -> B -> C\n").expect("modify"); |
| 61 | let c5 = record(&repo, "math"); |
| 62 | |
| 63 | (repo, temp, root, vec![c1, c2, c3, c4, c5]) |
| 64 | } |
| 65 | |
| 66 | /// Copy every change file referenced by a manifest into another repository's |
| 67 | /// store (stands in for the `?store` / `?change` transfer). |
no test coverage detected