# # # add_dir "tests/importing_cvs_successive" # # add_dir "tests/importing_cvs_successive/cvs-repository" # # add_dir "tests/importing_cvs_successive/cvs-repository/test" # # add_dir "tests/importing_cvs_successive/cvs-repository-snap" # # add_dir "tests/importing_cvs_successive/cvs-repository-snap/test" # # add_file "tests/importing_cvs_successive/__driver__.lua" # content [4b56ee0933d553084113ac169b231e9e318e5bf7] # # add_file "tests/importing_cvs_successive/cvs-repository/test/file1,v" # content [49c45d73833067c4e616389ead282acdfa23c16e] # # add_file "tests/importing_cvs_successive/cvs-repository/test/file2,v" # content [c4e4ce68eec5a6249d94e09ac685fd737aca7b1c] # # add_file "tests/importing_cvs_successive/cvs-repository-snap/test/file1,v" # content [5689c1bbb79a31d8101935a206fbb0166dc213ba] # # add_file "tests/importing_cvs_successive/cvs-repository-snap/test/file2,v" # content [16a0fe3d192e4ff4ee278fdfbf161ece56530a8c] # # add_file "tests/importing_cvs_successive/makerepo.sh" # content [5b243d42ca21a666cf4421f72a0064020c3b8a2c] # # patch "rcs_import.cc" # from [38301303620c8ca2652c702ba2e8991f44e1cc65] # to [ca6b7b95004bb3c949d4703fe4b661704f103f6e] # # set "tests/importing_cvs_successive/makerepo.sh" # attr "mtn:execute" # value "true" # ============================================================ --- tests/importing_cvs_successive/__driver__.lua 4b56ee0933d553084113ac169b231e9e318e5bf7 +++ tests/importing_cvs_successive/__driver__.lua 4b56ee0933d553084113ac169b231e9e318e5bf7 @@ -0,0 +1,22 @@ + +mtn_setup() + +-- A first simple test on successive imports from CVS. After +-- importing a first snapshot of a CVS repository, we try to +-- continue the import from that point on. +-- +-- Compared with the first import, this tests addsd a tag to +-- an existing revision, a branch and two new revisions. + + +-- See makerepo.sh on how this repository and the first +-- snapshot was created. +check(get("cvs-repository-snap")) +check(get("cvs-repository")) + +-- import the snapshot +check(mtn("--branch=test", "cvs_import", "cvs-repository-snap/test"), 0, false, false) + +-- then run a consecutive import on the full repository +xfail(mtn("--branch=test", "cvs_import", "cvs-repository/test"), 0, false, false) + ============================================================ --- tests/importing_cvs_successive/cvs-repository/test/file1,v 49c45d73833067c4e616389ead282acdfa23c16e +++ tests/importing_cvs_successive/cvs-repository/test/file1,v 49c45d73833067c4e616389ead282acdfa23c16e @@ -0,0 +1,64 @@ +head 1.2; +access; +symbols + B:1.2.0.2 + TAG_AFTER_SNAPSHOT:1.1 + A:1.1.0.2; +locks; strict; +comment @# @; + + +1.2 +date 2008.01.07.13.04.04; author markus; state Exp; +branches + 1.2.2.1; +next 1.1; +commitid fVry3A2IFDrz1uMs; + +1.1 +date 2008.01.07.13.03.58; author markus; state Exp; +branches; +next ; +commitid rxV61Wehxcpx1uMs; + +1.2.2.1 +date 2008.01.07.13.04.05; author markus; state Exp; +branches; +next ; +commitid 8hBgjx9CdrQz1uMs; + + +desc +@@ + + +1.2 +log address@hidden commit after snapshot +@ +text address@hidden 1.2 of test file1 +@ + + +1.2.2.1 +log address@hidden in branch B after snapshot +@ +text address@hidden 1 +a1 1 +version 1.2.2.1 of test file1 +@ + + +1.1 +log address@hidden import +@ +text address@hidden 1 +a1 1 +version 1.1 of test file1 +@ + ============================================================ --- tests/importing_cvs_successive/cvs-repository/test/file2,v c4e4ce68eec5a6249d94e09ac685fd737aca7b1c +++ tests/importing_cvs_successive/cvs-repository/test/file2,v c4e4ce68eec5a6249d94e09ac685fd737aca7b1c @@ -0,0 +1,64 @@ +head 1.2; +access; +symbols + B:1.2.0.2 + TAG_AFTER_SNAPSHOT:1.1 + A:1.1.0.2; +locks; strict; +comment @# @; + + +1.2 +date 2008.01.07.13.04.04; author markus; state Exp; +branches; +next 1.1; +commitid fVry3A2IFDrz1uMs; + +1.1 +date 2008.01.07.13.03.58; author markus; state Exp; +branches + 1.1.2.1; +next ; +commitid rxV61Wehxcpx1uMs; + +1.1.2.1 +date 2008.01.07.13.03.59; author markus; state Exp; +branches; +next ; +commitid A0FRM68aB1Jx1uMs; + + +desc +@@ + + +1.2 +log address@hidden commit after snapshot +@ +text address@hidden 1.2 of test file2 +@ + + +1.1 +log address@hidden import +@ +text address@hidden 1 +a1 1 +version 1.1 of test file2 +@ + + +1.1.2.1 +log address@hidden in branch A before snapshot +@ +text address@hidden 1 +a1 1 +version 1.1.2.1 of test file2 +@ + ============================================================ --- tests/importing_cvs_successive/cvs-repository-snap/test/file1,v 5689c1bbb79a31d8101935a206fbb0166dc213ba +++ tests/importing_cvs_successive/cvs-repository-snap/test/file1,v 5689c1bbb79a31d8101935a206fbb0166dc213ba @@ -0,0 +1,26 @@ +head 1.1; +access; +symbols + A:1.1.0.2; +locks; strict; +comment @# @; + + +1.1 +date 2008.01.07.13.03.58; author markus; state Exp; +branches; +next ; +commitid rxV61Wehxcpx1uMs; + + +desc +@@ + + +1.1 +log address@hidden import +@ +text address@hidden 1.1 of test file1 +@ ============================================================ --- tests/importing_cvs_successive/cvs-repository-snap/test/file2,v 16a0fe3d192e4ff4ee278fdfbf161ece56530a8c +++ tests/importing_cvs_successive/cvs-repository-snap/test/file2,v 16a0fe3d192e4ff4ee278fdfbf161ece56530a8c @@ -0,0 +1,45 @@ +head 1.1; +access; +symbols + A:1.1.0.2; +locks; strict; +comment @# @; + + +1.1 +date 2008.01.07.13.03.58; author markus; state Exp; +branches + 1.1.2.1; +next ; +commitid rxV61Wehxcpx1uMs; + +1.1.2.1 +date 2008.01.07.13.03.59; author markus; state Exp; +branches; +next ; +commitid A0FRM68aB1Jx1uMs; + + +desc +@@ + + +1.1 +log address@hidden import +@ +text address@hidden 1.1 of test file2 +@ + + +1.1.2.1 +log address@hidden in branch A before snapshot +@ +text address@hidden 1 +a1 1 +version 1.1.2.1 of test file2 +@ + ============================================================ --- tests/importing_cvs_successive/makerepo.sh 5b243d42ca21a666cf4421f72a0064020c3b8a2c +++ tests/importing_cvs_successive/makerepo.sh 5b243d42ca21a666cf4421f72a0064020c3b8a2c @@ -0,0 +1,70 @@ +#!/bin/sh + +CVSROOT=`pwd`/cvs-repository +export CVSROOT +CVSSNAP=`pwd`/cvs-repository-snap +export CVSSNAP + +# deleting the existing cvs-repository and +# snapshots +rm -vrf $CVSROOT +rm -vrf `pwd`/cvs-repository-snap + +# initializing a new repository +cvs init + +# do a full checkout of the repository +mkdir full_checkout +cd full_checkout +cvs co . +mkdir test +cvs add test +cd test + +# checkout the empty repository and commit some files +echo "version 1.1 of test file1" > file1 +echo "version 1.1 of test file2" > file2 +cvs add file1 file2 +cvs commit -m "initial import" file1 file2 + +# now we create a branch A +cvs tag -b A +cvs update -r A + +# a commit in branch A +echo "version 1.1.2.1 of test file2" > file2 +cvs commit -m "commit in branch A before snapshot" file2 + +# go back to the trunk and branch into B +cvs update -A + +sleep 3 + +# take a snapshot of the current repository, to be +# imported in advance. All of the following changes +# to the repository will be imported later on. +cp -auxv ${CVSROOT} ${CVSSNAP} +rm -rf ${CVSSNAP}/CVSROOT + +# add a tag after the snapshot +cvs tag TAG_AFTER_SNAPSHOT + +# a commit touching both files +echo "version 1.2 of test file1" > file1 +echo "version 1.2 of test file2" > file2 +cvs commit -m "first commit after snapshot" file1 file2 + +# also add a new branch here +cvs tag -b B +cvs update -r B + +# a commit in the branch +echo "version 1.2.2.1 of test file1" > file1 +cvs commit -m "commit in branch B after snapshot" file1 + +cd ../.. +rm -rf full_checkout + +# clean up the CVS repository bookkeeping dir +rm -rf cvs-repository/CVSROOT + ============================================================ --- rcs_import.cc 38301303620c8ca2652c702ba2e8991f44e1cc65 +++ rcs_import.cc ca6b7b95004bb3c949d4703fe4b661704f103f6e @@ -2403,8 +2403,14 @@ public: I(pa_deps > 0); I(pb_deps > 0); - I((pa_deps < total_events) || (pb_deps < total_events)); + // FIXME: Hm.. this invariant gets violated, but often with + // total_events == 1. We can't split blobs which + // consist on a single event... + // + // For now, just deactivate the invariant. + // I((pa_deps < total_events) || (pb_deps < total_events)); + if (pa_deps == total_events) { L(FL(" splitting dependencies from path b"));