# to "tests/a_tricky_cvs_repository_with_tags/cvs-repository" # # rename "tests/cvs_import,_deleted_file_invariant/attest" # to "tests/cvs_import,_deleted_file_invariant/cvs-repository/test" # # rename "tests/cvs_import,_file_dead_on_head_and_branch/cvsfile,v" # to "tests/cvs_import,_file_dead_on_head_and_branch/cvs-repository/test/cvsfile,v" # # rename "tests/importing_a_small,_real_cvs_repository/e" # to "tests/importing_a_small,_real_cvs_repository/cvs-repository" # # rename "tests/test_problematic_cvs_import/rcsfile,v" # to "tests/test_problematic_cvs_import/cvs-repository/test/rcsfile,v" # # add_dir "tests/cvs_import,_deleted_file_invariant/cvs-repository" # # add_dir "tests/cvs_import,_file_dead_on_head_and_branch/cvs-repository" # # add_dir "tests/cvs_import,_file_dead_on_head_and_branch/cvs-repository/test" # # add_dir "tests/test_problematic_cvs_import/cvs-repository" # # add_dir "tests/test_problematic_cvs_import/cvs-repository/test" # # patch "tests/a_tricky_cvs_repository_with_tags/__driver__.lua" # from [cb5c43376f943d2fde1856547a7b199bf5b6c4d7] # to [d3631953afd2ee9a2000dd55d31537b7263be0eb] # # patch "tests/cvs_import,_deleted_file_invariant/__driver__.lua" # from [cece26a0e5e9c432f3a00e149c1387a23d84ab77] # to [77d5fb4f5a6906811c692c23d808bb4b73e5b0d8] # # patch "tests/cvs_import,_file_dead_on_head_and_branch/__driver__.lua" # from [10d69313aa8d96a106fb470e5c6ebb4c61ca6e42] # to [11d555c9da804144b970ddd92332b350b8ee5611] # # patch "tests/importing_a_small,_real_cvs_repository/__driver__.lua" # from [ecf87ca6d14e630bbb4d1b81eb19765aa078835a] # to [4e160d1e01a68084cd29f0603443046e32867bef] # # patch "tests/test_problematic_cvs_import/__driver__.lua" # from [4b0c4000b72d00c9ab28f371bde9730d23ad04a6] # to [6340ee26326384bd4cff3b58bab4330aa4edc777] --- tests/a_tricky_cvs_repository_with_tags/__driver__.lua +++ tests/a_tricky_cvs_repository_with_tags/__driver__.lua @@ -0,0 +1,17 @@ + +mtn_setup() + +check(get("test.manifest")) + +check(get("test.tags")) + +check(get("cvs-repository")) + +check(mtn("--branch=foo.bar", "cvs_import", "cvs-repository"), 0, false, false) +check(mtn("--branch=foo.bar", "checkout"), 0, false, true) +check(indir("foo.bar", mtn("automate", "get_manifest_of")), 0, true) +canonicalize("stdout") +check(samefile("test.manifest", "stdout")) +check(indir("foo.bar", mtn("list", "tags")), 0, true) +canonicalize("stdout") +check(samefile("test.tags", "stdout")) --- tests/cvs_import,_deleted_file_invariant/__driver__.lua +++ tests/cvs_import,_deleted_file_invariant/__driver__.lua @@ -0,0 +1,20 @@ + +mtn_setup() + +check(get("cvs-repository")) + +-- the contents from which we created the test module +writefile("afile", "this is a line of text.\n") +writefile("bfile", "this is some text over here.\n") +writefile("cfile", "what's this? it's a line of text, sir.\n") + +tsha0 = sha1("afile") +tsha1 = sha1("bfile") +tsha2 = sha1("cfile") + +-- import into monotone and check presence of files +check(mtn("--branch=testbranch", "cvs_import", "cvs-repository/test"), 0, false, false) + +check(mtn("automate", "get_file", tsha0), 0, false) +check(mtn("automate", "get_file", tsha1), 0, false) +check(mtn("automate", "get_file", tsha2), 0, false) --- tests/cvs_import,_file_dead_on_head_and_branch/__driver__.lua +++ tests/cvs_import,_file_dead_on_head_and_branch/__driver__.lua @@ -0,0 +1,15 @@ + +mtn_setup() + +check(get("cvs-repository")) + +-- the contents from which we created the test module +writefile("cvsfile", "this is a line of text.\n") + +tsha = sha1("cvsfile") + +-- import into monotone and check presence of files + +check(mtn("--branch=testbranch", "cvs_import", "cvs-repository/test"), 0, false, false) + +check(mtn("automate", "get_file", tsha), 0, false) --- tests/importing_a_small,_real_cvs_repository/__driver__.lua +++ tests/importing_a_small,_real_cvs_repository/__driver__.lua @@ -0,0 +1,12 @@ + +mtn_setup() + +check(get("test.manifest")) + +check(get("cvs-repository")) + +check(mtn("--branch=foo.bar", "cvs_import", "cvs-repository"), 0, false, false) +check(mtn("--branch=foo.bar.disasm-branch", "checkout"), 0, true, true) +check(indir("foo.bar.disasm-branch", mtn("automate", "get_manifest_of")), 0, true) +canonicalize("stdout") +check(samefile("test.manifest", "stdout")) --- tests/test_problematic_cvs_import/__driver__.lua +++ tests/test_problematic_cvs_import/__driver__.lua @@ -0,0 +1,13 @@ + +mtn_setup() + +-- This test imports a rcs file which fails according to the mailing list +-- reporter: Carl Christian Kanne "Bug? in CVS import monotone 0.18" +-- Date: Fri, 15 Apr 2005 12:53:13 +0200 + +-- This test is a bug report. + +-- This rcs file fails to be imported correctly by monotone +check(get("cvs-repository")) + +xfail_if(true, mtn("--branch=test", "cvs_import", "cvs-repository/test"), 0, ignore, ignore)