# # add_file "tests/t_cvspush_loop.at" # # patch "tests/t_cvspush_loop.at" # from [] # to [b8b452cc56c67a7d4d1656175ab189b5a0a7cc60] # # patch "testsuite.at" # from [d115588bb96d7f79d17441916c21474da57a41f9] # to [b4246fe767c197075f4592b287c0f90f8cafd21b] # ======================================================================== --- tests/t_cvspush_loop.at +++ tests/t_cvspush_loop.at b8b452cc56c67a7d4d1656175ab189b5a0a7cc60 @@ -0,0 +1,54 @@ +# -*- Autoconf -*- + +AT_SETUP([CVS push with fork and merge]) + +MONOTONE_SETUP + +AT_DATA(d_a, [A +]) +AT_DATA(d_b, [B +]) +AT_DATA(d_c, [C +]) + +# 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) + +# import a test project + +AT_CHECK(mkdir cvstemp) +AT_CHECK(cp d_a cvstemp/A) +AT_CHECK(cp d_b cvstemp/B) +AT_CHECK([cd cvstemp ; cvs -q -d $CVSROOT import -m 'initial import' test vendor_tag initial_import], [], [ignore], [ignore]) + +# change the repository in various ways + +AT_CHECK([cvs -q -d $CVSROOT co test], [], [ignore], [ignore]) +AT_CHECK([cd test;MONOTONE --root . --branch testbranch cvs_takeover test], [0], [ignore], [ignore]) +AT_CHECK([cp -r test test2]) + +AT_CHECK([cd test;MONOTONE drop A;MONOTONE ci -m "a dropped"], [0], [ignore], [ignore]) +LEFT=`MONOTONE automate heads` + +AT_CHECK([cp d_c test2/C]) +AT_CHECK([cd test2;MONOTONE add C;MONOTONE ci -m "c added"], [0], [ignore], [ignore]) + +AT_CHECK(MONOTONE merge, [0], [ignore], [ignore]) +AT_CHECK(MONOTONE --branch testbranch cvs_push, [0], [ignore], [ignore]) + +# no change yet +AT_CHECK(test -e $CVSROOT/test/A) +AT_CHECK(test ! -e $CVSROOT/test/C) + +AT_CHECK(MONOTONE --revision $LEFT --branch testbranch cvs_push, [0], [ignore], [ignore]) +AT_CHECK(test -e $CVSROOT/test/Attic/A) +AT_CHECK(test -e $CVSROOT/test/C) + +# I refrain to test file contents + +AT_CLEANUP ======================================================================== --- testsuite.at d115588bb96d7f79d17441916c21474da57a41f9 +++ testsuite.at b4246fe767c197075f4592b287c0f90f8cafd21b @@ -611,6 +611,7 @@ m4_include(tests/t_cvspull_committemplate.at) m4_include(tests/t_cvspull_samedirname.at) m4_include(tests/t_cvstakeover_modified.at) +m4_include(tests/t_cvspush_loop.at) m4_include(tests/t_rename_dir_add_dir_with_old_name.at) m4_include(tests/t_rcs_import.at) m4_include(tests/t_cvsimport2.at)