# # patch "ChangeLog" # from [b2c6fc372f248f8f33269566678d525e83c43c32] # to [51b50501a62509680debc9cad727b7f16c26487e] # # patch "commands.cc" # from [6f05e3d223ca762c2c01bb07e7a4404902be6b2a] # to [3e8ad65cb96a478855b3b9b756f498eb23269f3e] # # patch "monotone.1" # from [5783b0220be5236c92caf72d3f42add790f654bc] # to [c373cde12e52ccdec50edddf091907df83e06060] # # patch "monotone.texi" # from [684bb3eb5f35b812b9cf2122429a0961803f1794] # to [d8ac644d2ea50526cb5611319e740db3200d020e] # # patch "tests/t_attr.at" # from [05b4bb73f305a1277fd9169af1c01ee386f92170] # to [b2c451cdd4b25730bba903849269d016da86241b] # # patch "tests/t_attributes.at" # from [4d19cb4da2b69e9e05694a94fe64f87ae2656054] # to [0375bcb4411006f5b6c0e6a72b92b568ace844f5] # # patch "tests/t_checkout_id_sets_branch.at" # from [ea0df0caed46c80391d47ab546e3040c0d54bc1b] # to [cb8ea836a276abaa000e57f6144a932c8b262a51] # # patch "tests/t_checkout_noop_on_fail.at" # from [823122f25b5840142f79327b54fd771944e04aae] # to [4cc60ab6fd6480fbf55db6091c3c8a3a7c3b1e42] # # patch "tests/t_checkout_options.at" # from [5b7d33ce74e9cdedf66661b931f51956455cb122] # to [20a1f8dab6d0d4e5699e051003db72438423797a] # # patch "tests/t_cwork.at" # from [ff7ece284dae3f74e0d3b4c41eb1602a6a04e89f] # to [c62e74c66fee35e02b6279e799d3495aafe09377] # # patch "tests/t_delete_dir.at" # from [f9a621cdda6b3fa05291d055d0cb2a7971705c79] # to [d16637f75dc02d3532ee1a9ebf1071a7a82e2ec0] # # patch "tests/t_delete_dir_patch.at" # from [3d6bb295a96e3f86895a37cc1d55901447786476] # to [8ee0b4ec75cbe5373ee6a6b592e4ebd60fe38cc5] # # patch "tests/t_empty_path.at" # from [9485a4f3dda615729af5b1793b75b0c5eb924fe5] # to [c3c5137146a20ad3dd354795f69b8732822f5753] # # patch "tests/t_i18n_file_data.at" # from [8bf9d8bcd387f3716543671f0d3c717cbf3f2959] # to [b46606674381d2c1fc085155c79a1d1a827c5612] # # patch "tests/t_inodeprints_hook.at" # from [7a63f3be8cd9f0f003ffe3b0372e9c4d33fcc034] # to [eb998935bdbf72c58d8811a635c4609680e450c1] # # patch "tests/t_inodeprints_update.at" # from [4d4598db37f62c8dc87a93efa0b1bc9257fac7ee] # to [e4e1f37872811414024e259717206ca528267346] # # patch "tests/t_largish_file.at" # from [493a9bb2c4db8d6bb5eb354932e3513e65f7c3c4] # to [2b4f87a4a94c0e4ffca9976b7692904cac81a3d4] # # patch "tests/t_lf_crlf.at" # from [7d5f60856e4d5fa739d66eb943995412016885b9] # to [6320cbf9fb0416ac32b1a3627ff87ddd0903dded] # # patch "tests/t_monotone_up.at" # from [e223687505abdcc02d1579d16494182a1f2fbaa8] # to [b17d746daae707b1d2a5194ff39e9d0e439de643] # # patch "tests/t_netsync_defaults.at" # from [09eba929e451e94f6075bd99fe75fc0469ba84e1] # to [4cef6b25d7b1a2a7bde39fea0453bb21337eddb0] # # patch "tests/t_netsync_set_defaults.at" # from [864459aeaca65bc3951742afeab9ac0e229c6d71] # to [820bc21e9dc6b9c1a518031742a028239c693d58] # # patch "tests/t_persistent_server_revision.at" # from [b5854ca86a216f5decce7b2cfe16641cdf274f12] # to [8418111484ba4aaf797db3626a697ec88f4d0f88] # # patch "tests/t_rename_added_in_rename.at" # from [459d2b29b7c1705c61f4ad6f8db1264b94416c77] # to [986d6f8c484b4cd73df3e6df7c67ad61f3bd1a2d] # # patch "tests/t_rename_dir_cross_level.at" # from [0694f3399e2bcf97535eebf6e15c703744c0a127] # to [11a1751be8693f71676c8c047c1a81b0d4ed2940] # # patch "tests/t_rename_dir_patch.at" # from [67ddf3a9137ab901ffac7591740f0eb0be3f2e37] # to [3a8a56c1deb3cc7ebc2158ab7b3b9b2403ab1ea0] # # patch "tests/t_single_char_filenames.at" # from [59fbcfd6b3842784b2648ec99ad1b38ec5f34038] # to [f4492e7c63d5f93094d8f2bdea04d80854b41b31] # # patch "tests/t_subdir_add.at" # from [5c486964bd0dd01d64a40ab6c4bc9b37e84d6509] # to [45791575b75fc561844d7cdabe9f8847c68ce259] # # patch "tests/t_subdir_attr.at" # from [098c040e33190aaf44367dc9df734ccfd8a78f70] # to [e981b395cca2814a63af714a8138b7f75f1595fc] # # patch "tests/t_subdir_drop.at" # from [e7f245b2531d6c923b0fe6b662ed40e3b135cab9] # to [cbf86582b2bd6db9f1fc699e8b97aacbaf472a93] # # patch "tests/t_subdir_rename.at" # from [b7da56b25d024e2e74a4b4b116b94dfe0ab89fda] # to [194e7566c73d1cb59ab603130cb332919cd68015] # # patch "tests/t_subdir_revert.at" # from [f172cbe684ff1758eb0773b5d0988afeada1b995] # to [56188db5e096ea2186a0e03f8df858e1acb45bd4] # # patch "tests/t_tags.at" # from [a1e2ed2a4041deb483c77b183818d50c773cd071] # to [6b2d3281d3b1d26bb4fae6260d5a9a0f7b00a566] # # patch "tests/t_update_off_branch.at" # from [951445e014367f691ff2d44c2018ec13a24daf7b] # to [098a2d92e488117572fdd96112cc29d95e712c7e] # # patch "tests/t_versions.at" # from [a1242d5b6d0b9fcdb52a0eab855e17058b83efcf] # to [91d6fb7180cd75fde30d7f5b82e29cf5feaf9277] # # patch "testsuite.at" # from [3fd0bf5a0738122649a73e4a51a7bc094c308b04] # to [27c292ee9a1b44803538b41dcb94b3203f707553] # --- ChangeLog +++ ChangeLog @@ -1,4 +1,40 @@ -<<<<<<< variant A +2005-05-19 Derek Scherger + + * commands.cc (checkout): rearrange to use --revision option + * monotone.1: + * monotone.texi: document checkout --revision option + * tests/t_attr.at: + * tests/t_attributes.at: + * tests/t_checkout_id_sets_branch.at: + * tests/t_checkout_noop_on_fail.at: + * tests/t_checkout_options.at: + * tests/t_cwork.at: + * tests/t_delete_dir.at: + * tests/t_delete_dir_patch.at: + * tests/t_empty_path.at: + * tests/t_i18n_file_data.at: + * tests/t_inodeprints_hook.at: + * tests/t_inodeprints_update.at: + * tests/t_largish_file.at: + * tests/t_lf_crlf.at: + * tests/t_monotone_up.at: + * tests/t_netsync_defaults.at: + * tests/t_netsync_set_defaults.at: + * tests/t_persistent_server_revision.at: + * tests/t_rename_added_in_rename.at: + * tests/t_rename_dir_cross_level.at: + * tests/t_rename_dir_patch.at: + * tests/t_single_char_filenames.at: + * tests/t_subdir_add.at: + * tests/t_subdir_attr.at: + * tests/t_subdir_drop.at: + * tests/t_subdir_rename.at: + * tests/t_subdir_revert.at: + * tests/t_tags.at: + * tests/t_update_off_branch.at: + * tests/t_versions.at: + * testsuite.at: add --revision option to checkout + 2005-05-17 Grahame Bowland * commands.cc: add "automate certs ID" to the help string @@ -7,14 +43,11 @@ of commands available through "automate stdio". * monotone.texi: document "automate certs" ->>>>>>> variant B 2005-05-17 Nathaniel Smith * monotone.texi (Network): Document 'serve' as taking more than one collection argument. -####### Ancestor -======= end 2005-05-15 graydon hoare * rcs_import.cc (note_state_at_branch_beginning): collect --- commands.cc +++ commands.cc @@ -1396,66 +1396,66 @@ } -CMD(checkout, "tree", "REVISION DIRECTORY\nDIRECTORY\n", +CMD(checkout, "tree", "[--revision=REVISION] [DIRECTORY]\n", "check out revision from database into directory", - OPT_BRANCH_NAME) + OPT_BRANCH_NAME % OPT_REVISION) { - revision_id ident; string dir; - if (args.size() > 2) + if (args.size() > 1 || app.revision_selectors.size() > 1) throw usage(name); - if (args.size() == 0 || args.size() == 1) + if (args.size() == 0) { - N(app.branch_name() != "", F("need --branch argument for branch-based checkout")); - // if no checkout dir specified, use branch name - if (args.size() == 0) - dir = app.branch_name(); - else - dir = idx(args, 0)(); + // no checkout dir specified, use branch name for dir + N(!app.branch_name().empty(), F("need --branch argument for branch-based checkout")); + dir = app.branch_name(); + } + else + { + // checkout to specified dir + dir = idx(args, 0)(); + } + if (app.revision_selectors.size() == 0) + { + // use branch head revision + N(!app.branch_name().empty(), F("need --branch argument for branch-based checkout")); set heads; get_branch_heads(app.branch_name(), app, heads); N(heads.size() > 0, F("branch %s is empty") % app.branch_name); N(heads.size() == 1, F("branch %s has multiple heads") % app.branch_name); ident = *(heads.begin()); - - app.create_working_copy(dir); } - else + else if (app.revision_selectors.size() == 1) { - dir = idx(args, 1)(); - complete(app, idx(args, 0)(), ident); - + // use specified revision + complete(app, idx(app.revision_selectors, 0)(), ident); N(app.db.revision_exists(ident), F("no revision %s found in database") % ident); + + cert_value b; + guess_branch(ident, app, b); - { - cert_value b; - guess_branch(ident, app, b); - } - { - I(!app.branch_name().empty()); - cert_value branch_name(app.branch_name()); - base64 branch_encoded; - encode_base64(branch_name, branch_encoded); + I(!app.branch_name().empty()); + cert_value branch_name(app.branch_name()); + base64 branch_encoded; + encode_base64(branch_name, branch_encoded); - vector< revision > certs; - app.db.get_revision_certs(ident, branch_cert_name, branch_encoded, certs); + vector< revision > certs; + app.db.get_revision_certs(ident, branch_cert_name, branch_encoded, certs); - L(F("found %d %s branch certs on revision %s\n") - % certs.size() - % app.branch_name - % ident); + L(F("found %d %s branch certs on revision %s\n") + % certs.size() + % app.branch_name + % ident); - N(certs.size() != 0, F("revision %s is not a member of branch %s\n") - % ident % app.branch_name); - } + N(certs.size() != 0, F("revision %s is not a member of branch %s\n") + % ident % app.branch_name); + } - app.create_working_copy(dir); - } + app.create_working_copy(dir); transaction_guard guard(app.db); --- monotone.1 +++ monotone.1 @@ -117,11 +117,11 @@ across the entire tree. You do not want this command, it is for debugging; use cvs_import. .TP -\fBcheckout\fP \fI[manifest-id]\fP \fI]\fP +Check out revision from database. .TP -\fBco\fP \fI[manifest-id]\fP \fI]\fP +Check out revision from database; an alias for \fBcheckout\fP. .TP \fBcat\fP \fI(file|manifest) \fP Write file or manifest from database to stdout. @@ -255,10 +255,7 @@ The default is \fBcount\fP. .TP \fB--revision=\fP\fI\fP -Currently this option only applies to the diff command where it may be -used to compare a working copy with a specific revision or to compare -two specific revisions. It will likely apply to other commands in the -future. +Used to specify one or more revision ids to various commands. .TP \fB-r\fP \fI\fP An alias for \fB--revision=\fP\fI\fP --- monotone.texi +++ monotone.texi @@ -2954,7 +2954,7 @@ @smallexample @group $ monotone pull www.foo.com com.foo.wobbler -$ monotone checkout fe37 wobbler +$ monotone checkout --revision=fe37 wobbler @end group @end smallexample @end multitable @@ -3241,8 +3241,8 @@ unspecified manifest or revision @var{id} is allowed from within a working copy and refers to the current manifest or revision. address@hidden monotone checkout @var{id} @var{directory} address@hidden monotone co @var{id} @var{directory} address@hidden monotone checkout address@hidden @var{directory} address@hidden monotone co address@hidden @var{directory} @itemx monotone address@hidden checkout @var{directory} @itemx monotone address@hidden co @var{directory} @@ -6506,9 +6506,9 @@ debugging; use cvs_import. @comment TROFF INPUT: .TP address@hidden @b{checkout} @i{[manifest-id]} @i{} address@hidden @b{co} @i{[manifest-id]} @i{} -Check out tree state from database, into directory. address@hidden @b{checkout} @i{[--revision=revision-id]} @i{[]} address@hidden @b{co} @i{[--revision=revision-id]} @i{[]} +Check out revision from database, into directory. @comment TROFF INPUT: .TP @item @b{cat} @i{(file |manifest []|revision [])} --- tests/t_attr.at +++ tests/t_attr.at @@ -14,7 +14,7 @@ REV=`BASE_REVISION` # Make sure that 'attr set' automatically did an 'add .mt-attrs' if necessary. -AT_CHECK(MONOTONE checkout $REV testdir, [], [ignore], [ignore]) +AT_CHECK(MONOTONE checkout --revision=$REV testdir, [], [ignore], [ignore]) AT_CHECK(test -f testdir/.mt-attrs) AT_CLEANUP --- tests/t_attributes.at +++ tests/t_attributes.at @@ -31,13 +31,13 @@ # Check checkouts. AT_CHECK(rm -rf co-dir/MT) -AT_CHECK(MONOTONE checkout $CO_R_SHA1 co-dir, [], [stdout]) +AT_CHECK(MONOTONE checkout --revision=$CO_R_SHA1 co-dir, [], [stdout]) AT_CHECK(grep "test_attr:foo:true" stdout, [], [ignore]) AT_CHECK(grep "test_attr:a:1" stdout, [], [ignore]) # Check updates. AT_CHECK(rm -rf co-dir/MT) -AT_CHECK(MONOTONE checkout $UPDATE_R_SHA1 co-dir, [], [stdout]) +AT_CHECK(MONOTONE checkout --revision=$UPDATE_R_SHA1 co-dir, [], [stdout]) AT_CHECK(grep "test_attr:foo" stdout, [1], [ignore]) AT_CHECK(grep "test_attr:a:2" stdout, [], [ignore]) --- tests/t_checkout_id_sets_branch.at +++ tests/t_checkout_id_sets_branch.at @@ -6,7 +6,7 @@ COMMIT(testbranch) REV=`BASE_REVISION` -AT_CHECK(MONOTONE checkout $REV codir1, [], [ignore], [ignore]) +AT_CHECK(MONOTONE checkout --revision=$REV codir1, [], [ignore], [ignore]) AT_CHECK(cmp foo codir1/foo) AT_DATA(codir1/foo, [hi maude ]) @@ -18,10 +18,10 @@ # but, now we can't checkout without a --branch... # need to make sure don't pick up branch from our local MT dir... AT_CHECK(rm -rf MT) -AT_CHECK(MONOTONE checkout $REV codir2, [1], [ignore], [ignore]) -AT_CHECK(MONOTONE checkout $REV --branch=testbranch codir3, [], [ignore], [ignore]) +AT_CHECK(MONOTONE checkout --revision=$REV codir2, [1], [ignore], [ignore]) +AT_CHECK(MONOTONE checkout --revision=$REV --branch=testbranch codir3, [], [ignore], [ignore]) AT_CHECK(cmp foo codir3/foo) -AT_CHECK(MONOTONE checkout $REV --branch=otherbranch codir4, [], [ignore], [ignore]) +AT_CHECK(MONOTONE checkout --revision=$REV --branch=otherbranch codir4, [], [ignore], [ignore]) AT_CHECK(cmp foo codir4/foo) AT_CLEANUP --- tests/t_checkout_noop_on_fail.at +++ tests/t_checkout_noop_on_fail.at @@ -5,10 +5,10 @@ # the checkout directory already exists, no MT/ directory should be # created. -AT_CHECK(MONOTONE checkout bogus-id outdir, [1], [ignore], [ignore]) +AT_CHECK(MONOTONE checkout --revision=bogus-id outdir, [1], [ignore], [ignore]) AT_CHECK(test ! -e outdir) AT_CHECK(mkdir outdir) -AT_CHECK( (cd outdir && MONOTONE checkout bogus-id .), [1], [ignore], [ignore]) +AT_CHECK( (cd outdir && MONOTONE checkout --revision=bogus-id .), [1], [ignore], [ignore]) AT_CHECK(test ! -e outdir/MT) AT_CLEANUP --- tests/t_checkout_options.at +++ tests/t_checkout_options.at @@ -16,15 +16,15 @@ AT_CHECK(RAW_MONOTONE --db=test.db checkout test_dir2, [], [ignore], [ignore]) AT_CHECK(RAW_MONOTONE --db=test.db --branch=testbranch checkout test_dir3, [], [ignore], [ignore]) AT_CHECK(RAW_MONOTONE --branch=testbranch checkout test_dir4, [], [ignore], [ignore]) -AT_CHECK(RAW_MONOTONE --db=test.db --branch=testbranch checkout $REV test_dir5, [], [ignore], [ignore]) -AT_CHECK(RAW_MONOTONE --branch=testbranch checkout $REV test_dir6, [], [ignore], [ignore]) -AT_CHECK(RAW_MONOTONE --db=test.db checkout $REV test_dir7, [], [ignore], [ignore]) -AT_CHECK(RAW_MONOTONE checkout $REV test_dir8, [], [ignore], [ignore]) +AT_CHECK(RAW_MONOTONE --db=test.db --branch=testbranch checkout --revision=$REV test_dir5, [], [ignore], [ignore]) +AT_CHECK(RAW_MONOTONE --branch=testbranch checkout --revision=$REV test_dir6, [], [ignore], [ignore]) +AT_CHECK(RAW_MONOTONE --db=test.db checkout --revision=$REV test_dir7, [], [ignore], [ignore]) +AT_CHECK(RAW_MONOTONE checkout --revision=$REV test_dir8, [], [ignore], [ignore]) # checkout fails if the specified revision is not a member of the specified branch -AT_CHECK(RAW_MONOTONE --branch=foobar checkout $REV test_dir9, [1], [ignore], [ignore]) +AT_CHECK(RAW_MONOTONE --branch=foobar checkout --revision=$REV test_dir9, [1], [ignore], [ignore]) AT_CHECK(MONOTONE cert $REV branch foobar, [], [ignore], [ignore]) -AT_CHECK(RAW_MONOTONE --branch=foobar checkout $REV test_dir10, [], [ignore], [ignore]) +AT_CHECK(RAW_MONOTONE --branch=foobar checkout --revision=$REV test_dir10, [], [ignore], [ignore]) for DIR in test_dir{1,2,3,4,5,6,7,8}; do --- tests/t_cwork.at +++ tests/t_cwork.at @@ -15,7 +15,7 @@ AT_CHECK(MONOTONE add testfile1, [], [ignore], [ignore]) AT_CHECK(test -e MT/work, [], [ignore]) AT_CHECK(rm -rf MT) -AT_CHECK(MONOTONE checkout $V1 ., [], [ignore], [ignore]) +AT_CHECK(MONOTONE checkout --revision=$V1 ., [], [ignore], [ignore]) AT_CHECK(test ! -e MT/work, [], [ignore]) AT_CLEANUP --- tests/t_delete_dir.at +++ tests/t_delete_dir.at @@ -59,7 +59,7 @@ AT_CHECK(MONOTONE merge, [], [ignore], [ignore]) -AT_CHECK(MONOTONE checkout $BASE_R clean, [], [ignore], [ignore]) +AT_CHECK(MONOTONE checkout --revision=$BASE_R clean, [], [ignore], [ignore]) AT_CHECK(cd clean && MONOTONE --branch=testbranch update, [], [ignore], [ignore]) AT_CHECK(test -f clean/rename-out) --- tests/t_delete_dir_patch.at +++ tests/t_delete_dir_patch.at @@ -25,7 +25,7 @@ AT_CHECK(MONOTONE --branch=testbranch merge, [], [ignore], [ignore]) -AT_CHECK(MONOTONE checkout $BASE_R test_dir, [], [ignore], [ignore]) +AT_CHECK(MONOTONE checkout --revision=$BASE_R test_dir, [], [ignore], [ignore]) AT_CHECK( (cd test_dir && MONOTONE update --branch=testbranch), [], [ignore], [ignore]) AT_CHECK(test ! -f test_dir/foo/a) --- tests/t_empty_path.at +++ tests/t_empty_path.at @@ -8,7 +8,7 @@ AT_CHECK(mkdir foo) AT_CHECK(cd foo && MONOTONE setup "", [1], [ignore], [ignore]) -AT_CHECK(cd foo && MONOTONE checkout $REV0 "", [1], [ignore], [ignore]) +AT_CHECK(cd foo && MONOTONE checkout --revision=$REV0 "", [1], [ignore], [ignore]) AT_CHECK(cd foo && MONOTONE checkout --branch=testbranch "", [1], [ignore], [ignore]) AT_CHECK(MONOTONE add "", [1], [ignore], [ignore]) --- tests/t_i18n_file_data.at +++ tests/t_i18n_file_data.at @@ -53,9 +53,9 @@ AT_CHECK(MONOTONE --rcfile=8859-5.lua add ru-8859-5, [], [ignore], [ignore]) AT_CHECK(MONOTONE --rcfile=8859-5.lua commit --message=foo, [], [ignore], [ignore]) RU_R=`BASE_REVISION` -AT_CHECK(MONOTONE --rcfile=8859-5.lua checkout $RU_R co-ru-8859-5, [], [ignore], [ignore]) +AT_CHECK(MONOTONE --rcfile=8859-5.lua checkout --revision=$RU_R co-ru-8859-5, [], [ignore], [ignore]) AT_CHECK(cmp ru-8859-5 co-ru-8859-5/ru-8859-5) -AT_CHECK(MONOTONE checkout $RU_R co-ru-utf8, [], [ignore], [ignore]) +AT_CHECK(MONOTONE checkout --revision=$RU_R co-ru-utf8, [], [ignore], [ignore]) AT_CHECK(cmp ru-utf8 co-ru-utf8/ru-8859-5) REVERT_TO($BASE_R) @@ -65,9 +65,9 @@ AT_CHECK(MONOTONE --rcfile=euc.lua add jp-euc, [], [ignore], [ignore]) AT_CHECK(MONOTONE --rcfile=euc.lua commit --message=foo, [], [ignore], [ignore]) JP_R=`BASE_REVISION` -AT_CHECK(MONOTONE --rcfile=euc.lua checkout $JP_R co-jp-euc, [], [ignore], [ignore]) +AT_CHECK(MONOTONE --rcfile=euc.lua checkout --revision=$JP_R co-jp-euc, [], [ignore], [ignore]) AT_CHECK(cmp jp-euc co-jp-euc/jp-euc) -AT_CHECK(MONOTONE checkout $JP_R co-jp-utf8, [], [ignore], [ignore]) +AT_CHECK(MONOTONE checkout --revision=$JP_R co-jp-utf8, [], [ignore], [ignore]) AT_CHECK(cmp jp-utf8 co-jp-utf8/jp-euc) AT_CLEANUP --- tests/t_inodeprints_hook.at +++ tests/t_inodeprints_hook.at @@ -21,17 +21,17 @@ AT_CHECK(MONOTONE setup setup_default, [], [ignore], [ignore]) AT_CHECK(test ! -e setup_default/MT/inodeprints) -AT_CHECK(MONOTONE checkout $REV co_default, [], [ignore], [ignore]) +AT_CHECK(MONOTONE checkout --revision=$REV co_default, [], [ignore], [ignore]) AT_CHECK(test ! -e co_default/MT/inodeprints) AT_CHECK(MONOTONE --rcfile=off.lua setup setup_off, [], [ignore], [ignore]) AT_CHECK(test ! -e setup_off/MT/inodeprints) -AT_CHECK(MONOTONE --rcfile=off.lua checkout $REV co_off, [], [ignore], [ignore]) +AT_CHECK(MONOTONE --rcfile=off.lua checkout --revision=$REV co_off, [], [ignore], [ignore]) AT_CHECK(test ! -e co_off/MT/inodeprints) AT_CHECK(MONOTONE --rcfile=on.lua setup setup_on, [], [ignore], [ignore]) AT_CHECK(test -e setup_on/MT/inodeprints) -AT_CHECK(MONOTONE --rcfile=on.lua checkout $REV co_on, [], [ignore], [ignore]) +AT_CHECK(MONOTONE --rcfile=on.lua checkout --revision=$REV co_on, [], [ignore], [ignore]) AT_CHECK(test -e co_on/MT/inodeprints) AT_CHECK(test -s co_on/MT/inodeprints) --- tests/t_inodeprints_update.at +++ tests/t_inodeprints_update.at @@ -11,7 +11,7 @@ COMMIT(testbranch) R1=`BASE_REVISION` -AT_CHECK(MONOTONE checkout --branch=testbranch $R0 td, [], [ignore], [ignore]) +AT_CHECK(MONOTONE checkout --branch=testbranch --revision=$R0 td, [], [ignore], [ignore]) AT_CHECK(touch td/MT/inodeprints) AT_CHECK(cd td && MONOTONE update, [], [ignore], [ignore]) AT_CHECK(test -s td/MT/inodeprints) --- tests/t_largish_file.at +++ tests/t_largish_file.at @@ -299,9 +299,9 @@ AT_CHECK(mv largish largish.modified) -AT_CHECK(MONOTONE checkout $BASE_R base, [], [ignore], [ignore]) +AT_CHECK(MONOTONE checkout --revision=$BASE_R base, [], [ignore], [ignore]) AT_CHECK(cmp largish.orig base/largish) -AT_CHECK(MONOTONE checkout $MOD_R modified, [], [ignore], [ignore]) +AT_CHECK(MONOTONE checkout --revision=$MOD_R modified, [], [ignore], [ignore]) AT_CHECK(cmp largish.modified modified/largish) AT_CLEANUP --- tests/t_lf_crlf.at +++ tests/t_lf_crlf.at @@ -33,17 +33,17 @@ AT_CHECK(MONOTONE --rcfile=linesep.lua update $FOO_REV, [], [ignore], [ignore]) AT_CHECK(cmp foo foo.crlf, [], [ignore], [ignore]) -AT_CHECK(MONOTONE --rcfile=linesep.lua checkout $FOO_REV foo_crlf, [], [ignore], [ignore]) +AT_CHECK(MONOTONE --rcfile=linesep.lua checkout --revision=$FOO_REV foo_crlf, [], [ignore], [ignore]) AT_CHECK(cmp foo.crlf foo_crlf/foo) -AT_CHECK(MONOTONE --rcfile=linesep.lua checkout $FOO_FOO_REV foo_foo_crlf, [], [ignore], [ignore]) +AT_CHECK(MONOTONE --rcfile=linesep.lua checkout --revision=$FOO_FOO_REV foo_foo_crlf, [], [ignore], [ignore]) AT_CHECK(cmp foofoo.crlf foo_foo_crlf/foo) # no rcfile here -AT_CHECK(MONOTONE checkout $FOO_REV foo_lf, [], [ignore], [ignore]) +AT_CHECK(MONOTONE checkout --revision=$FOO_REV foo_lf, [], [ignore], [ignore]) AT_CHECK(cmp foo.lf foo_lf/foo) -AT_CHECK(MONOTONE checkout $FOO_FOO_REV foo_foo_lf, [], [ignore], [ignore]) +AT_CHECK(MONOTONE checkout --revision=$FOO_FOO_REV foo_foo_lf, [], [ignore], [ignore]) AT_CHECK(cmp foofoo.lf foo_foo_lf/foo) AT_CLEANUP --- tests/t_monotone_up.at +++ tests/t_monotone_up.at @@ -14,7 +14,7 @@ COMMIT(testbranch) REV1=`BASE_REVISION` -AT_CHECK(MONOTONE checkout --branch=testbranch $REV0 codir, [], [ignore], [ignore]) +AT_CHECK(MONOTONE checkout --branch=testbranch --revision=$REV0 codir, [], [ignore], [ignore]) AT_CHECK(cd codir && MONOTONE up, [], [ignore], [ignore]) AT_CHECK(cmp testfile codir/testfile) --- tests/t_netsync_defaults.at +++ tests/t_netsync_defaults.at @@ -24,21 +24,21 @@ AT_CHECK(MONOTONE2 set database default-server nonsense, [], [ignore], [ignore]) AT_CHECK(MONOTONE2 set database default-collection nonsense, [], [ignore], [ignore]) NETSYNC_CLIENT_RUN(pull, testbranch, 0) -AT_CHECK(MONOTONE2 checkout --branch=testbranch $TESTBRANCH_R testdir1, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 checkout --branch=testbranch --revision=$TESTBRANCH_R testdir1, [], [ignore], [ignore]) AT_CHECK(test -f testdir1/testfile) # Now make sure explicit server with default collection works... AT_CHECK(MONOTONE2 set database default-server nonsense, [], [ignore], [ignore]) AT_CHECK(MONOTONE2 set database default-collection otherbranch, [], [ignore], [ignore]) NETSYNC_CLIENT_RUN(pull, []) -AT_CHECK(MONOTONE2 checkout --branch=otherbranch $OTHERBRANCH_R testdir2, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 checkout --branch=otherbranch --revision=$OTHERBRANCH_R testdir2, [], [ignore], [ignore]) AT_CHECK(test -f testdir2/testfile) # And finally, AT_CHECK(MONOTONE2 set database default-server 127.0.0.1:$_PORT, [], [ignore], [ignore]) AT_CHECK(MONOTONE2 set database default-collection thirdbranch, [], [ignore], [ignore]) AT_CHECK(MONOTONE2 sync, [], [ignore], [ignore]) -AT_CHECK(MONOTONE2 checkout --branch=thirdbranch $THIRDBRANCH_R testdir3, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 checkout --branch=thirdbranch --revision=$THIRDBRANCH_R testdir3, [], [ignore], [ignore]) AT_CHECK(test -f testdir3/testfile) NETSYNC_SERVE_STOP --- tests/t_netsync_set_defaults.at +++ tests/t_netsync_set_defaults.at @@ -20,7 +20,7 @@ AT_CHECK(MONOTONE2 pull, [], [ignore], [ignore]) NETSYNC_SERVE_STOP(testbranch) -AT_CHECK(MONOTONE2 checkout $NEW_R testdir, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 checkout --revision=$NEW_R testdir, [], [ignore], [ignore]) AT_CHECK(cmp testfile testdir/testfile) AT_CLEANUP --- tests/t_persistent_server_revision.at +++ tests/t_persistent_server_revision.at @@ -28,13 +28,13 @@ CHECK_SAME_STDOUT(MONOTONE2 cat revision $REV1, MONOTONE3 cat revision $REV1) CHECK_SAME_STDOUT(MONOTONE2 ls certs $REV1, MONOTONE3 ls certs $REV1) # Also exercise files and manifest -AT_CHECK(MONOTONE3 checkout $REV1 somedir, [], [ignore], [ignore]) +AT_CHECK(MONOTONE3 checkout --revision=$REV1 somedir, [], [ignore], [ignore]) NETSYNC_CLIENT_N_RUN(2, sync, testbranch) CHECK_SAME_STDOUT(MONOTONE2 cat revision $REV2, MONOTONE3 cat revision $REV2) CHECK_SAME_STDOUT(MONOTONE2 ls certs $REV2, MONOTONE3 ls certs $REV2) # Also exercise files and manifest -AT_CHECK(MONOTONE2 checkout $REV2 otherdir, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 checkout --revision=$REV2 otherdir, [], [ignore], [ignore]) # And now make sure it works for children, where there are diffs and all @@ -44,7 +44,7 @@ REV3=`BASE_REVISION` AT_CHECK(rm -rf MT) -AT_CHECK(MONOTONE2 checkout $REV1 ., [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 checkout --revision=$REV1 ., [], [ignore], [ignore]) AT_DATA(testfile, [ptang ]) AT_CHECK(MONOTONE2 commit --branch=testbranch --message foo, [], [ignore], [ignore]) @@ -59,7 +59,7 @@ CHECK_SAME_STDOUT(MONOTONE2 cat revision $REV3, MONOTONE3 cat revision $REV3) CHECK_SAME_STDOUT(MONOTONE2 ls certs $REV3, MONOTONE3 ls certs $REV3) # Also exercise files and manifest -AT_CHECK(MONOTONE2 checkout $REV3 somedir2, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 checkout --revision=$REV3 somedir2, [], [ignore], [ignore]) # And check for that extra cert CHECK_SAME_STDOUT(MONOTONE2 ls certs $REV1, MONOTONE3 ls certs $REV1) @@ -69,7 +69,7 @@ CHECK_SAME_STDOUT(MONOTONE2 cat revision $REV4, MONOTONE3 cat revision $REV4) CHECK_SAME_STDOUT(MONOTONE2 ls certs $REV4, MONOTONE3 ls certs $REV4) # Also exercise files and manifest -AT_CHECK(MONOTONE3 checkout $REV4 somedir3, [], [ignore], [ignore]) +AT_CHECK(MONOTONE3 checkout --revision=$REV4 somedir3, [], [ignore], [ignore]) NETSYNC_SERVE_STOP --- tests/t_rename_added_in_rename.at +++ tests/t_rename_added_in_rename.at @@ -50,7 +50,7 @@ AT_CHECK(MONOTONE merge, [], [ignore], [ignore]) -AT_CHECK(MONOTONE checkout $BASE_R test_dir, [], [ignore], [ignore]) +AT_CHECK(MONOTONE checkout --revision=$BASE_R test_dir, [], [ignore], [ignore]) AT_CHECK( (cd test_dir && MONOTONE update --branch=testbranch), [], [ignore], [ignore]) TEST_R=`cd test_dir; BASE_REVISION` --- tests/t_rename_dir_cross_level.at +++ tests/t_rename_dir_cross_level.at @@ -56,7 +56,7 @@ AT_CHECK(MONOTONE merge --branch=testbranch, [], [ignore], [ignore]) -AT_CHECK(MONOTONE checkout $BASE_R test_dir, [], [ignore], [ignore]) +AT_CHECK(MONOTONE checkout --revision=$BASE_R test_dir, [], [ignore], [ignore]) AT_CHECK( (cd test_dir && MONOTONE --branch=testbranch update), [], [ignore], [ignore]) MERGED_R=`cd test_dir && BASE_REVISION` AT_CHECK(test $BASE_R != $MERGED_R) --- tests/t_rename_dir_patch.at +++ tests/t_rename_dir_patch.at @@ -20,7 +20,7 @@ AT_CHECK(MONOTONE --branch=testbranch merge, [], [ignore], [ignore]) -AT_CHECK(MONOTONE checkout $BASE_R test_dir, [], [ignore], [ignore]) +AT_CHECK(MONOTONE checkout --revision=$BASE_R test_dir, [], [ignore], [ignore]) AT_CHECK( (cd test_dir && MONOTONE update --branch=testbranch), [], [ignore], [ignore]) AT_CHECK(test ! -f test_dir/foo/a) --- tests/t_single_char_filenames.at +++ tests/t_single_char_filenames.at @@ -25,17 +25,17 @@ NULL_R_SHA1=`BASE_REVISION` AT_CHECK(rm -rf MT) -AT_CHECK(MONOTONE checkout $A_R_SHA1 a-dir, [], [ignore], [ignore]) +AT_CHECK(MONOTONE checkout --revision=$A_R_SHA1 a-dir, [], [ignore], [ignore]) AT_CHECK(test -e a-dir/a, [], [ignore]) AT_CHECK(test ! -e a-dir/b, [], [ignore]) AT_CHECK(rm -rf MT) -AT_CHECK(MONOTONE checkout $B_R_SHA1 b-dir, [], [ignore], [ignore]) +AT_CHECK(MONOTONE checkout --revision=$B_R_SHA1 b-dir, [], [ignore], [ignore]) AT_CHECK(test ! -e b-dir/a, [], [ignore]) AT_CHECK(test -e b-dir/b, [], [ignore]) AT_CHECK(rm -rf MT) -AT_CHECK(MONOTONE checkout $NULL_R_SHA1 null-dir, [], [ignore], [ignore]) +AT_CHECK(MONOTONE checkout --revision=$NULL_R_SHA1 null-dir, [], [ignore], [ignore]) AT_CHECK(test ! -e null-dir/a, [], [ignore]) AT_CHECK(test ! -e null-dir/b, [], [ignore]) --- tests/t_subdir_add.at +++ tests/t_subdir_add.at @@ -16,7 +16,7 @@ COMMIT(testbranch) REV=`BASE_REVISION` -AT_CHECK(MONOTONE checkout $REV codir, [], [ignore], [ignore]) +AT_CHECK(MONOTONE checkout --revision=$REV codir, [], [ignore], [ignore]) AT_CHECK(cmp subdir/foo codir/subdir/foo) AT_CHECK(cmp subdir/anotherdir/bar codir/subdir/anotherdir/bar) --- tests/t_subdir_attr.at +++ tests/t_subdir_attr.at @@ -23,7 +23,7 @@ # see if they're right -AT_CHECK(MONOTONE checkout $REV co-dir, [], [stdout]) +AT_CHECK(MONOTONE checkout --revision=$REV co-dir, [], [stdout]) AT_CHECK(grep "test_attr:foo/foodata:true" stdout, [], [ignore]) AT_CHECK(grep "test_attr:foo/bar/bardata:false" stdout, [], [ignore]) --- tests/t_subdir_drop.at +++ tests/t_subdir_drop.at @@ -18,7 +18,7 @@ REV=`BASE_REVISION` # Create a checkout we can update -AT_CHECK(MONOTONE checkout $REV codir, [], [ignore], [ignore]) +AT_CHECK(MONOTONE checkout --revision=$REV codir, [], [ignore], [ignore]) AT_CHECK( (cd subdir && MONOTONE drop foo), [], [ignore], [ignore]) AT_CHECK( (cd subdir && MONOTONE drop anotherdir), [], [ignore], [ignore]) --- tests/t_subdir_rename.at +++ tests/t_subdir_rename.at @@ -17,7 +17,7 @@ AT_CHECK( (cd subdir && MONOTONE rename anotherdir ../anotherdir-renamed), [], [ignore], [ignore]) COMMIT(testbranch) -AT_CHECK(MONOTONE checkout $REV codir, [], [ignore], [ignore]) +AT_CHECK(MONOTONE checkout --revision=$REV codir, [], [ignore], [ignore]) AT_CHECK( (cd codir && MONOTONE update --branch=testbranch), [], [ignore], [ignore]) AT_CHECK(test -f codir/subdir/foo, [1]) AT_CHECK(test -f codir/subdir/anotherdir/bar, [1]) --- tests/t_subdir_revert.at +++ tests/t_subdir_revert.at @@ -12,7 +12,7 @@ REV=`BASE_REVISION` # Create a checkout we can play with -AT_CHECK(MONOTONE checkout $REV codir, [], [ignore], [ignore]) +AT_CHECK(MONOTONE checkout --revision=$REV codir, [], [ignore], [ignore]) # Write to the checked out files AT_DATA(codir/subdir/foo, [other data --- tests/t_tags.at +++ tests/t_tags.at @@ -45,7 +45,7 @@ AT_CHECK(rm -rf MT file1 file2 file3) -AT_CHECK(MONOTONE co tag1 ., [], [ignore], [ignore]) +AT_CHECK(MONOTONE co --revision=tag1 ., [], [ignore], [ignore]) TAG1=`BASE_REVISION` AT_CHECK(test $TAG1 = $REV1) AT_CHECK(test -e file1, [0], [ignore], [ignore]) @@ -54,7 +54,7 @@ AT_CHECK(rm -rf MT file1 file2 file3) -AT_CHECK(MONOTONE co tag2 ., [], [ignore], [ignore]) +AT_CHECK(MONOTONE co --revision=tag2 ., [], [ignore], [ignore]) TAG2=`BASE_REVISION` AT_CHECK(test $TAG2 = $REV2) AT_CHECK(test -e file1, [0], [ignore], [ignore]) @@ -63,7 +63,7 @@ AT_CHECK(rm -rf MT file1 file2 file3) -AT_CHECK(MONOTONE co tag3 ., [], [ignore], [ignore]) +AT_CHECK(MONOTONE co --revision=tag3 ., [], [ignore], [ignore]) TAG3=`BASE_REVISION` AT_CHECK(test $TAG1 = $REV1) AT_CHECK(test -e file1, [0], [ignore], [ignore]) --- tests/t_update_off_branch.at +++ tests/t_update_off_branch.at @@ -11,7 +11,7 @@ COMMIT(otherbranch) OR=`BASE_REVISION` -AT_CHECK(MONOTONE checkout --branch=testbranch $TR codir, [], [ignore], [ignore]) +AT_CHECK(MONOTONE checkout --branch=testbranch --revision=$TR codir, [], [ignore], [ignore]) AT_CHECK(cd codir && MONOTONE update $OR, [1], [ignore], [ignore]) AT_CHECK(cd codir && MONOTONE update --branch=otherbranch $OR, [], [ignore], [ignore]) --- tests/t_versions.at +++ tests/t_versions.at @@ -33,7 +33,7 @@ AT_CHECK(cmp stdout testfile, [], [ignore]) AT_CHECK(rm -rf MT) - AT_CHECK(MONOTONE checkout $RSHA ., [], [stdout]) + AT_CHECK(MONOTONE checkout --revision=$RSHA ., [], [stdout]) AT_CHECK(SHA1(testfile), [], [stdout]) AT_CHECK(cmp stdout fsha-$i, [], [ignore]) --- testsuite.at +++ testsuite.at @@ -200,7 +200,7 @@ AT_CHECK(rm -rf MT.old) AT_CHECK(mv MT MT.old) AT_CHECK(rm $1) -AT_CHECK(MONOTONE checkout $2 ., [], [ignore]) +AT_CHECK(MONOTONE checkout --revision=$2 ., [], [ignore]) AT_CHECK(mv MT.old/options MT) PROBE_R_SHA=`BASE_REVISION` PROBE_F_SHA=`SHA1($1)` @@ -213,8 +213,8 @@ AT_CHECK(rm -rf MT.old) AT_CHECK(mv MT MT.old) m4_case([$2], - [], [AT_CHECK(MONOTONE checkout $1 ., [], [ignore])], - [AT_CHECK(MONOTONE --branch=$2 checkout $1 ., [], [ignore])]) + [], [AT_CHECK(MONOTONE checkout --revision=$1 ., [], [ignore])], + [AT_CHECK(MONOTONE --branch=$2 checkout --revision=$1 ., [], [ignore])]) AT_CHECK(mv MT.old/options MT) PROBE_R_SHA=`BASE_REVISION` AT_CHECK(test $PROBE_R_SHA = $1)