monotone

monotone Commit Details

Date:2007-03-17 06:24:25 (12 years 3 months ago)
Author:Derek Scherger
Branch:net.venge.monotone.experiment.commands-with-dashes
Commit:9f1751a31dce3c8f8a791f8cce8e648ef10530d4
Parents: 54d945669dd3d57b33066657f8be845b0081a65c
Message: * replace underscores with dashes in remaining automate tests

Changes:
Mtests/automate_ancestry_difference/__driver__.lua (1 diff)
Mtests/automate_common_ancestors/__driver__.lua (1 diff)
Mtests/automate_content_diff/__driver__.lua (2 diffs)
Mtests/automate_db_set,get/__driver__.lua (1 diff)
Mtests/automate_erase_ancestors/__driver__.lua (2 diffs)
Mtests/automate_get_base_revision_id/__driver__.lua (2 diffs)
Mtests/automate_get_content_changed/__driver__.lua (1 diff)
Mtests/automate_get_corresponding_path/__driver__.lua (2 diffs)
Mtests/automate_get_current_revision_id/__driver__.lua (1 diff)
Mtests/automate_get_file,_automate_get_file_of/__driver__.lua (2 diffs)
Mtests/automate_get_manifest_of/__driver__.lua (1 diff)
Mtests/automate_get_revision/__driver__.lua (1 diff)
Mtests/automate_interface_version/__driver__.lua (1 diff)
Mtests/automate_put_file/__driver__.lua (2 diffs)
Mtests/automate_put_revision/__driver__.lua (2 diffs)
Mtests/automate_put_revision_for_merge/__driver__.lua (2 diffs)
Mtests/automate_put_revision_unknown_file/__driver__.lua (2 diffs)
Mtests/automate_stdio_options/__driver__.lua (1 diff)

File differences

