# # # add_dir "tests/importing_cvs_branches6" # # add_dir "tests/importing_cvs_branches6/cvs-repository" # # add_dir "tests/importing_cvs_branches6/cvs-repository/test" # # add_file "tests/importing_cvs_branches6/__driver__.lua" # content [04fd49f59d02a55d99584d7b99cabf05fe0c004d] # # add_file "tests/importing_cvs_branches6/cvs-repository/test/file1,v" # content [f7a46ddc1d8d359ced548e3af7221c6c74ce2feb] # # add_file "tests/importing_cvs_branches6/cvs-repository/test/file2,v" # content [cb455c724b06ce1f8b3667b9fa9a1fb3d131e715] # ============================================================ --- tests/importing_cvs_branches6/__driver__.lua 04fd49f59d02a55d99584d7b99cabf05fe0c004d +++ tests/importing_cvs_branches6/__driver__.lua 04fd49f59d02a55d99584d7b99cabf05fe0c004d @@ -0,0 +1,48 @@ + +mtn_setup() + +-- Manually created and hand edited CVS repository. +-- +-- Branch layout overview: +-- +-- Root +-- / \ +-- A B +-- +-- The commits in branches A and B both include file1. They have the +-- same timestamp, changelog and author. + +check(get("cvs-repository")) + +writefile("file1-1.1", "version 1.1 of test file1\n") +writefile("file1-1.1.2.1", "version 1.1.2.1 of test file1\n") +writefile("file1-1.1.4.1", "version 1.1.4.1 of test file1\n") + +writefile("file2-1.1", "version 1.1 of test file2\n") +writefile("file2-1.1.2.1", "version 1.1.2.1 of test file2\n") + +-- import into monotone and check presence of files +xfail(mtn("--branch=test", "cvs_import", "--debug", "cvs-repository/test"), 0, false, false) + + +-- check if all non-empty branches were imported +check(mtn("list", "branches"), 0, true, false) +check(samelines("stdout", {"test", "test.A", "test.B"})) + +-- checkout the imported repository into maindir and branchdir +check(mtn("checkout", "--branch=test", "maindir"), 0, false, false) +check(mtn("checkout", "--branch=test.A", "branchA"), 0, false, false) +check(mtn("checkout", "--branch=test.B", "branchB"), 0, false, false) + +-- check for correctness of the files in the main tree +check(samefile("file1-1.1", "maindir/file1")) +check(samefile("file2-1.1", "maindir/file2")) + +-- check for correctness of the files in branch A +check(samefile("file1-1.1.2.1", "branchA/file1")) +check(samefile("file2-1.1.2.1", "branchA/file2")) + +-- check for correctness of the files in branch B +check(samefile("file1-1.1.4.1", "branchB/file1")) +check(samefile("file2-1.1", "branchB/file2")) + ============================================================ --- tests/importing_cvs_branches6/cvs-repository/test/file1,v f7a46ddc1d8d359ced548e3af7221c6c74ce2feb +++ tests/importing_cvs_branches6/cvs-repository/test/file1,v f7a46ddc1d8d359ced548e3af7221c6c74ce2feb @@ -0,0 +1,64 @@ +head 1.1; +access; +symbols + B:1.1.0.4 + A:1.1.0.2; +locks; strict; +comment @# @; + + +1.1 +date 2008.07.15.09.30.33; author markus; state Exp; +branches + 1.1.2.1 + 1.1.4.1; +next ; +commitid YhQRkAGdmjFFJSat; + +1.1.2.1 +date 2008.07.15.09.30.36; author markus; state Exp; +branches; +next ; +commitid MG7vILAUi6RFJSat; + +1.1.4.1 +date 2008.07.15.09.30.36; author markus; state Exp; +branches; +next ; +commitid FA9N273N6ETGJSat; + + +desc +@@ + + +1.1 +log address@hidden import +@ +text address@hidden 1.1 of test file1 +@ + + +1.1.4.1 +log address@hidden commit +@ +text address@hidden 1 +a1 1 +version 1.1.4.1 of test file1 +@ + + +1.1.2.1 +log address@hidden commit +@ +text address@hidden 1 +a1 1 +version 1.1.2.1 of test file1 +@ + ============================================================ --- tests/importing_cvs_branches6/cvs-repository/test/file2,v cb455c724b06ce1f8b3667b9fa9a1fb3d131e715 +++ tests/importing_cvs_branches6/cvs-repository/test/file2,v cb455c724b06ce1f8b3667b9fa9a1fb3d131e715 @@ -0,0 +1,46 @@ +head 1.1; +access; +symbols + B:1.1.0.4 + A:1.1.0.2; +locks; strict; +comment @# @; + + +1.1 +date 2008.07.15.09.30.33; author markus; state Exp; +branches + 1.1.2.1; +next ; +commitid YhQRkAGdmjFFJSat; + +1.1.2.1 +date 2008.07.15.09.30.36; author markus; state Exp; +branches; +next ; +commitid MG7vILAUi6RFJSat; + + +desc +@@ + + +1.1 +log address@hidden import +@ +text address@hidden 1.1 of test file2 +@ + + +1.1.2.1 +log address@hidden commit +@ +text address@hidden 1 +a1 1 +version 1.1.2.1 of test file2 +@ +