# # old_revision [f4012263f1693501309caa5e50cdad25eaeaaf87] # # patch "tests/t_cvsimport3.at" # from [f986d11da315b23a88364d9ed55b2e702fc21dc5] # to [8103e3b37ed2bc354f2aaa03ad01a41cbfe8c648] # ============================================================ --- tests/t_cvsimport3.at f986d11da315b23a88364d9ed55b2e702fc21dc5 +++ tests/t_cvsimport3.at 8103e3b37ed2bc354f2aaa03ad01a41cbfe8c648 @@ -41,6 +41,11 @@ first changelog entry ]) +AT_DATA(branchlist, [test +test.VENDOR +test.branched +]) + F1SHA0=`SHA1(file1.0)` F1SHA1=`SHA1(file1.1)` F1SHA2=`SHA1(file1.2)` @@ -88,16 +93,18 @@ AT_CHECK(cp changelog.2 testsrc/changelog) AT_CHECK(cd testsrc; cvs -d $CVSROOT commit -m 'commit on mainline after branch', [], [ignore], [ignore]) -# import into monotone and check presence of files - +# import into monotone AT_CHECK(MONOTONE --branch=test cvs_import $CVSROOT/testsrc, [], [ignore], [ignore]) -# also check that checkout is correct -# right one. +# check presence of branches.. +AT_CHECK(MONOTONE list branches, [], [stdout], [ignore]) +AT_CHECK(cmp stdout branchlist) +# ..and files after checkout AT_CHECK(MONOTONE checkout --branch=test maindir, [], [ignore], [ignore]) AT_CHECK(MONOTONE checkout --branch=test.branched branchdir, [], [ignore], [ignore]) +# compare the files with their original versions AT_CHECK(cmp file1.1 maindir/file1) AT_CHECK(cmp file2.0 maindir/file2) AT_CHECK(cmp changelog.2 maindir/changelog) @@ -106,4 +113,9 @@ AT_CHECK(cmp file2.1 branchdir/file2) AT_CHECK(cmp changelog.3 branchdir/changelog) +# get the log of the branch to check for correct branchpoint +AT_CHECK(cd branchdir && MONOTONE log, [], [stdout], [ignore]) +AT_CHECK(grep "commit on branch" stdout, [], [ignore], [ignore]) +AT_CHECK(grep "commit 0" stdout, [1], [ignore], [ignore]) + AT_CLEANUP