tests/automate_ancestry_difference/__driver__.lua
1313
1414
1515
16
17
16
17
1818
19
20
21
22
23
24
25
26
27
28
19
20
21
22
23
24
25
26
27
28
2929
3030
31
32
31
32
3333
revs = make_graph()
-- Now do some checks
check(mtn("automate", "ancestry_difference", "c7539264e83c5d6af4c792f079b5d46e9c128665"), 1, false, false)
check(mtn("automate", "ancestry_difference", revs.a, "c7539264e83c5d6af4c792f079b5d46e9c128665"), 1, false, false)
check(mtn("automate", "ancestry-difference", "c7539264e83c5d6af4c792f079b5d46e9c128665"), 1, false, false)
check(mtn("automate", "ancestry-difference", revs.a, "c7539264e83c5d6af4c792f079b5d46e9c128665"), 1, false, false)
revmap("ancestry_difference", {revs.a}, {revs.a})
revmap("ancestry_difference", {revs.a, revs.a}, {})
revmap("ancestry_difference", {revs.a, revs.b}, {})
revmap("ancestry_difference", {revs.a, revs.f}, {})
revmap("ancestry_difference", {revs.f, revs.f}, {})
revmap("ancestry_difference", {revs.b, revs.a}, {revs.b})
revmap("ancestry_difference", {revs.b}, {revs.a, revs.b}, false)
revmap("ancestry_difference", {revs.f, revs.d, revs.e}, {revs.f}, false)
revmap("ancestry_difference", {revs.f, revs.e}, {revs.d, revs.f}, false)
revmap("ancestry_difference", {revs.b, revs.f}, {revs.b})
revmap("ancestry-difference", {revs.a}, {revs.a})
revmap("ancestry-difference", {revs.a, revs.a}, {})
revmap("ancestry-difference", {revs.a, revs.b}, {})
revmap("ancestry-difference", {revs.a, revs.f}, {})
revmap("ancestry-difference", {revs.f, revs.f}, {})
revmap("ancestry-difference", {revs.b, revs.a}, {revs.b})
revmap("ancestry-difference", {revs.b}, {revs.a, revs.b}, false)
revmap("ancestry-difference", {revs.f, revs.d, revs.e}, {revs.f}, false)
revmap("ancestry-difference", {revs.f, revs.e}, {revs.d, revs.f}, false)
revmap("ancestry-difference", {revs.b, revs.f}, {revs.b})
acdef = {revs.a, revs.c, revs.d, revs.e, revs.f}
acedf = {revs.a, revs.c, revs.e, revs.d, revs.f}
x = pcall(revmap, "ancestry_difference", {revs.f}, acdef, false)
y = pcall(revmap, "ancestry_difference", {revs.f}, acedf, false)
x = pcall(revmap, "ancestry-difference", {revs.f}, acdef, false)
y = pcall(revmap, "ancestry-difference", {revs.f}, acedf, false)
check(x or y)
tests/automate_common_ancestors/__driver__.lua
1212
1313
1414
15
15
1616
17
17
1818
1919
20
21
22
23
24
25
26
27
20
21
22
23
24
25
26
27
revs = make_graph()
-- Now do some checks
check(mtn("automate", "common_ancestors",
check(mtn("automate", "common-ancestors",
"c7539264e83c5d6af4c792f079b5d46e9c128665"), 1, false, false)
check(mtn("automate", "common_ancestors", revs.a,
check(mtn("automate", "common-ancestors", revs.a,
"c7539264e83c5d6af4c792f079b5d46e9c128665"), 1, false, false)
revmap("common_ancestors", {revs.a}, {revs.a})
revmap("common_ancestors", {revs.a, revs.a}, {revs.a})
revmap("common_ancestors", {revs.a, revs.b}, {revs.a})
revmap("common_ancestors", {revs.a, revs.f}, {revs.a})
revmap("common_ancestors", {revs.f, revs.f}, {revs.a, revs.c, revs.d, revs.e, revs.f})
revmap("common_ancestors", {revs.b, revs.f}, {revs.a})
revmap("common_ancestors", {revs.f, revs.d, revs.e}, {revs.a, revs.c})
revmap("common_ancestors", {revs.b, revs.e}, {revs.a})
revmap("common-ancestors", {revs.a}, {revs.a})
revmap("common-ancestors", {revs.a, revs.a}, {revs.a})
revmap("common-ancestors", {revs.a, revs.b}, {revs.a})
revmap("common-ancestors", {revs.a, revs.f}, {revs.a})
revmap("common-ancestors", {revs.f, revs.f}, {revs.a, revs.c, revs.d, revs.e, revs.f})
revmap("common-ancestors", {revs.b, revs.f}, {revs.a})
revmap("common-ancestors", {revs.f, revs.d, revs.e}, {revs.a, revs.c})
revmap("common-ancestors", {revs.b, revs.e}, {revs.a})
tests/automate_content_diff/__driver__.lua
22
33
44
5
5
66
77
88
9
9
1010
1111
1212
1313
1414
15
15
1616
1717
1818
......
2626
2727
2828
29
29
3030
31
31
3232
3333
3434
35
35
3636
mtn_setup()
-- check output if there are no changes
check(mtn("automate", "content_diff"), 0, true, true)
check(mtn("automate", "content-diff"), 0, true, true)
check(fsize("stdout") == 0 and fsize("stderr") == 0)
-- check non-existing path
check(mtn("automate", "content_diff", "non_existing"), 1, true, true)
check(mtn("automate", "content-diff", "non_existing"), 1, true, true)
-- check existing path against current workspace
addfile("existing", "foo bar")
-- do not restrict here, since '' (the root) has not yet been committed
check(mtn("automate", "content_diff"), 0, true, true)
check(mtn("automate", "content-diff"), 0, true, true)
check(fsize("stdout") ~= 0)
-- add three more revisions and test for correct revid handling
R3=base_revision()
-- one and two revisions should work
check(mtn("automate", "content_diff", "-r", R1), 0, true, true)
check(mtn("automate", "content-diff", "-r", R1), 0, true, true)
check(fsize("stdout") ~= 0)
check(mtn("automate", "content_diff", "-r", R1, "-r", R2), 0, true, true)
check(mtn("automate", "content-diff", "-r", R1, "-r", R2), 0, true, true)
check(fsize("stdout") ~= 0)
-- three and more should not
check(mtn("automate", "content_diff", "-r", R1, "-r", R2, "-r", R3), 1, true, true)
check(mtn("automate", "content-diff", "-r", R1, "-r", R2, "-r", R3), 1, true, true)
tests/automate_db_set,get/__driver__.lua
33
44
55
6
6
77
88
9
9
1010
1111
1212
13
13
writefile("empty", "")
writefile("expected", "testvalue")
check(mtn("automate", "db_set", "testdomain", "testname", "testvalue"), 0, true, false)
check(mtn("automate", "db-set", "testdomain", "testname", "testvalue"), 0, true, false)
check(samefile("empty", "stdout"))
check(mtn("automate", "db_get", "testdomain", "testname"), 0, true, false)
check(mtn("automate", "db-get", "testdomain", "testname"), 0, true, false)
check(samefile("expected", "stdout"))
-- ensure that missing names fail
check(mtn("automate", "db_get", "testdomain", "testname2"), 1, true, false)
check(mtn("automate", "db-get", "testdomain", "testname2"), 1, true, false)
tests/automate_erase_ancestors/__driver__.lua
11
22
33
4
4
55
66
77
......
1616
1717
1818
19
19
2020
21
21
2222
23
24
25
23
24
25
2626
27
28
29
30
27
28
29
30
mtn_setup()
check(mtn("automate", "erase_ancestors", "c7539264e83c5d6af4c792f079b5d46e9c128665"), 1, false, false)
check(mtn("automate", "erase-ancestors", "c7539264e83c5d6af4c792f079b5d46e9c128665"), 1, false, false)
-- A
-- / \
-- Now do some checks
revmap("erase_ancestors", {}, {})
revmap("erase-ancestors", {}, {})
for _,x in pairs(revs) do
revmap("erase_ancestors", {x}, {x})
revmap("erase-ancestors", {x}, {x})
end
revmap("erase_ancestors", {revs.a, revs.b}, {revs.b})
revmap("erase_ancestors", {revs.a, revs.c}, {revs.c})
revmap("erase_ancestors", {revs.a, revs.f}, {revs.f})
revmap("erase-ancestors", {revs.a, revs.b}, {revs.b})
revmap("erase-ancestors", {revs.a, revs.c}, {revs.c})
revmap("erase-ancestors", {revs.a, revs.f}, {revs.f})
revmap("erase_ancestors", {revs.b, revs.c}, {revs.b, revs.c})
revmap("erase_ancestors", {revs.a, revs.b, revs.c}, {revs.b, revs.c})
revmap("erase_ancestors", {revs.b, revs.f}, {revs.b, revs.f})
revmap("erase_ancestors", {revs.a, revs.b, revs.f}, {revs.b, revs.f})
revmap("erase-ancestors", {revs.b, revs.c}, {revs.b, revs.c})
revmap("erase-ancestors", {revs.a, revs.b, revs.c}, {revs.b, revs.c})
revmap("erase-ancestors", {revs.b, revs.f}, {revs.b, revs.f})
revmap("erase-ancestors", {revs.a, revs.b, revs.f}, {revs.b, revs.f})
tests/automate_get_base_revision_id/__driver__.lua
1313
1414
1515
16
16
1717
1818
1919
......
2222
2323
2424
25
25
2626
2727
2828
2929
3030
3131
32
32
3333
-- check an empty base revision id
check(mtn("automate", "get_base_revision_id"), 0, true, false)
check(mtn("automate", "get-base-revision-id"), 0, true, false)
check(trim(readfile("stdout")) == extract_base_revision())
addfile("foo", "this is file foo")
commit()
check(mtn("automate", "get_base_revision_id"), 0, true, false)
check(mtn("automate", "get-base-revision-id"), 0, true, false)
check(trim(readfile("stdout")) == extract_base_revision())
-- check that pending changes don't affect the base revision id
addfile("foo", "this is foo")
check(mtn("automate", "get_base_revision_id"), 0, true, false)
check(mtn("automate", "get-base-revision-id"), 0, true, false)
check(trim(readfile("stdout")) == extract_base_revision())
tests/automate_get_content_changed/__driver__.lua
1010
1111
1212
13
13
1414
1515
1616
rev = base_revision()
-- check that a correct usage produces correctly formatted output
check(mtn("automate", "get_content_changed", rev, "foo"), 0, true, false)
check(mtn("automate", "get-content-changed", rev, "foo"), 0, true, false)
canonicalize("stdout")
check(samefile("expected", "stdout"))
tests/automate_get_corresponding_path/__driver__.lua
1616
1717
1818
19
19
2020
2121
2222
......
2525
2626
2727
28
28
2929
3030
3131
rev = base_revision()
-- file foo has been renamed to foo2, in the new revision we should be able to find the old name
check(mtn("automate", "get_corresponding_path", rev, "foo2", old_rev), 0, true, false)
check(mtn("automate", "get-corresponding-path", rev, "foo2", old_rev), 0, true, false)
canonicalize("stdout")
check(samefile("expected", "stdout"))
check(mtn("commit", "--date=2005-05-21T12:30:51",
"--branch=testbranch", "--message=blah-blah"), 0, false, false)
rev = base_revision()
check(mtn("automate", "get_corresponding_path", rev, "foo3", old_rev), 0, true, false)
check(mtn("automate", "get-corresponding-path", rev, "foo3", old_rev), 0, true, false)
canonicalize("stdout")
check(samefile("expected2", "stdout"))
tests/automate_get_current_revision_id/__driver__.lua
22
33
44
5
5
66
7
7
88
99
1010
mtn_setup()
function chk()
check(mtn("automate", "get_current_revision_id"), 0, true, false)
check(mtn("automate", "get-current-revision-id"), 0, true, false)
rename("stdout", "current")
check(mtn("automate", "get_revision"), 0, true)
check(mtn("automate", "get-revision"), 0, true)
check(mtn("identify"), 0, true, nil, {"stdout"})
check(trim(readfile("current")) == trim(readfile("stdout")))
end
tests/automate_get_file,_automate_get_file_of/__driver__.lua
1515
1616
1717
18
18
1919
2020
2121
2222
23
23
2424
2525
2626
27
27
2828
2929
3030
......
3232
3333
3434
35
35
3636
3737
3838
3939
40
40
4141
4242
4343
44
44
4545
4646
4747
4848
4949
5050
51
51
5252
5353
5454
--
-- check that a correct usage produces correctly formatted output
check(mtn("automate", "get_file", fileid), 0, true, false)
check(mtn("automate", "get-file", fileid), 0, true, false)
canonicalize("stdout")
check(samefile("expected", "stdout"))
-- ensure that missing revisions fail
check(mtn("automate", "get_file", string.rep("0", 40)), 1, true, false)
check(mtn("automate", "get-file", string.rep("0", 40)), 1, true, false)
check(fsize("stdout") == 0)
-- ensure that revisions are not being completed
check(mtn("automate", "get_file", string.sub(fileid, 1, 30)), 1, true, false)
check(mtn("automate", "get-file", string.sub(fileid, 1, 30)), 1, true, false)
check(fsize("stdout") == 0)
--
--
-- check if the file is properly outputted
check(mtn("automate", "get_file_of", "foo"), 0, true, false)
check(mtn("automate", "get-file-of", "foo"), 0, true, false)
canonicalize("stdout")
check(samefile("expected", "stdout"))
-- ensure that unknown paths fail
check(mtn("automate", "get_file_of", "bar"), 1, true, false)
check(mtn("automate", "get-file-of", "bar"), 1, true, false)
check(fsize("stdout") == 0)
-- ensure that unknown revisions fail
check(mtn("automate", "get_file_of", "-r", string.rep("0", 40), filename), 1, true, false)
check(mtn("automate", "get-file-of", "-r", string.rep("0", 40), filename), 1, true, false)
check(fsize("stdout") == 0)
-- ensure that a former revision's file contents are readable as well
writefile("foo", "foobar\n");
commit()
rev2 = base_revision()
check(mtn("automate", "get_file_of", "-r", rev1, "foo"), 0, true, false)
check(mtn("automate", "get-file-of", "-r", rev1, "foo"), 0, true, false)
canonicalize("stdout")
check(samefile("expected", "stdout"))
tests/automate_get_manifest_of/__driver__.lua
1010
1111
1212
13
13
1414
1515
1616
1717
18
18
1919
2020
2121
2222
23
23
2424
2525
2626
27
27
2828
2929
3030
3131
32
32
3333
3434
rev = base_revision()
-- check that a correct usage produces correctly formatted output
check(mtn("automate", "get_manifest_of", rev), 0, true, false)
check(mtn("automate", "get-manifest-of", rev), 0, true, false)
canonicalize("stdout")
check(samefile("expected", "stdout"))
-- should work even if we don't specify the manifest ID
check(mtn("automate", "get_manifest_of"), 0, true, false)
check(mtn("automate", "get-manifest-of"), 0, true, false)
canonicalize("stdout")
check(samefile("expected", "stdout"))
-- ensure that missing revisions fail
check(mtn("automate", "get_manifest_of", string.rep("0", 40)), 1, true, false)
check(mtn("automate", "get-manifest-of", string.rep("0", 40)), 1, true, false)
check(fsize("stdout") == 0)
-- ensure that revisions are not being completed
check(mtn("automate", "get_revision", string.sub(rev, 1, 30)), 1, true, false)
check(mtn("automate", "get-revision", string.sub(rev, 1, 30)), 1, true, false)
check(fsize("stdout") == 0)
-- check that modified working copy manifest is correct
writefile("foo", "bla bla\n")
check(mtn("automate", "get_manifest_of"), 0, true, false)
check(mtn("automate", "get-manifest-of"), 0, true, false)
canonicalize("stdout")
check(samefile("expected2", "stdout"))
tests/automate_get_revision/__driver__.lua
1010
1111
1212
13
13
1414
1515
1616
1717
18
18
1919
2020
2121
2222
23
23
2424
2525
2626
27
27
2828
base = base_revision()
-- check that a correct usage produces correctly formatted output
check(mtn("automate", "get_revision", base), 0, true, false)
check(mtn("automate", "get-revision", base), 0, true, false)
canonicalize("stdout")
check(samefile("expected", "stdout"))
-- should work even if we don't specify the revision
check(mtn("automate", "get_revision"), 0, true, false)
check(mtn("automate", "get-revision"), 0, true, false)
canonicalize("stdout")
check(samefile("expected2", "stdout"))
-- ensure that missing revisions fail
check(mtn("automate", "get_file", string.rep("0", 40)), 1, true, false)
check(mtn("automate", "get-file", string.rep("0", 40)), 1, true, false)
check(fsize("stdout") == 0)
-- ensure that revisions are not being completed
check(mtn("automate", "get_file", string.sub(base, 1, 30)), 1, true, false)
check(mtn("automate", "get-file", string.sub(base, 1, 30)), 1, true, false)
check(fsize("stdout") == 0)
tests/automate_interface_version/__driver__.lua
11
22
33
4
45
6
7
58
69
710
mtn_setup()
-- check the old underscore command name first to ensure both names are valid
check(mtn("automate", "interface_version"), 0, true, false)
check(mtn("automate", "interface-version"), 0, true, false)
rename("stdout", "a_v")
-- MinGW's wc produces " 1" as output. Arithmetic comparison works, string comparison doesn't
tests/automate_put_file/__driver__.lua
77
88
99
10
11
10
11
1212
1313
14
14
1515
1616
1717
1818
1919
2020
21
21
2222
2323
2424
25
25
2626
2727
2828
2929
3030
3131
32
32
3333
3434
3535
3636
3737
38
38
3939
4040
4141
4242
4343
44
44
4545
4646
4747
......
4949
5050
5151
52
52
writefile("expected2", contents2)
-- check we error on wrong number of args
check(mtn("automate", "put_file"), 1, false, false)
check(mtn("automate", "put_file", "a", "b", "c"), 1, false, false)
check(mtn("automate", "put-file"), 1, false, false)
check(mtn("automate", "put-file", "a", "b", "c"), 1, false, false)
-- check actually putting a file in
check(mtn("automate", "put_file", contents), 0, true, false)
check(mtn("automate", "put-file", contents), 0, true, false)
canonicalize("stdout")
file = "4cbd040533a2f43fc6691d773d510cda70f4126a"
result = readfile("stdout")
check(result == file.."\n")
-- check that the file is there
check(mtn("automate", "get_file", file), 0, true, false)
check(mtn("automate", "get-file", file), 0, true, false)
canonicalize("stdout")
check(samefile("expected", "stdout"))
check(mtn("automate", "put_file", file, contents2), 0, true, false)
check(mtn("automate", "put-file", file, contents2), 0, true, false)
canonicalize("stdout")
file2 = "ea2e27149f06a6519aa46084da815265c10b0a2a"
result = readfile("stdout")
check(result == file2.."\n")
-- check that the file is there
check(mtn("automate", "get_file", file2), 0, true, false)
check(mtn("automate", "get-file", file2), 0, true, false)
canonicalize("stdout")
check(samefile("expected2", "stdout"))
-- check that nothing blows up if we feed it a file for a second time (with or
-- without a delta base)
check(mtn("automate", "put_file", contents2), 0, true, false)
check(mtn("automate", "put-file", contents2), 0, true, false)
canonicalize("stdout")
file2 = "ea2e27149f06a6519aa46084da815265c10b0a2a"
result = readfile("stdout")
check(result == file2.."\n")
check(mtn("automate", "put_file", file, contents2), 0, true, false)
check(mtn("automate", "put-file", file, contents2), 0, true, false)
canonicalize("stdout")
file2 = "ea2e27149f06a6519aa46084da815265c10b0a2a"
result = readfile("stdout")
-- check that things _do_ blow up if we feed it a file with a non-existent
-- base (even if we already have the file we are trying to write!)
check(mtn("automate", "put_file", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", contents2), 1, true, false)
check(mtn("automate", "put-file", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", contents2), 1, true, false)
tests/automate_put_revision/__driver__.lua
22
33
44
5
5
66
77
88
99
1010
11
11
1212
1313
1414
......
2828
2929
3030
31
31
3232
33
33
3434
35
35
3636
37
37
rev = "format_version \"1\"\n\nnew_manifest [0000000000000000000000000000000000000004]\n\nold_revision []\n\nadd_dir \"\"\n\nadd_file \"foo\"\n content [5bf1fd927dfb8679496a2e6cf00cbe50c1c87145]\n"
check(mtn("automate", "put_file", "blah"), 0, true, false)
check(mtn("automate", "put-file", "blah"), 0, true, false)
canonicalize("stdout")
file = "5bf1fd927dfb8679496a2e6cf00cbe50c1c87145"
result = readfile("stdout")
check(result == file.."\n")
check(mtn("automate", "put_revision", rev), 0, true, false)
check(mtn("automate", "put-revision", rev), 0, true, false)
canonicalize("stdout")
rev = "4c2c1d846fa561601254200918fba1fd71e6795d"
result = readfile("stdout")
-- I'm trying to re-add a file which already exists
--
rev = "format_version \"1\"\n\nnew_manifest [0000000000000000000000000000000000000000]\n\nold_revision [4c2c1d846fa561601254200918fba1fd71e6795d]\n\nadd_file \"foo\"\n content [5bf1fd927dfb8679496a2e6cf00cbe50c1c87145]\n"
check(mtn("automate", "put_revision", rev), 3, false, false)
check(mtn("automate", "put-revision", rev), 3, false, false)
-- but this should work (tests that we can use put_revision to commit a
-- but this should work (tests that we can use put-revision to commit a
-- single-parent revision)
check(mtn("automate", "put_file", ""), 0, false, false)
check(mtn("automate", "put-file", ""), 0, false, false)
rev = "format_version \"1\"\n\nnew_manifest [0000000000000000000000000000000000000000]\n\nold_revision [4c2c1d846fa561601254200918fba1fd71e6795d]\n\patch \"foo\"\n from [5bf1fd927dfb8679496a2e6cf00cbe50c1c87145] to [da39a3ee5e6b4b0d3255bfef95601890afd80709]\n"
check(mtn("automate", "put_revision", rev), 0, false, false)
check(mtn("automate", "put-revision", rev), 0, false, false)
tests/automate_put_revision_for_merge/__driver__.lua
1
1
22
33
44
......
3434
3535
3636
37
38
37
38
3939
4040
4141
-- test that 'automate put_revision' works for merge revisions
-- test that 'automate put-revision' works for merge revisions
mtn_setup()
addfile("foo", "blah blah parent")
.. "\n"
.. "\n\n\n" -- just for fun
)
check(mtn("automate", "put_file", readfile("foo-merge")), 0, false, false)
check(mtn("automate", "put_revision", revision_text), 0, true, false)
check(mtn("automate", "put-file", readfile("foo-merge")), 0, false, false)
check(mtn("automate", "put-revision", revision_text), 0, true, false)
r_merge = trim(readfile("stdout"))
check(mtn("update", "-r", r_merge, "-b", "asdf"), 0, false, false)
tests/automate_put_revision_unknown_file/__driver__.lua
11
2
2
33
44
55
66
77
88
9
9
1010
1111
1212
......
1515
1616
1717
18
18
--
-- subsequent test for automate put_revision
-- subsequent test for automate put-revision
-- this should error out since the file version for foo.txt is unknown
--
mtn_setup()
-- added files are checked
rev = "format_version \"1\"\n\nnew_manifest [0000000000000000000000000000000000000000]\n\nold_revision []\n\nadd_dir \"\"\n\nadd_file \"foo.txt\"\ncontent [1234567890123456789012345678901234567890]"
check(mtn("automate", "put_revision", rev), 3, false, false)
check(mtn("automate", "put-revision", rev), 3, false, false)
addfile("foo", "asdf")
commit()
-- modified files are also checked
rev = "format_version \"1\"\n\nnew_manifest [0000000000000000000000000000000000000000]\n\nold_revision [" .. rhash .. "]]\n\npatch \"foo\" from [" .. fhash .. "] to [0000000000000000000000000000000000000000]"
check(mtn("automate", "put_revision", rev), 3, false, false)
check(mtn("automate", "put-revision", rev), 3, false, false)
tests/automate_stdio_options/__driver__.lua
2020
2121
2222
23
23
2424
2525
2626
commit("testbranch")
writefile("file", "modified")
diffcmd = "o1:r12:h:testbranche l12:content_diffe"
diffcmd = "o1:r12:h:testbranche l12:content-diffe"
check(mtn("automate", "stdio"), 0, true, false, string.rep(diffcmd, 2))
dat = readfile("stdout")
check(parse_stdio(dat, 0) == parse_stdio(dat, 1))

Archive Download the corresponding diff file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status