# # # add_file "tests/t_pivot_root_update.at" # content [e4f51059ec68ec4f187cd3593eeb49459aea3b5a] # # patch "testsuite.at" # from [fb520b91b69e64420a86ee9c4492d8dc337ae842] # to [6f767f34cccc3b76d3c43314b3202e638f934fef] # ============================================================ --- tests/t_pivot_root_update.at e4f51059ec68ec4f187cd3593eeb49459aea3b5a +++ tests/t_pivot_root_update.at e4f51059ec68ec4f187cd3593eeb49459aea3b5a @@ -0,0 +1,49 @@ +AT_SETUP([updating through a pivot_root]) +MONOTONE_SETUP + +AT_CHECK(mkdir workspace) +AT_CHECK(cd workspace/ && MONOTONE setup -b testbranch, [], [ignore], [ignore]) + +AT_CHECK(mkdir workspace/dir1) +AT_DATA(workspace/old_root_file, [I'm in the root to start off with! +]) +AT_DATA(workspace/dir1/new_root_file, [I'm in the subdir to start off with. +]) +AT_CHECK(cd workspace/ && MONOTONE add ., [], [ignore], [ignore]) +AT_CHECK(cd workspace/ && MONOTONE commit -m foo, [], [ignore], [ignore]) +BASE_REV=`cat workspace/MT/revision` + +AT_CHECK(cd workspace/ && MONOTONE pivot_root --execute dir1 old_root, [], [ignore], [ignore]) +AT_CHECK(cd workspace/ && MONOTONE commit -m foo, [], [ignore], [ignore]) + +AT_CHECK(MONOTONE co -r $BASE_REV testspace, [], [ignore], [ignore]) +AT_DATA(new_old_root_file, [old root file modified +]) +AT_DATA(new_new_root_file, [new root file modified +]) +AT_DATA(new_unversioned_root_file, [newly placed in root dir, unversioned +]) +AT_DATA(new_unversioned_subdir_file, [newly placed in sub dir, unversioned +]) +AT_DATA(new_versioned_root_file, [newly placed in root dir, versioned +]) +AT_DATA(new_versioned_subdir_file, [newly placed in sub dir, versioned +]) +AT_CHECK(cp new_old_root_file testspace/old_root_file) +AT_CHECK(cp new_new_root_file testspace/dir1/new_root_file) +AT_CHECK(cp new_unversioned_root_file testspace) +AT_CHECK(cp new_unversioned_subdir_file testspace/dir1) +AT_CHECK(cp new_versioned_root_file testspace) +AT_CHECK(cp new_versioned_subdir_file testspace/dir1) + +AT_CHECK(cd testspace/ && MONOTONE add new_versioned_root_file dir1/new_versioned_subdir_file, [], [ignore], [ignore]) +AT_CHECK(cd testspace/ && MONOTONE update, [], [ignore], [ignore]) + +AT_CHECK(cmp new_old_root_file testspace/old_root/old_root_file) +AT_CHECK(cmp new_new_root_file testspace/new_root_file) +AT_CHECK(cmp new_unversioned_root_file testspace/old_root/new_unversioned_root_file) +AT_CHECK(cmp new_unversioned_subdir_file testspace/new_unversioned_subdir_file) +AT_CHECK(cmp new_versioned_root_file testspace/old_root/new_versioned_root_file) +AT_CHECK(cmp new_versioned_subdir_file testspace/new_versioned_subdir_file) + +AT_CLEANUP ============================================================ --- testsuite.at fb520b91b69e64420a86ee9c4492d8dc337ae842 +++ testsuite.at 6f767f34cccc3b76d3c43314b3202e638f934fef @@ -782,3 +782,4 @@ m4_include(tests/t_log_selectors.at) m4_include(tests/t_pivot_root.at) m4_include(tests/t_pivot_root_revert.at) +m4_include(tests/t_pivot_root_update.at)