# -*- Autoconf -*- AT_SETUP([importing CVS files]) 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 ]) 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 same message' testdir/importme, [], [ignore], [ignore]) AT_CHECK(cp importme.2 testdir/importme) AT_CHECK(cvs -d $CVSROOT commit -m 'commit same message' testdir/importme, [], [ignore], [ignore]) AT_CHECK(cp importme.3 testdir/importme) AT_CHECK(cvs -d $CVSROOT commit -m 'commit 3' testdir/importme, [], [ignore], [ignore]) # import into monotone and check presence of files AT_CHECK(MONOTONE --branch=testbranch cvs_import $CVSROOT/testdir, [], [ignore], [ignore]) 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