# # add_file "tests/t_update_switch_branch.at" # # patch "ChangeLog" # from [4ca6fa045ed15d09601de1e788e2c2b362d3f5f6] # to [8856aa5720ebdc03daedfededbe2d49fef2c3e90] # # patch "tests/t_update_switch_branch.at" # from [] # to [671401ca3e91c9879e3fdf48443960361d97d63b] # # patch "testsuite.at" # from [3dd7d23b79312c68c41089c651f9d1d7e91f150e] # to [b41ebbdbfcc3e46a746e732959d794c5237d4287] # ======================================================================== --- ChangeLog 4ca6fa045ed15d09601de1e788e2c2b362d3f5f6 +++ ChangeLog 8856aa5720ebdc03daedfededbe2d49fef2c3e90 @@ -1,5 +1,9 @@ 2005-10-19 Nathaniel Smith + * tests/t_update_switch_branch.at, testsuite.at: New test. + +2005-10-19 Nathaniel Smith + * commands.cc (update): Make branch sticky even if update target == current rid. ======================================================================== --- tests/t_update_switch_branch.at +++ tests/t_update_switch_branch.at 671401ca3e91c9879e3fdf48443960361d97d63b @@ -0,0 +1,22 @@ +AT_SETUP([update -b switches branches even when noop]) +MONOTONE_SETUP + +ADD_FILE(testfile, [blah blah +]) +COMMIT(testbranch) + +RID1=`BASE_REVISION` + +AT_CHECK(MONOTONE cert $RID1 branch otherbranch, [], [ignore], [ignore]) + +AT_CHECK(QGREP(testbranch MT/options)) +AT_CHECK(QGREP(otherbranch MT/options), [1]) + +AT_CHECK(MONOTONE update -b otherbranch, [], [ignore], [ignore]) +RID2=`BASE_REVISION` +AT_CHECK(test "$RID1" = "$RID2") + +AT_CHECK(QGREP(testbranch MT/options), [1]) +AT_CHECK(QGREP(otherbranch MT/options)) + +AT_CLEANUP ======================================================================== --- testsuite.at 3dd7d23b79312c68c41089c651f9d1d7e91f150e +++ testsuite.at b41ebbdbfcc3e46a746e732959d794c5237d4287 @@ -717,3 +717,4 @@ m4_include(tests/t_add_inside_MT.at) m4_include(tests/t_annotate_renames.at) m4_include(tests/t_config_confdir.at) +m4_include(tests/t_update_switch_branch.at)