# # patch "ChangeLog" # from [b3d059aaed5dbf88bde17d413bfcf5fb41f59c47] # to [9192e933cca2c7bc5a28a69c2f65b18029c98171] # # patch "monotone.cc" # from [f50b692ac580cf7cff3ddc11f27cbc5c1148d3c7] # to [84917aadd0dde082ea12e1e9e848576841e3f247] # # patch "tests/t_at_sign.at" # from [708929379d29cdf78cc5e6cee7637c0274c65008] # to [c4d8959dc325415e89e9dfeb6682abd1459fc799] # # patch "tests/t_cross.at" # from [d4a0e27dcd1f8ad7859485a1785ed3e3ff7c0272] # to [b6ec5c1e0b1b0609996133cd9d004bc0e63bd71e] # # patch "tests/t_empty_env.at" # from [73bd1a407ba422da57543000921b247c95a10211] # to [e3497f279ffb3eb963d6b92bbfa95fe5783b9d3e] # # patch "tests/t_null.at" # from [04466cc47ec25fde61832c5b30b91e5ce87390c4] # to [ee8e51f95fe7e5251910e8bf35be45c5383094eb] # # patch "tests/t_unreadable_db.at" # from [c69591064c72591c66a6f5d1b34dfbae0ca6c8ef] # to [68fd851c690ee94af78fc71b4ab44dbcffe5bd65] # # patch "testsuite.at" # from [299c060101e3207af910adf2800d010bd25fe038] # to [04961a46b716fbe9cb9a36e26361a14db6a44a31] # ======================================================================== --- ChangeLog b3d059aaed5dbf88bde17d413bfcf5fb41f59c47 +++ ChangeLog 9192e933cca2c7bc5a28a69c2f65b18029c98171 @@ -1,3 +1,12 @@ +2005-10-12 Matt Johnston + + * monotone.cc: return with exit code of 2 on usage output + * testsuite.at: turn "cat_foo" into "automate get_foo" + * tests/t_empty_env.at, tests/t_null.at, tests/t_at_sign.at, + tests/t_unreadable_db.at: expect 2 exit code + * tests/t_cross.at: update to the changeset paradigm of immutable + ancestors. + 2005-10-11 Emile Snyder * app_state.{cc,hh}: new bind_address and bind_port class members. ======================================================================== --- monotone.cc f50b692ac580cf7cff3ddc11f27cbc5c1148d3c7 +++ monotone.cc 84917aadd0dde082ea12e1e9e848576841e3f247 @@ -557,7 +557,7 @@ cout << endl; commands::explain_usage(u.which, cout); clean_shutdown = true; - return 0; + return 2; } } catch (informative_failure & inf) ======================================================================== --- tests/t_at_sign.at 708929379d29cdf78cc5e6cee7637c0274c65008 +++ tests/t_at_sign.at c4d8959dc325415e89e9dfeb6682abd1459fc799 @@ -1,8 +1,8 @@ AT_SETUP([check that --xargs / -@ behave correctly]) # Generate the general expected output, as we're testing using the # output of 'list --help' -AT_CHECK(RAW_MONOTONE list --help, [], [stdout], [ignore], [:], [:]) +AT_CHECK(RAW_MONOTONE list --help, [2], [stdout], [ignore], [:], [:]) mv stdout expout # Check that --xargs works at all ======================================================================== --- tests/t_cross.at d4a0e27dcd1f8ad7859485a1785ed3e3ff7c0272 +++ tests/t_cross.at b6ec5c1e0b1b0609996133cd9d004bc0e63bd71e @@ -93,7 +93,7 @@ AT_CHECK(test $LEFT_F_SHA != $ROOT_F_SHA) # revert to root -PROBE_NODE(shared, $ROOT_R_SHA, $ROOT_F_SHA) +REVERT_TO($ROOT_R_SHA) # construct right node AT_CHECK(cp shared.right shared) @@ -106,25 +106,12 @@ AT_CHECK(test $RIGHT_R_SHA != $LEFT_R_SHA) AT_CHECK(test $RIGHT_F_SHA != $LEFT_F_SHA) -# construct alice, a derivative of right but with the specific change -# in left, and an ancestor edge to left. -AT_CHECK(MONOTONE add specific.left, [], [ignore], [ignore]) -AT_CHECK(MONOTONE add specific.alice, [], [ignore], [ignore]) -AT_CHECK(MONOTONE commit --message=alice, [], [ignore], [ignore]) -ALICE_R_SHA=`BASE_REVISION` -AT_CHECK(MONOTONE cert manifest $ALICE_R_SHA ancestor $LEFT_R_SHA, [], [ignore], [ignore]) +# construct alice, a merge choosing the right side to win +AT_CHECK(ALICE merge, [], [ignore], [ignore]) -# revert to left -PROBE_NODE(shared, $LEFT_R_SHA, $LEFT_F_SHA) +# construct bob, a merge choosing the left side to win +AT_CHECK(BOB merge, [], [ignore], [ignore]) -# construct bob, a derivative of left but with the specific change -# in right, and an ancestor edge to right. -AT_CHECK(MONOTONE add specific.right, [], [ignore], [ignore]) -AT_CHECK(MONOTONE add specific.bob, [], [ignore], [ignore]) -AT_CHECK(MONOTONE commit --message=bob, [], [ignore], [ignore]) -BOB_R_SHA=`BASE_REVISION` -AT_CHECK(MONOTONE cert manifest $BOB_R_SHA ancestor $RIGHT_R_SHA, [], [ignore], [ignore]) - # now merge the merges. this *should* fail. # because there are conflicting changes and # we have no merge3 hook to fall back on ======================================================================== --- tests/t_empty_env.at 73bd1a407ba422da57543000921b247c95a10211 +++ tests/t_empty_env.at e3497f279ffb3eb963d6b92bbfa95fe5783b9d3e @@ -5,7 +5,7 @@ cp $(which libiconv-2.dll) . fi) -AT_CHECK(env -i MONOTONE --help, [], [ignore], [ignore]) +AT_CHECK(env -i MONOTONE --help, [2], [ignore], [ignore]) AT_DATA(testfile, [blah blah ]) AT_CHECK(env -i MONOTONE add testfile, [], [ignore], [ignore]) ======================================================================== --- tests/t_null.at 04466cc47ec25fde61832c5b30b91e5ce87390c4 +++ tests/t_null.at ee8e51f95fe7e5251910e8bf35be45c5383094eb @@ -1,17 +1,17 @@ # -*- Autoconf -*- AT_SETUP([basic invocations and options]) -AT_CHECK([monotone --norc], [], [ignore]) -AT_CHECK([monotone --help], [], [ignore]) +AT_CHECK([monotone --norc], [2], [ignore]) +AT_CHECK([monotone --help], [2], [ignore]) AT_CHECK([monotone --version], [], [ignore]) -AT_CHECK([monotone --nostd --help], [], [ignore]) -AT_CHECK([monotone --norc --help], [], [ignore]) -AT_CHECK([monotone --debug --help], [], [ignore], [ignore]) -AT_CHECK([monotone --quiet --help], [], [ignore]) -AT_CHECK([monotone --db=foo.db --help], [], [ignore]) -AT_CHECK([monotone --db foo.db --help], [], [ignore]) -AT_CHECK([monotone address@hidden --help], [], [ignore]) -AT_CHECK([monotone --key address@hidden --help], [], [ignore]) +AT_CHECK([monotone --nostd --help], [2], [ignore]) +AT_CHECK([monotone --norc --help], [2], [ignore]) +AT_CHECK([monotone --debug --help], [2], [ignore], [ignore]) +AT_CHECK([monotone --quiet --help], [2], [ignore]) +AT_CHECK([monotone --db=foo.db --help], [2], [ignore]) +AT_CHECK([monotone --db foo.db --help], [2], [ignore]) +AT_CHECK([monotone address@hidden --help], [2], [ignore]) +AT_CHECK([monotone --key address@hidden --help], [2], [ignore]) AT_CLEANUP ======================================================================== --- tests/t_unreadable_db.at c69591064c72591c66a6f5d1b34dfbae0ca6c8ef +++ tests/t_unreadable_db.at 68fd851c690ee94af78fc71b4ab44dbcffe5bd65 @@ -9,7 +9,7 @@ # unreadable file AT_CHECK(chmod a-rwx test.db) -AT_CHECK(MONOTONE, [], [ignore], [ignore]) +AT_CHECK(MONOTONE, [2], [ignore], [ignore]) AT_CHECK(MONOTONE ls branches, [1], [ignore], [ignore]) AT_CHECK(MONOTONE db info, [1], [ignore], [ignore]) AT_CHECK(MONOTONE db version, [1], [ignore], [ignore]) @@ -23,7 +23,7 @@ # unreadable directory AT_CHECK(chmod a-rwx subdir) -AT_CHECK(MONOTONE --db subdir/foo.db, [], [ignore], [ignore]) +AT_CHECK(MONOTONE --db subdir/foo.db, [2], [ignore], [ignore]) AT_CHECK(MONOTONE --db subdir/foo.db ls branches, [1], [ignore], [ignore]) AT_CHECK(MONOTONE --db subdir/foo.db db info, [1], [ignore], [ignore]) AT_CHECK(MONOTONE --db subdir/foo.db db version, [1], [ignore], [ignore]) ======================================================================== --- testsuite.at 299c060101e3207af910adf2800d010bd25fe038 +++ testsuite.at 04961a46b716fbe9cb9a36e26361a14db6a44a31 @@ -19,7 +19,7 @@ m4_define([RAW_MONOTONE], [$PREEXECUTE monotone --norc]) m4_define([SHA1], [monotone --norc identify $1]) m4_define([BASE_REVISION], [cat MT/revision]) -m4_define([WORKING_REVISION], [monotone --norc cat revision | monotone --norc identify]) +m4_define([WORKING_REVISION], [monotone --norc automate get_revision | monotone --norc identify]) m4_define([CANONICALISE], [ if test "$OSTYPE" == "msys"; then dos2unix -q -o $1 @@ -180,19 +180,19 @@ REVS=`MONOTONE --db=$1 complete revision ""` for R in $REVS; do CHECK_SAME_STDOUT(MONOTONE --db=$1 ls certs $R, MONOTONE --db=$2 ls certs $R) - CHECK_SAME_STDOUT(MONOTONE --db=$1 cat revision $R, MONOTONE --db=$2 cat revision $R) + CHECK_SAME_STDOUT(MONOTONE --db=$1 automate get_revision $R, MONOTONE --db=$2 automate get_revision $R) done CHECK_SAME_STDOUT(MONOTONE --db=$1 complete manifest "", MONOTONE --db=$2 complete manifest "") MANIFESTS=`MONOTONE --db=$1 complete manifest ""` for M in $MANIFESTS; do - CHECK_SAME_STDOUT(MONOTONE --db=$1 cat manifest $M, MONOTONE --db=$2 cat manifest $M) + CHECK_SAME_STDOUT(MONOTONE --db=$1 automate get_manifest $M, MONOTONE --db=$2 automate get_manifest $M) done CHECK_SAME_STDOUT(MONOTONE --db=$1 complete file "", MONOTONE --db=$2 complete file "") FILES=`MONOTONE --db=$1 complete file ""` for F in $FILES; do - CHECK_SAME_STDOUT(MONOTONE --db=$1 cat file $F, MONOTONE --db=$2 cat file $F) + CHECK_SAME_STDOUT(MONOTONE --db=$1 automate get_file $F, MONOTONE --db=$2 automate get_file $F) done ])