Source file test_version_control.ml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
open Common
let test_git dir =
let xs = Git.commits ~basedir:dir () in
xs |> List.iter pr2_gen
let actions () = [
"-test_git", " <dir>",
Common.mk_action_1_arg test_git;
"-test_git2", " <dir> <str>",
Common.mk_action_2_arg (fun basedir str ->
let vid =
Lib_vcs.VersionId str
in
pr2_gen vid;
let patch = Git.commit_patch ~basedir vid in
pr2_gen patch;
);
"-test_git3", "<dir>",
Common.mk_action_1_arg (fun basedir ->
let old_id = Git.commit_of_relative_time ~basedir "2 weeks ago" in
let recent_id = Git.commit_of_relative_time ~basedir "1 week ago" in
let commits = Git.commits_between_commitids ~basedir ~old_id ~recent_id in
pr2_gen old_id;
pr2_gen recent_id;
Common2.pr2_xxxxxxxxxxxxxxxxx ();
commits |> List.iter pr2_gen;
)
]