# -*- Autoconf -*- AT_SETUP([pull of CVS module that has a subdirectory with the same name as the module]) MONOTONE_SETUP AT_DATA(importme.0, [version 0 of test file ]) AT_DATA(importme.1, [version 1 of test file ]) AT_DATA(importme.2, [version 2 of test file ]) AT_DATA(importme.3, [version 3 of test file ]) AT_DATA(committemplate, [This is my commit template ]) AT_DATA(newrcsinfo, [ALL `pwd`/committemplate ]) TSHA0=`SHA1(importme.0)` TSHA1=`SHA1(importme.1)` TSHA2=`SHA1(importme.2)` TSHA3=`SHA1(importme.3)` # build the cvs repository CVSROOT=`pwd`/cvs-repository AT_CHECK(cvs -q -d $CVSROOT init) AT_CHECK(test -e $CVSROOT) AT_CHECK(test -e $CVSROOT/CVSROOT) AT_CHECK(test -e $CVSROOT/CVSROOT/history) # check out the working copy and make some commits AT_CHECK(cvs -d $CVSROOT co ., [], [ignore], [ignore]) AT_CHECK(mkdir testdir) AT_CHECK(cp importme.0 testdir/importme) AT_CHECK(cvs -d $CVSROOT add testdir, [], [ignore], [ignore]) AT_CHECK(cvs -d $CVSROOT add testdir/importme, [], [ignore], [ignore]) AT_CHECK(cvs -d $CVSROOT commit -m 'commit 0' testdir/importme, [], [ignore], [ignore]) AT_CHECK(cp importme.1 testdir/importme) AT_CHECK(cvs -d $CVSROOT commit -m 'commit 1' testdir/importme, [], [ignore], [ignore]) AT_CHECK(cp importme.2 testdir/importme) AT_CHECK(cvs -d $CVSROOT commit -m 'commit 2' testdir/importme, [], [ignore], [ignore]) AT_CHECK(mkdir testdir/testdir, [], [ignore], [ignore]) AT_CHECK(cp importme.3 testdir/testdir/importme) AT_CHECK(cvs -d $CVSROOT add testdir/testdir, [], [ignore], [ignore]) AT_CHECK(cvs -d $CVSROOT add testdir/testdir/importme, [], [ignore], [ignore]) AT_CHECK(cvs -d $CVSROOT commit -m 'commit 3' testdir/, [], [ignore], [ignore]) # pull into monotone AT_CHECK(MONOTONE --branch=testbranch cvs_pull $CVSROOT testdir, [], [ignore], [ignore]) # check presence of files AT_CHECK(MONOTONE cat file $TSHA0, [], [ignore]) AT_CHECK(MONOTONE cat file $TSHA1, [], [ignore]) AT_CHECK(MONOTONE cat file $TSHA2, [], [ignore]) AT_CHECK(MONOTONE cat file $TSHA3, [], [ignore]) # also check that history is okay -- has a unique head, and it's the # right one. AT_CHECK(MONOTONE checkout --branch=testbranch mtcodir, [], [ignore], [ignore]) AT_CHECK(cmp importme.3 mtcodir/importme) AT_CLEANUP