# # # add_dir "tests/importing_cvs_with_multiple_vendor_imports/cvs-repository" # # add_dir "tests/importing_cvs_with_multiple_vendor_imports/cvs-repository/test" # # add_file "tests/importing_cvs_with_multiple_vendor_imports/cvs-repository/test/fileA,v" # content [d254a43ea85a1d99df57bbfe209f813c0d11362b] # # add_file "tests/importing_cvs_with_multiple_vendor_imports/cvs-repository/test/fileB,v" # content [6cf1b51748f19e0ecf638d55151ffb87f0fccae7] # # add_file "tests/importing_cvs_with_multiple_vendor_imports/cvs-repository/test/fileC,v" # content [34bd3ac7932954b2f6ccb460eb40c0814a1e849e] # # add_file "tests/importing_cvs_with_multiple_vendor_imports/makerepo.sh" # content [a0aa700e593e7842a99e02d94faf0f70aa376680] # # patch "tests/importing_cvs_with_multiple_vendor_imports/__driver__.lua" # from [a2a3e3c5966ad13654214cb03f0b52ffb43e1cbf] # to [2eb6fc0327e04b38010fdad63f2837a207691f1a] # # set "tests/importing_cvs_with_multiple_vendor_imports/makerepo.sh" # attr "mtn:execute" # value "true" # ============================================================ --- tests/importing_cvs_with_multiple_vendor_imports/cvs-repository/test/fileA,v d254a43ea85a1d99df57bbfe209f813c0d11362b +++ tests/importing_cvs_with_multiple_vendor_imports/cvs-repository/test/fileA,v d254a43ea85a1d99df57bbfe209f813c0d11362b @@ -0,0 +1,62 @@ +head 1.1; +branch 1.1.1; +access; +symbols + VendorA_REL_2:1.1.1.2 + VendorA_REL_1:1.1.1.1 + VendorA:1.1.1; +locks; strict; +comment @# @; + + +1.1 +date 2007.03.10.12.46.47; author markus; state Exp; +branches + 1.1.1.1; +next ; +commitid Ato52FfvuyyuFx9s; + +1.1.1.1 +date 2007.03.10.12.46.47; author markus; state Exp; +branches; +next 1.1.1.2; +commitid Ato52FfvuyyuFx9s; + +1.1.1.2 +date 2007.03.10.12.46.48; author markus; state Exp; +branches; +next ; +commitid ugLDgLG0IeOuFx9s; + + +desc +@@ + + +1.1 +log address@hidden revision +@ +text address@hidden from VendorA +@ + + +1.1.1.1 +log address@hidden import from VendorA +@ +text +@@ + + +1.1.1.2 +log address@hidden import from VendorA +@ +text address@hidden 1 +a1 1 +fileA from VendorA - changed +@ + ============================================================ --- tests/importing_cvs_with_multiple_vendor_imports/cvs-repository/test/fileB,v 6cf1b51748f19e0ecf638d55151ffb87f0fccae7 +++ tests/importing_cvs_with_multiple_vendor_imports/cvs-repository/test/fileB,v 6cf1b51748f19e0ecf638d55151ffb87f0fccae7 @@ -0,0 +1,62 @@ +head 1.1; +branch 1.1.1; +access; +symbols + VendorB_REL_2:1.1.1.2 + VendorB_REL_1:1.1.1.1 + VendorB:1.1.1; +locks; strict; +comment @# @; + + +1.1 +date 2007.03.10.12.46.47; author markus; state Exp; +branches + 1.1.1.1; +next ; +commitid Nh7wAhqgMMzuFx9s; + +1.1.1.1 +date 2007.03.10.12.46.47; author markus; state Exp; +branches; +next 1.1.1.2; +commitid Nh7wAhqgMMzuFx9s; + +1.1.1.2 +date 2007.03.10.12.46.48; author markus; state Exp; +branches; +next ; +commitid I0Bk1uestPUuFx9s; + + +desc +@@ + + +1.1 +log address@hidden revision +@ +text address@hidden from VendorB +@ + + +1.1.1.1 +log address@hidden import from VendorB +@ +text +@@ + + +1.1.1.2 +log address@hidden import from VendorB +@ +text address@hidden 1 +a1 1 +fileB from VendorB - changed +@ + ============================================================ --- tests/importing_cvs_with_multiple_vendor_imports/cvs-repository/test/fileC,v 34bd3ac7932954b2f6ccb460eb40c0814a1e849e +++ tests/importing_cvs_with_multiple_vendor_imports/cvs-repository/test/fileC,v 34bd3ac7932954b2f6ccb460eb40c0814a1e849e @@ -0,0 +1,25 @@ +head 1.1; +access; +symbols; +locks; strict; +comment @# @; + + +1.1 +date 2007.03.10.12.46.47; author markus; state Exp; +branches; +next ; +commitid 7q60H8GdqhwuFx9s; + + +desc +@@ + + +1.1 +log address@hidden 0 +@ +text address@hidden own additions +@ ============================================================ --- tests/importing_cvs_with_multiple_vendor_imports/makerepo.sh a0aa700e593e7842a99e02d94faf0f70aa376680 +++ tests/importing_cvs_with_multiple_vendor_imports/makerepo.sh a0aa700e593e7842a99e02d94faf0f70aa376680 @@ -0,0 +1,47 @@ +#!/bin/sh + +CVSROOT=`pwd`/cvs-repository +export CVSROOT + +# deleting the existing cvs-repository +rm -vrf $CVSROOT + +# initializing a new repository +cvs init + +# the first vendor import +mkdir vendorA_dir +cd vendorA_dir +echo "fileA from VendorA" > fileA +cvs import -m "Initial import from VendorA" test VendorA VendorA_REL_1 +cd .. + +# the second vendor import +mkdir vendorB_dir +cd vendorB_dir +echo "fileB from VendorB" > fileB +cvs import -m "Initial import from VendorB" test VendorB VendorB_REL_1 +cd .. + +# checkout the repository and commit some files +cvs co test +cd test +echo "our own additions" > fileC +cvs add fileC +cvs commit -m "commit 0" + +# updates from VendorA +cd ../vendorA_dir +echo "fileA from VendorA - changed" > fileA +cvs import -m "Initial import from VendorA" test VendorA VendorA_REL_2 + +# updates from VendorB +cd ../vendorB_dir +echo "fileB from VendorB - changed" > fileB +cvs import -m "Initial import from VendorB" test VendorB VendorB_REL_2 + +cd .. +rm -rf test vendorA_dir vendorB_dir + +# clean up the CVS repository bookkeeping dir +rm -rf cvs-repository/CVSROOT ============================================================ --- tests/importing_cvs_with_multiple_vendor_imports/__driver__.lua a2a3e3c5966ad13654214cb03f0b52ffb43e1cbf +++ tests/importing_cvs_with_multiple_vendor_imports/__driver__.lua 2eb6fc0327e04b38010fdad63f2837a207691f1a @@ -1,52 +1,24 @@ -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") +mtn_setup() -cvs_setup() +-- See makerepo.sh on how this repository was created. +check(get("cvs-repository")) --- 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(mtn("--branch=test", "--debug", "cvs_import", "cvs-repository/test"), 0, false, false) -- check if all non-empty branches were imported check(mtn("list", "branches"), 0, true, false) -check(samelines("stdout", {";NONAME", "test", "test.VendorA", "test.VendorB"})) +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(samelines("maindir/fileA", {"fileA from VendorA"})) +check(samelines("maindir/fileB", {"fileB from VendorB"})) +check(samelines("maindir/fileC", {"our own additions"})) check(mtn("checkout", "--branch=test.VendorA", "vendorA_co"), 0, false, false) -check(samefile("fileA.1", "vendorA_co/fileA")) +check(samelines("vendorA_co/fileA", {"fileA from VendorA - changed"})) check(mtn("checkout", "--branch=test.VendorB", "vendorB_co"), 0, false, false) +check(samelines("vendorB_co/fileB", {"fileB from VendorB - changed"})) -check(samefile("fileB.1", "vendorB_co/fileB"))