# # # add_dir "tests/importing_cvs_with_conflicting_tag" # # add_dir "tests/importing_cvs_with_conflicting_tag/e" # # add_dir "tests/importing_cvs_with_conflicting_tag/e/testsrc" # # add_dir "tests/importing_cvs_with_multiple_vendor_imports" # # add_file "tests/importing_cvs_with_conflicting_tag/__driver__.lua" # content [597c359c3b1679ff3d151f49ae4c8a66645bb04a] # # add_file "tests/importing_cvs_with_conflicting_tag/e/testsrc/fileA,v" # content [8a698b2dabea6c9d265dda038f96f1ffcc48a39e] # # add_file "tests/importing_cvs_with_conflicting_tag/e/testsrc/fileB,v" # content [d5c7a0ead1ee68b7b61cdaf8422c37ae0396e1e7] # # add_file "tests/importing_cvs_with_multiple_vendor_imports/__driver__.lua" # content [0685248eba04aed8afb872ceda31dcefa8627d2f] # # patch "testsuite.lua" # from [03c5c2e66741d9c903a724f32b54a10626cad79e] # to [0505b18b7e63afd79d9f7dbf7f76c378f6b60e5e] # ============================================================ --- tests/importing_cvs_with_conflicting_tag/__driver__.lua 597c359c3b1679ff3d151f49ae4c8a66645bb04a +++ tests/importing_cvs_with_conflicting_tag/__driver__.lua 597c359c3b1679ff3d151f49ae4c8a66645bb04a @@ -0,0 +1,16 @@ + +mtn_setup() + +check(get("e")) + +check(mtn("--branch=foo.bar", "cvs_import", "e"), 0, false, false) +check(mtn("--branch=foo.bar", "co")) + +check(indir("foo.bar", mtn("list", "known")), 0, true) +check(samelines("stdout", {"t", "t/libasm", "t/libasm/ChangeLog", + "t/libelf-po", "t/libelf-po/POTFILES.in"})) + +check(indir("foo.bar", mtn("list", "tags")), 0, true) +check(grep("initial", "stdout"), 0, false, false) +check(grep("portable-branch-base", "stdout"), 0, false, false) +check(grep("portable-branch-fork", "stdout"), 0, false, false) ============================================================ --- tests/importing_cvs_with_conflicting_tag/e/testsrc/fileA,v 8a698b2dabea6c9d265dda038f96f1ffcc48a39e +++ tests/importing_cvs_with_conflicting_tag/e/testsrc/fileA,v 8a698b2dabea6c9d265dda038f96f1ffcc48a39e @@ -0,0 +1,60 @@ +head 1.2; +access; +symbols + CONFLICTING_TAG:1.2 + initial:1.1.1.1 + Vendor:1.1.1; +locks; strict; +comment @# @; + + +1.2 +date 2006.11.27.19.23.52; author markus; state Exp; +branches; +next 1.1; +commitid lDJggPLUg26ZalWr; + +1.1 +date 2006.11.27.19.23.12; author markus; state Exp; +branches + 1.1.1.1; +next ; +commitid a0SVFdahHdLKalWr; + +1.1.1.1 +date 2006.11.27.19.23.12; author markus; state Exp; +branches; +next ; +commitid a0SVFdahHdLKalWr; + + +desc +@@ + + +1.2 +log address@hidden of fileA. +@ +text address@hidden 1 of fileA. +@ + + +1.1 +log address@hidden revision +@ +text address@hidden 1 +a1 1 +Version 0 of fileA. +@ + + +1.1.1.1 +log address@hidden import +@ +text +@@ ============================================================ --- tests/importing_cvs_with_conflicting_tag/e/testsrc/fileB,v d5c7a0ead1ee68b7b61cdaf8422c37ae0396e1e7 +++ tests/importing_cvs_with_conflicting_tag/e/testsrc/fileB,v d5c7a0ead1ee68b7b61cdaf8422c37ae0396e1e7 @@ -0,0 +1,60 @@ +head 1.2; +access; +symbols + CONFLICTING_TAG:1.1 + initial:1.1.1.1 + Vendor:1.1.1; +locks; strict; +comment @# @; + + +1.2 +date 2006.11.27.19.24.17; author markus; state Exp; +branches; +next 1.1; +commitid 6QlGNK79nLK7blWr; + +1.1 +date 2006.11.27.19.23.12; author markus; state Exp; +branches + 1.1.1.1; +next ; +commitid a0SVFdahHdLKalWr; + +1.1.1.1 +date 2006.11.27.19.23.12; author markus; state Exp; +branches; +next ; +commitid a0SVFdahHdLKalWr; + + +desc +@@ + + +1.2 +log address@hidden of fileB. +@ +text address@hidden 1 of fileB. +@ + + +1.1 +log address@hidden revision +@ +text address@hidden 1 +a1 1 +Version 0 of fileB. +@ + + +1.1.1.1 +log address@hidden import +@ +text +@@ ============================================================ --- tests/importing_cvs_with_multiple_vendor_imports/__driver__.lua 0685248eba04aed8afb872ceda31dcefa8627d2f +++ tests/importing_cvs_with_multiple_vendor_imports/__driver__.lua 0685248eba04aed8afb872ceda31dcefa8627d2f @@ -0,0 +1,52 @@ +include("common/cvs.lua") +mtn_setup() + +writefile("fileA.0", "fileA from VendorA") +writefile("fileA.1", "fileA from VendorA - changed") +writefile("fileB.0", "fileB from VendorB") +writefile("fileB.1", "fileB from VendorB - changed") +writefile("fileC.0", "our own additions") + +cvs_setup() + +-- the first vendor import +mkdir("vendorA_dir") +copy("fileA.0", "vendorA_dir/fileA") +check(indir("vendorA_dir", cvs("import", "-m", "Initial import from VendorA", "testsrc", "VendorA", "VendorA_REL_1")), 0, false, false) + +-- the second vendor import +mkdir("vendorB_dir") +copy("fileB.0", "vendorB_dir/fileB") +check(indir("vendorB_dir", cvs("import", "-m", "Initial import from VendorB", "testsrc", "VendorB", "VendorB_REL_1")), 0, false, false) + +-- checkout the repository and commit some files +check(cvs("co", "testsrc"), 0, false, false) +copy("fileC.0", "testsrc/fileC") +check(indir("testsrc", cvs("add", "fileC")), 0, false, false) +check(indir("testsrc", cvs("commit", "-m", 'commit 0')), 0, false, false) + +-- updates from VendorA +copy("fileA.1", "vendorA_dir/fileA") +check(indir("vendorA_dir", cvs("import", "-m", "Initial import from VendorA", "testsrc", "VendorA", "VendorA_REL_2")), 0, false, false) + +-- updates from VendorB +copy("fileB.1", "vendorB_dir/fileB") +check(indir("vendorB_dir", cvs("import", "-m", "Initial import from VendorA", "-b", "1.1.3", "testsrc", "VendorB", "VendorB_REL_2")), 0, false, false) + +-- import into monotone and check presence of files +check(mtn("--branch=test", "--debug", "cvs_import", cvsroot.."/testsrc"), 0, false, false) + +-- check if all non-empty branches were imported +check(mtn("list", "branches"), 0, true, false) +check(samelines("stdout", {"test", "test.VendorA", "test.VendorB"})) + +check(mtn("checkout", "--branch=test", "maindir"), 0, false, false) +check(samefile("fileA.0", "maindir/fileA")) +check(samefile("fileB.0", "maindir/fileB")) +check(samefile("fileC.0", "maindir/fileC")) + +check(mtn("checkout", "--branch=test.VendorA", "vendorA_co"), 0, false, false) +check(samefile("fileA.1", "vendorA_co/fileA")) + +check(mtn("checkout", "--branch=test.VendorB", "vendorB_co"), 0, false, false) +check(samefile("fileB.1", "vendorB_co/fileB")) ============================================================ --- testsuite.lua 03c5c2e66741d9c903a724f32b54a10626cad79e +++ testsuite.lua 0505b18b7e63afd79d9f7dbf7f76c378f6b60e5e @@ -692,3 +692,5 @@ table.insert(tests, "importing_cvs_branc table.insert(tests, "automate_stdio_options") table.insert(tests, "spawn_redirected_hook_helper") table.insert(tests, "importing_cvs_branches_with_correct_ancestory_2") +table.insert(tests, "importing_cvs_with_multiple_vendor_imports") +table.insert(tests, "importing_cvs_with_conflicting_tag")