# # patch "ChangeLog" # from [5b0ca0cec6a936241d8cabb9e229331f5eda3811] # to [6027ab0b73f263950bb5c1fc41b57b8dcddbf0b3] # # patch "commands.cc" # from [943e10f67b3f0b4397b64e4bb2c4191857730e5c] # to [ce4ca202a5c987b4fb90ce00af8794e8e18fd58d] # # patch "monotone.texi" # from [88270b0bf2d12a85a84aa047a8735cb3cdef62e6] # to [14db6785721e19e72f07a5dcc2b26ef58a895887] # # patch "tests/t_add_edge.at" # from [11b5bb7be4a2dbe66cd94999b1ec9fd1c34f5b30] # to [d0c5635df674fdc6c33d5d66a0e144398e995b04] # # patch "tests/t_cat_file_by_name.at" # from [45f9704b56b2b74f16c5579539bc1c6f777b1e56] # to [a8bd5077ca1e36b9ce1082c3b844603afdfea3ea] # # patch "tests/t_change_empty_file.at" # from [207dd154775a8ff419370bbfd7099f118618010f] # to [692dcb0629167d5f44981d62347bfb14b50ef9a6] # # patch "tests/t_cvsimport.at" # from [a212a3cbc77e3bd78bb0bf4aea478769c93dc6d6] # to [cdb0a29f99f219dd5c2f4ebb2f3da47003ca10d7] # # patch "tests/t_cvsimport_deleted_invar.at" # from [4ee87dff9e284fdf7abf6ca72616c55b32f39a3d] # to [f6cef14b364d39403eaf99f2a18ad255047f4ca7] # # patch "tests/t_cvsimport_drepper.at" # from [5b803327cc8752bab50ced9a0efc4ce59a5244ef] # to [99b2dc609f08a0dfa0649226a11951534ce6c743] # # patch "tests/t_cvsimport_drepper2.at" # from [530e44ff587e4ad3ce3ca95026f1990f505c8e5e] # to [6cbbd86a7d4476646de2b9db9a6bbaf199296701] # # patch "tests/t_cvsimport_manifest_cycle.at" # from [57d28d7204339cc9645554b6e5d47fd8128c46c7] # to [690f76368733c0e909bde2a46f8edea144f7569b] # # patch "tests/t_cvsimport_samelog.at" # from [e7c5ee56f45b0da54ace0fb9282c19604104610d] # to [ccac785c1ac8421e23723f4cdd9e69ce10be7e93] # # patch "tests/t_database_check.at" # from [208a81e56219fc72a6db6330841255baab90824b] # to [7cd1598d68805979e7b435a58dede713dc38ad25] # # patch "tests/t_db_kill_rev_locally.at" # from [a5043ae56c1d9ab1897594010d21b5e0851e572c] # to [dba54fa06f40b817e7123cd375b78b96f62a4d43] # # patch "tests/t_empty_id_completion.at" # from [e44949007099f908f22a84276bf5e9d1ae85cf74] # to [d7e0f49748fa33fcfa33f847b82308a84d1965bd] # # patch "tests/t_epoch.at" # from [532fcc6bba04a62754b4bb1d6f1e3dda9c463c9f] # to [f49f3179bd8a59fb961258f995af2b460afb4de4] # # patch "tests/t_epoch_server.at" # from [cf758cee3e08a84d727df1b43815cc30737d4190] # to [13e3ea41bf04d84ccfc2dcf5b6e4d6d6319c6241] # # patch "tests/t_erename.at" # from [3bcc3d449a1759322fc3b24971d462bb57ad4b25] # to [ef285c34d12c67627b9b6dee00c3957dbe46be12] # # patch "tests/t_i18n_file.at" # from [d2d853d11983314f03ef8703f42f3a8c95d7cde6] # to [a788a76de1663a1ec1b9ef8d571763ed618f2b88] # # patch "tests/t_import.at" # from [fdb19cf2022139b6c5beb598d138a5e9798cb23f] # to [acd29dd84259e7d8d08e79c2567a66b78928c430] # # patch "tests/t_merge_add_del.at" # from [20f850e8ede0f7c4240c1f9cb21855f151f89df2] # to [14ee39bb126bd3469017d27f471434e4429a33f9] # # patch "tests/t_movedel.at" # from [b0825386b5bb4346194fbb6348d7706a313ee3b8] # to [a3cf97dca10d5b59aeb7e995f13b2268ef1f4112] # # patch "tests/t_movepatch.at" # from [83acbd4252c65f8826dab7107d478626f32243be] # to [e7ef086e17d1348933f44acc0147cde8774450ca] # # patch "tests/t_netsync.at" # from [49202a1a3045c6f30e90cfcb4672b9df4dc7a772] # to [31e8c678b935b657624d1ca98391efc8dbf921ad] # # patch "tests/t_netsync_exclude.at" # from [5a8302a38e8e62edb41b4332822cf82458177d85] # to [caed6eeeec58a85d35684c6cd8ae9db183a44fa0] # # patch "tests/t_netsync_exclude_default.at" # from [11beeeb0a601ba2f06d47c89b228cdfbd3f660f9] # to [e60e806f5ae6a160048081dccff8ce46c74b8551] # # patch "tests/t_netsync_globs.at" # from [0a8790052bf9a94b4a47f8c6e64a2aa98de4649a] # to [9d07331154e29c0e432b5c69d997357275c51dc5] # # patch "tests/t_netsync_nocerts.at" # from [fb066e2badcad62b3b9dfed65f9267ee54411b39] # to [5b1e9d87f055a58f2c7d3ee0cfaed2e185469955] # # patch "tests/t_netsync_permissions.at" # from [887e4062ab6faa6283d46f0b8dba342f898a23d0] # to [2b2fdda0e34c5c71bad5451e5acdec7416f54162] # # patch "tests/t_netsync_read_permissions.at" # from [0550bdeac357f6794dd4849b2f0c0ba05a8c6286] # to [d8c9cc08a754ee36cfb0d18e349647bf815733ff] # # patch "tests/t_netsync_single.at" # from [b3d48b1881c63ccb549d37726ae2d7144a856820] # to [07187540f12b7fd8cf6ad91b02225c052745a011] # # patch "tests/t_normalized_filenames.at" # from [204c06103e335f45230d94fc86ebcb686e6f7959] # to [bf31f5c1d260142de5455950615209dbd4f9c9b7] # # patch "tests/t_persistent_server_revision.at" # from [3462ba494a0efb9890baf14f1aed76e53b435967] # to [04fe8d8a529d07a8bfbb01e999bbbb99eecb254b] # # patch "tests/t_remerge.at" # from [83424c6866711fddcd090865370ff3f9db1a37b9] # to [e9cf7d222425e8ed9f7c10a3714af3e5bf5b143e] # # patch "tests/t_rename.at" # from [9294b9b72fc4eb10f0954f07d3a6103e0c123ab0] # to [4ec762efe273f44b4a63dcc27cb9c40b0af312b4] # # patch "tests/t_renamed.at" # from [40f40d3f72061961a6c39af95641177b3289110e] # to [94f19a1bcd6feb2de88e5c4ab0133065ccb64c9a] # # patch "tests/t_scan.at" # from [5269c1fe377163e3a6743b0737e95b45e005b902] # to [b203ac2f2e3960f90effbaba0595c6681c34e386] # # patch "tests/t_set_default.at" # from [95505520a46b66a6120dae44779dbb01f16fdafb] # to [4869ee5e5dee61a59e25a34facb6f5834696651d] # # patch "tests/t_singlecvs.at" # from [7d51de64a3015214985b09b0d744f6c22afbf986] # to [3ab763cc4821f58ecc8cea7ff0d1b8f62004c8ad] # # patch "tests/t_update_with_pending_add.at" # from [8394d96a687a14e6dcae400383d3bef0e76d1f78] # to [357bc4be7680dd9d3a898ae914aa1c6a11a47996] # # patch "tests/t_update_with_pending_drop.at" # from [d52d3736c75a01c308500e12237edaf37e8f345f] # to [00cdc65ce50b1b3b3c54d0542653c7ec47e27072] # # patch "tests/t_update_with_pending_rename.at" # from [d6e60af87b017d9269e0c3c797c93d0a696648fc] # to [99e70ea11a371b7b400bd8f4dd1fad467f9645e4] # # patch "tests/t_versions.at" # from [91d6fb7180cd75fde30d7f5b82e29cf5feaf9277] # to [49105adca6a5a867ec44be87731651eacb8cb437] # ======================================================================== --- ChangeLog 5b0ca0cec6a936241d8cabb9e229331f5eda3811 +++ ChangeLog 6027ab0b73f263950bb5c1fc41b57b8dcddbf0b3 @@ -1,5 +1,30 @@ 2005-09-04 Grahame Bowland + * commands.cc: siplify the monotone cat command + to "monotone cat [-r] FIELNAME" (as in bug #12597) + * monotone.texi: update documentation of "monotone cat" + * tests/t_add_edge.at, tests/t_cat_file_by_name.at, + tests/t_change_empty_file.at, tests/t_cvsimport.at, + tests/t_cvsimport_deleted_invar.at, tests/t_cvsimport_drepper.at, + tests/t_cvsimport_drepper2.at, tests/t_cvsimport_manifest_cycle.at, + tests/t_cvsimport_samelog.at, tests/t_database_check.at, + tests/t_db_kill_rev_locally.at, tests/t_empty_id_completion.at, + tests/t_epoch.at, tests/t_epoch_server.at, tests/t_erename.at, + tests/t_i18n_file.at, tests/t_import.at, tests/t_merge_add_del.at, + tests/t_movedel.at, tests/t_movepatch.at, tests/t_netsync.at, + tests/t_netsync_exclude.at, tests/t_netsync_exclude_default.at, + tests/t_netsync_globs.at, tests/t_netsync_nocerts.at, + tests/t_netsync_permissions.at, tests/t_netsync_read_permissions.at, + tests/t_netsync_single.at, tests/t_normalized_filenames.at, + tests/t_persistent_server_revision.at, tests/t_remerge.at, + tests/t_rename.at, tests/t_renamed.at, tests/t_scan.at, + tests/t_set_default.at, tests/t_singlecvs.at, + tests/t_update_with_pending_add.at, tests/t_update_with_pending_drop.at, + tests/t_update_with_pending_rename.at, tests/t_versions.at: + use automation interface rather than "monotone cat" + +2005-09-04 Grahame Bowland + * ChangeLog: fix up screwed up three-way merge 2005-09-04 Grahame Bowland ======================================================================== --- commands.cc 943e10f67b3f0b4397b64e4bb2c4191857730e5c +++ commands.cc ce4ca202a5c987b4fb90ce00af8794e8e18fd58d @@ -1283,114 +1283,46 @@ } CMD(cat, N_("informative"), - N_("(file|manifest|revision) [ID]\n" - "file REVISION FILENAME"), - N_("write file, manifest, or revision from database to stdout"), - OPT_NONE) + N_("FILENAME"), + N_("write file from database to stdout"), + OPT_REVISION) { - if (args.size() < 1 || args.size() > 3) + if (args.size() != 1) throw usage(name); - if (args.size() == 3 && idx(args, 0)() != "file") - throw usage(name); + if (app.revision_selectors.size() == 0) + app.require_working_copy(); + transaction_guard guard(app.db); - if (idx(args, 0)() == "file") - { - file_id ident; - if (args.size() == 1) - throw usage(name); - else if (args.size() == 2) - { - complete(app, idx(args, 1)(), ident); - - N(app.db.file_version_exists(ident), - F("no file version %s found in database") % ident); - } - else if (args.size() == 3) - { - revision_id rid; - complete(app, idx(args, 1)(), rid); - // paths are interpreted as standard external ones when we're in a - // working copy, but as project-rooted external ones otherwise - file_path fp; - if (app.found_working_copy) - fp = file_path_external(idx(args, 2)); - else - fp = file_path_internal_from_user(idx(args, 2)); - manifest_id mid; - app.db.get_revision_manifest(rid, mid); - manifest_map m; - app.db.get_manifest(mid, m); - manifest_map::const_iterator i = m.find(fp); - N(i != m.end(), F("no file '%s' found in revision '%s'\n") % fp % rid); - ident = manifest_entry_id(i); - } - else - throw usage(name); - - file_data dat; - L(F("dumping file %s\n") % ident); - app.db.get_file_version(ident, dat); - cout.write(dat.inner()().data(), dat.inner()().size()); - } - else if (idx(args, 0)() == "manifest") - { - manifest_data dat; - manifest_id ident; + file_id ident; + revision_id rid; + if (app.revision_selectors.size() == 0) + get_revision_id(rid); + else + complete(app, idx(app.revision_selectors, 0)(), rid); + N(app.db.revision_exists(rid), F("no such revision '%s'") % rid); - if (args.size() == 1) - { - revision_set rev; - manifest_map m_old, m_new; + // paths are interpreted as standard external ones when we're in a + // working copy, but as project-rooted external ones otherwise + file_path fp; + if (app.found_working_copy) + fp = file_path_external(idx(args, 0)); + else + fp = file_path_internal_from_user(idx(args, 0)); + manifest_id mid; + app.db.get_revision_manifest(rid, mid); + manifest_map m; + app.db.get_manifest(mid, m); + manifest_map::const_iterator i = m.find(fp); + N(i != m.end(), F("no file '%s' found in revision '%s'\n") % fp % rid); + ident = manifest_entry_id(i); + + file_data dat; + L(F("dumping file %s\n") % ident); + app.db.get_file_version(ident, dat); + cout.write(dat.inner()().data(), dat.inner()().size()); - app.require_working_copy(); - calculate_unrestricted_revision(app, rev, m_old, m_new); - - calculate_ident(m_new, ident); - write_manifest_map(m_new, dat); - } - else - { - complete(app, idx(args, 1)(), ident); - N(app.db.manifest_version_exists(ident), - F("no manifest version %s found in database") % ident); - app.db.get_manifest_version(ident, dat); - } - - L(F("dumping manifest %s\n") % ident); - cout.write(dat.inner()().data(), dat.inner()().size()); - } - - else if (idx(args, 0)() == "revision") - { - revision_data dat; - revision_id ident; - - if (args.size() == 1) - { - revision_set rev; - manifest_map m_old, m_new; - - app.require_working_copy(); - calculate_unrestricted_revision(app, rev, m_old, m_new); - calculate_ident(rev, ident); - write_revision_set(rev, dat); - } - else - { - complete(app, idx(args, 1)(), ident); - N(app.db.revision_exists(ident), - F("no revision %s found in database") % ident); - app.db.get_revision(ident, dat); - } - - L(F("dumping revision %s\n") % ident); - cout.write(dat.inner()().data(), dat.inner()().size()); - } - else - throw usage(name); - guard.commit(); } ======================================================================== --- monotone.texi 88270b0bf2d12a85a84aa047a8735cb3cdef62e6 +++ monotone.texi 14db6785721e19e72f07a5dcc2b26ef58a895887 @@ -3354,20 +3354,18 @@ @section Tree @ftable @command address@hidden monotone cat file @var{id} address@hidden monotone cat file @var{rid} @var{path} address@hidden monotone cat manifest address@hidden monotone cat manifest @var{id} address@hidden monotone cat revision address@hidden monotone cat revision @var{id} address@hidden monotone cat @var{path} address@hidden monotone cat address@hidden @var{path} -These commands write the contents of a specific file, manifest or -revision @var{id} to standard output, or the contents of the file address@hidden as it was at revision @var{rid}. They are useful if you wish -to inspect a version without checking it out into your working copy. An -unspecified manifest or revision @var{id} is allowed from within a -working copy and refers to the current manifest or revision. +Write the contents of a specific file @var{path} to standard output. +Without a @option{--revision} argument, the command outputs the +contents of @var{path} as found in the current revision. This requires +the command be executed from within a working copy. + +With an explicit @option{--revision} argument, the command outputs +contents of @var{path} at that revision. + @item monotone checkout address@hidden @var{directory} @itemx monotone co address@hidden @var{directory} @itemx monotone address@hidden checkout @var{directory} ======================================================================== --- tests/t_add_edge.at 11b5bb7be4a2dbe66cd94999b1ec9fd1c34f5b30 +++ tests/t_add_edge.at d0c5635df674fdc6c33d5d66a0e144398e995b04 @@ -32,7 +32,7 @@ MERGED=`BASE_REVISION` -AT_CHECK(MONOTONE cat revision $MERGED, [], [stdout]) +AT_CHECK(MONOTONE automate get_revision $MERGED, [], [stdout]) AT_CHECK(mv stdout rev) AT_CHECK(grep add_file rev, [1], [ignore]) ======================================================================== --- tests/t_cat_file_by_name.at 45f9704b56b2b74f16c5579539bc1c6f777b1e56 +++ tests/t_cat_file_by_name.at a8bd5077ca1e36b9ce1082c3b844603afdfea3ea @@ -1,4 +1,4 @@ -AT_SETUP([cat file REV PATH]) +AT_SETUP([cat -r REV PATH]) MONOTONE_SETUP AT_DATA(r0testfile, [r0 test file @@ -22,25 +22,25 @@ COMMIT(testbranch) R1=`BASE_REVISION` -AT_CHECK(MONOTONE cat file $R0 testfile, [], [stdout], [ignore]) +AT_CHECK(MONOTONE cat -r $R0 testfile, [], [stdout], [ignore]) AT_CHECK(CANONICALISE(stdout)) AT_CHECK(cmp stdout r0testfile, [], [ignore]) -AT_CHECK(MONOTONE cat file $R0 otherfile, [], [stdout], [ignore]) +AT_CHECK(MONOTONE cat -r $R0 otherfile, [], [stdout], [ignore]) AT_CHECK(CANONICALISE(stdout)) AT_CHECK(cmp stdout r0otherfile, [], [ignore]) -AT_CHECK(MONOTONE cat file $R1 testfile, [], [stdout], [ignore]) +AT_CHECK(MONOTONE cat -r $R1 testfile, [], [stdout], [ignore]) AT_CHECK(CANONICALISE(stdout)) AT_CHECK(cmp stdout r1testfile, [], [ignore]) -CHECK_SAME_CANONICALISED_STDOUT(cd subdir && MONOTONE cat file $R0 testfile, cat subfile) +CHECK_SAME_CANONICALISED_STDOUT(cd subdir && MONOTONE cat -r $R0 testfile, cat subfile) AT_CHECK(rm -rf MT) -CHECK_SAME_CANONICALISED_STDOUT(MONOTONE cat file $R0 testfile, cat r0testfile) +CHECK_SAME_CANONICALISED_STDOUT(MONOTONE cat -r $R0 testfile, cat r0testfile) -AT_CHECK(MONOTONE cat file $R0 no_such_file, [1], [ignore], [ignore]) -AT_CHECK(MONOTONE cat file $R0 "", [1], [ignore], [ignore]) +AT_CHECK(MONOTONE cat -r $R0 no_such_file, [1], [ignore], [ignore]) +AT_CHECK(MONOTONE cat -r $R0 "", [1], [ignore], [ignore]) AT_CLEANUP ======================================================================== --- tests/t_change_empty_file.at 207dd154775a8ff419370bbfd7099f118618010f +++ tests/t_change_empty_file.at 692dcb0629167d5f44981d62347bfb14b50ef9a6 @@ -27,7 +27,7 @@ from @<:@da39a3ee5e6b4b0d3255bfef95601890afd80709@:>@ to @<:@b0d699dae7df285e64265ec6b46538b0ce785da0@:>@ ]) -AT_CHECK(MONOTONE cat revision c1dc9e4d249ac7a5f6143a87a1e90246d8be0ee5, +AT_CHECK(MONOTONE automate get_revision c1dc9e4d249ac7a5f6143a87a1e90246d8be0ee5, [], [stdout], [ignore]) AT_CHECK(CANONICALISE(stdout)) AT_CHECK(cmp stdout expout, [], [ignore]) ======================================================================== --- tests/t_cvsimport.at a212a3cbc77e3bd78bb0bf4aea478769c93dc6d6 +++ tests/t_cvsimport.at cdb0a29f99f219dd5c2f4ebb2f3da47003ca10d7 @@ -50,10 +50,10 @@ # repo to cvs_import instead of just a module. AT_CHECK(MONOTONE --branch=testbranch cvs_import $CVSROOT, [1], [ignore], [ignore]) AT_CHECK(MONOTONE --branch=testbranch cvs_import $CVSROOT/testdir, [], [ignore], [ignore]) -AT_CHECK(MONOTONE cat file $TSHA0, [], [ignore]) -AT_CHECK(MONOTONE cat file $TSHA1, [], [ignore]) -AT_CHECK(MONOTONE cat file $TSHA2, [], [ignore]) -AT_CHECK(MONOTONE cat file $TSHA3, [], [ignore]) +AT_CHECK(MONOTONE automate get_file $TSHA0, [], [ignore]) +AT_CHECK(MONOTONE automate get_file $TSHA1, [], [ignore]) +AT_CHECK(MONOTONE automate get_file $TSHA2, [], [ignore]) +AT_CHECK(MONOTONE automate get_file $TSHA3, [], [ignore]) # also check that history is okay -- has a unique head, and it's the # right one. ======================================================================== --- tests/t_cvsimport_deleted_invar.at 4ee87dff9e284fdf7abf6ca72616c55b32f39a3d +++ tests/t_cvsimport_deleted_invar.at f6cef14b364d39403eaf99f2a18ad255047f4ca7 @@ -28,9 +28,9 @@ AT_CHECK(MONOTONE --branch=testbranch cvs_import $CVSROOT/attest, [], [ignore], [ignore]) -AT_CHECK(MONOTONE cat file $TSHA0, [], [ignore]) -AT_CHECK(MONOTONE cat file $TSHA1, [], [ignore]) -AT_CHECK(MONOTONE cat file $TSHA2, [], [ignore]) +AT_CHECK(MONOTONE automate get_file $TSHA0, [], [ignore]) +AT_CHECK(MONOTONE automate get_file $TSHA1, [], [ignore]) +AT_CHECK(MONOTONE automate get_file $TSHA2, [], [ignore]) AT_CLEANUP ======================================================================== --- tests/t_cvsimport_drepper.at 5b803327cc8752bab50ced9a0efc4ce59a5244ef +++ tests/t_cvsimport_drepper.at 99b2dc609f08a0dfa0649226a11951534ce6c743 @@ -185,7 +185,7 @@ AT_CHECK(MONOTONE --branch=foo.bar cvs_import e, [], [ignore], [ignore]) AT_CHECK(MONOTONE --branch=foo.bar.disasm-branch co) -AT_CHECK(cd foo.bar.disasm-branch && MONOTONE cat manifest, [], [stdout]) +AT_CHECK(cd foo.bar.disasm-branch && MONOTONE automate get_manifest, [], [stdout]) AT_CHECK(CANONICALISE(stdout)) AT_CHECK(cmp test.manifest stdout) ======================================================================== --- tests/t_cvsimport_drepper2.at 530e44ff587e4ad3ce3ca95026f1990f505c8e5e +++ tests/t_cvsimport_drepper2.at 6cbbd86a7d4476646de2b9db9a6bbaf199296701 @@ -66,7 +66,7 @@ AT_CHECK(MONOTONE --branch=foo.bar cvs_import e, [], [ignore], [ignore]) AT_CHECK(MONOTONE --branch=foo.bar co) -AT_CHECK(cd foo.bar && MONOTONE cat manifest, [], [stdout]) +AT_CHECK(cd foo.bar && MONOTONE automate get_manifest, [], [stdout]) AT_CHECK(CANONICALISE(stdout)) AT_CHECK(cmp test.manifest stdout) AT_CHECK(cd foo.bar && MONOTONE list tags, [], [stdout]) ======================================================================== --- tests/t_cvsimport_manifest_cycle.at 57d28d7204339cc9645554b6e5d47fd8128c46c7 +++ tests/t_cvsimport_manifest_cycle.at 690f76368733c0e909bde2a46f8edea144f7569b @@ -28,7 +28,7 @@ AT_CHECK(MONOTONE --branch=testbranch cvs_import $CVSROOT/attest, [], [ignore], [ignore]) -AT_CHECK(MONOTONE cat file $TSHA0, [], [ignore]) +AT_CHECK(MONOTONE automate get_file $TSHA0, [], [ignore]) AT_CLEANUP ======================================================================== --- tests/t_cvsimport_samelog.at e7c5ee56f45b0da54ace0fb9282c19604104610d +++ tests/t_cvsimport_samelog.at ccac785c1ac8421e23723f4cdd9e69ce10be7e93 @@ -47,10 +47,10 @@ # import into monotone and check presence of files AT_CHECK(MONOTONE --branch=testbranch cvs_import $CVSROOT/testdir, [], [ignore], [ignore]) -AT_CHECK(MONOTONE cat file $TSHA0, [], [ignore]) -AT_CHECK(MONOTONE cat file $TSHA1, [], [ignore]) -AT_CHECK(MONOTONE cat file $TSHA2, [], [ignore]) -AT_CHECK(MONOTONE cat file $TSHA3, [], [ignore]) +AT_CHECK(MONOTONE automate get_file $TSHA0, [], [ignore]) +AT_CHECK(MONOTONE automate get_file $TSHA1, [], [ignore]) +AT_CHECK(MONOTONE automate get_file $TSHA2, [], [ignore]) +AT_CHECK(MONOTONE automate get_file $TSHA3, [], [ignore]) # also check that history is okay -- has a unique head, and it's the # right one. ======================================================================== --- tests/t_database_check.at 208a81e56219fc72a6db6330841255baab90824b +++ tests/t_database_check.at 7cd1598d68805979e7b435a58dede713dc38ad25 @@ -41,7 +41,7 @@ AT_CHECK(MONOTONE add file1, [], [ignore], [ignore]) AT_CHECK(MONOTONE commit --branch=test --message='add file1', [], [ignore], [ignore]) REV1=`BASE_REVISION` -MAN1=`monotone --norc cat manifest | monotone --norc identify` +MAN1=`monotone --norc automate get_manifest | monotone --norc identify` AT_CHECK(MONOTONE add file2, [], [ignore], [ignore]) AT_CHECK(MONOTONE commit --branch=test --message='add file2', [], [ignore], [ignore]) ======================================================================== --- tests/t_db_kill_rev_locally.at a5043ae56c1d9ab1897594010d21b5e0851e572c +++ tests/t_db_kill_rev_locally.at dba54fa06f40b817e7123cd375b78b96f62a4d43 @@ -16,13 +16,13 @@ # trying to kill the ancestor. This *is supposed to fail* AT_CHECK(MONOTONE db kill_rev_locally $ANCESTOR, [1], [ignore], [ignore]) -AT_CHECK(MONOTONE cat revision $ANCESTOR, [], [ignore], [ignore]) +AT_CHECK(MONOTONE automate get_revision $ANCESTOR, [], [ignore], [ignore]) AT_CHECK(MONOTONE db check, [], [ignore], [ignore]) # killing children is ok, though :) -AT_CHECK(MONOTONE cat revision $CHILD, [], [ignore], [ignore]) +AT_CHECK(MONOTONE automate get_revision $CHILD, [], [ignore], [ignore]) AT_CHECK(MONOTONE db kill_rev_locally $CHILD, [], [ignore], [ignore]) -AT_CHECK(MONOTONE cat revision $CHILD, [1], [ignore], [ignore]) +AT_CHECK(MONOTONE automate get_revision $CHILD, [1], [ignore], [ignore]) AT_CHECK(MONOTONE db check, [], ignore, ignore) AT_CLEANUP ======================================================================== --- tests/t_empty_id_completion.at e44949007099f908f22a84276bf5e9d1ae85cf74 +++ tests/t_empty_id_completion.at d7e0f49748fa33fcfa33f847b82308a84d1965bd @@ -1,10 +1,7 @@ AT_SETUP([empty id completion]) MONOTONE_SETUP # regression test: completing the revision "" doesn't crash -AT_CHECK(MONOTONE cat revision "", [1], [ignore], [ignore]) -# might as well check the others... -AT_CHECK(MONOTONE cat manifest "", [1], [ignore], [ignore]) -AT_CHECK(MONOTONE cat file "", [1], [ignore], [ignore]) +AT_CHECK(MONOTONE cat -r "" nosuchfile, [1], [ignore], [ignore]) AT_CLEANUP ======================================================================== --- tests/t_epoch.at 532fcc6bba04a62754b4bb1d6f1e3dda9c463c9f +++ tests/t_epoch.at f49f3179bd8a59fb961258f995af2b460afb4de4 @@ -55,8 +55,8 @@ # double-check that the revisions didn't change (because otherwise our # next test is unreliable): -AT_CHECK(MONOTONE cat revision $VER1, [], [ignore], [ignore]) +AT_CHECK(MONOTONE automate get_revision $VER1, [], [ignore], [ignore]) # confirm, we did not get the new revision -AT_CHECK(MONOTONE2 cat revision $VER1, [1], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $VER1, [1], [ignore], [ignore]) AT_CLEANUP ======================================================================== --- tests/t_epoch_server.at cf758cee3e08a84d727df1b43815cc30737d4190 +++ tests/t_epoch_server.at 13e3ea41bf04d84ccfc2dcf5b6e4d6d6319c6241 @@ -56,8 +56,8 @@ # double-check that the revisions didn't change (because otherwise our # next test is unreliable): -AT_CHECK(MONOTONE2 cat revision $VER1, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $VER1, [], [ignore], [ignore]) # confirm, we did not get the new revision -AT_CHECK(MONOTONE cat revision $VER1, [1], [ignore], [ignore]) +AT_CHECK(MONOTONE automate get_revision $VER1, [1], [ignore], [ignore]) AT_CLEANUP ======================================================================== --- tests/t_erename.at 3bcc3d449a1759322fc3b24971d462bb57ad4b25 +++ tests/t_erename.at ef285c34d12c67627b9b6dee00c3957dbe46be12 @@ -42,7 +42,7 @@ # merge the add and the rename AT_CHECK(MONOTONE merge, [], [ignore], [ignore]) AT_CHECK(MONOTONE update, [], [ignore], [ignore]) -AT_CHECK(MONOTONE cat manifest, [ignore], [stdout]) +AT_CHECK(MONOTONE automate get_manifest, [ignore], [stdout]) AT_CHECK(mv stdout manifest) AT_CHECK(grep bar manifest, [0], [ignore], [ignore]) AT_CHECK(grep bleh manifest, [0], [ignore], [ignore]) ======================================================================== --- tests/t_i18n_file.at d2d853d11983314f03ef8703f42f3a8c95d7cde6 +++ tests/t_i18n_file.at a788a76de1663a1ec1b9ef8d571763ed618f2b88 @@ -43,7 +43,7 @@ export LANG=en_US.UTF-8 export CHARSET=UTF-8 -AT_CHECK(MONOTONE cat manifest, [], [stdout]) +AT_CHECK(MONOTONE automate get_manifest, [], [stdout]) AT_CHECK(mv stdout manifest) AT_CHECK(grep funny manifest, [], [ignore], [ignore]) AT_CHECK(grep spaces manifest, [], [ignore], [ignore]) @@ -74,7 +74,7 @@ # check the names showed up in our manifest -AT_CHECK(MONOTONE cat manifest, [], [stdout]) +AT_CHECK(MONOTONE automate get_manifest, [], [stdout]) AT_CHECK(mv stdout manifest) AT_CHECK(grep funny manifest, [], [ignore], [ignore]) AT_CHECK(grep spaces manifest, [], [ignore], [ignore]) @@ -101,7 +101,7 @@ # check the names showed up in our manifest -AT_CHECK(MONOTONE cat manifest, [], [stdout]) +AT_CHECK(MONOTONE automate get_manifest, [], [stdout]) AT_CHECK(mv stdout manifest) AT_CHECK(grep funny manifest, [], [ignore], [ignore]) AT_CHECK(grep spaces manifest, [], [ignore], [ignore]) ======================================================================== --- tests/t_import.at fdb19cf2022139b6c5beb598d138a5e9798cb23f +++ tests/t_import.at acd29dd84259e7d8d08e79c2567a66b78928c430 @@ -12,7 +12,7 @@ AT_CHECK(MONOTONE add importme, [], [ignore], [ignore]) AT_CHECK(MONOTONE --branch=testbranch commit --message='blah blah', [], [ignore], [ignore]) -AT_CHECK(MONOTONE cat file $TSHA, [], [stdout]) +AT_CHECK(MONOTONE automate get_file $TSHA, [], [stdout]) AT_CHECK(CANONICALISE(stdout)) AT_CHECK(cmp importme stdout, [], [ignore]) ======================================================================== --- tests/t_merge_add_del.at 20f850e8ede0f7c4240c1f9cb21855f151f89df2 +++ tests/t_merge_add_del.at 14ee39bb126bd3469017d27f471434e4429a33f9 @@ -76,7 +76,7 @@ AT_CHECK(rm -rf MT) AT_CHECK(MONOTONE --branch=branch.fork checkout .) -AT_CHECK(MONOTONE cat manifest, [], [stdout]) +AT_CHECK(MONOTONE automate get_manifest, [], [stdout]) AT_CHECK(mv stdout manifest) AT_CHECK(grep bar manifest, [1], [ignore], [ignore]) AT_CHECK(grep quux manifest, [0], [ignore], [ignore]) ======================================================================== --- tests/t_movedel.at b0825386b5bb4346194fbb6348d7706a313ee3b8 +++ tests/t_movedel.at a3cf97dca10d5b59aeb7e995f13b2268ef1f4112 @@ -34,7 +34,7 @@ AT_CHECK(MONOTONE update, [], [ignore], [ignore]) # check that the delete landed on the renamed target -AT_CHECK(MONOTONE cat manifest, [], [stdout]) +AT_CHECK(MONOTONE automate get_manifest, [], [stdout]) AT_CHECK(mv stdout manifest) AT_CHECK(grep baz manifest, [0], [ignore], [ignore]) AT_CHECK(grep bar manifest, [1], [ignore], [ignore]) ======================================================================== --- tests/t_movepatch.at 83acbd4252c65f8826dab7107d478626f32243be +++ tests/t_movepatch.at e7ef086e17d1348933f44acc0147cde8774450ca @@ -33,7 +33,7 @@ AT_CHECK(MONOTONE update, [], [ignore], [ignore]) # check that the delta landed on the renamed target -AT_CHECK(MONOTONE cat manifest, [], [stdout]) +AT_CHECK(MONOTONE automate get_manifest, [], [stdout]) AT_CHECK(mv stdout manifest) AT_CHECK(grep bar manifest, [0], [ignore], [ignore]) AT_CHECK(grep foo manifest, [1], [ignore], [ignore]) ======================================================================== --- tests/t_netsync.at 49202a1a3045c6f30e90cfcb4672b9df4dc7a772 +++ tests/t_netsync.at 31e8c678b935b657624d1ca98391efc8dbf921ad @@ -37,22 +37,22 @@ AT_CHECK(grep changelog certs, [], [ignore]) AT_CHECK(grep bad certs, [1], [ignore]) -AT_CHECK(MONOTONE2 cat revision $VER0, [], [stdout]) +AT_CHECK(MONOTONE2 automate get_revision $VER0, [], [stdout]) AT_CHECK(CANONICALISE(stdout)) CHK=`SHA1(stdout)` AT_CHECK(test $CHK = $VER0) -AT_CHECK(MONOTONE2 cat revision $VER1, [], [stdout]) +AT_CHECK(MONOTONE2 automate get_revision $VER1, [], [stdout]) AT_CHECK(CANONICALISE(stdout)) CHK=`SHA1(stdout)` AT_CHECK(test $CHK = $VER1) -AT_CHECK(MONOTONE2 cat file $F_VER0, [], [stdout]) +AT_CHECK(MONOTONE2 automate get_file $F_VER0, [], [stdout]) AT_CHECK(CANONICALISE(stdout)) CHK=`SHA1(stdout)` AT_CHECK(test $CHK = $F_VER0) -AT_CHECK(MONOTONE2 cat file $F_VER1, [], [stdout]) +AT_CHECK(MONOTONE2 automate get_file $F_VER1, [], [stdout]) AT_CHECK(CANONICALISE(stdout)) CHK=`SHA1(stdout)` AT_CHECK(test $CHK = $F_VER1) ======================================================================== --- tests/t_netsync_exclude.at 5a8302a38e8e62edb41b4332822cf82458177d85 +++ tests/t_netsync_exclude.at caed6eeeec58a85d35684c6cd8ae9db183a44fa0 @@ -31,16 +31,16 @@ NETSYNC_SERVE_START('*' --exclude=branch2 --exclude=branch4) NETSYNC_CLIENT_RUN(pull, 'branch*') -AT_CHECK(MONOTONE2 cat revision $B1, [1], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $B2, [1], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $B3, [1], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $B4, [1], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B1, [1], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B2, [1], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B3, [1], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B4, [1], [ignore], [ignore]) NETSYNC_CLIENT_RUN(pull, 'branch*' --exclude=branch2 --exclude=branch4) -AT_CHECK(MONOTONE2 cat revision $B1, [], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $B2, [], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $B3, [], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $B4, [1], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B1, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B2, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B3, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B4, [1], [ignore], [ignore]) AT_CHECK(MONOTONE2 ls certs $B2 | QGREP(branch2), [1]) ======================================================================== --- tests/t_netsync_exclude_default.at 11beeeb0a601ba2f06d47c89b228cdfbd3f660f9 +++ tests/t_netsync_exclude_default.at e60e806f5ae6a160048081dccff8ce46c74b8551 @@ -15,8 +15,8 @@ RUN_NETSYNC(pull, 'branch*' --exclude=branch2) -AT_CHECK(MONOTONE2 cat revision $B11, [], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $B21, [1], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B11, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B21, [1], [ignore], [ignore]) REVERT_TO($B11) SET_FILE(testfile, [12 @@ -31,18 +31,18 @@ B22=`BASE_REVISION` RUN_NETSYNC(pull) -AT_CHECK(MONOTONE2 cat revision $B11, [], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $B21, [1], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $B12, [], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $B22, [1], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B11, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B21, [1], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B12, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B22, [1], [ignore], [ignore]) # passing only an include pattern causes the default exclude to be # ignored... RUN_NETSYNC(pull, branch2) -AT_CHECK(MONOTONE2 cat revision $B11, [], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $B21, [], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $B12, [], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $B22, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B11, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B21, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B12, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B22, [], [ignore], [ignore]) # but not set by default @@ -59,22 +59,22 @@ B23=`BASE_REVISION` RUN_NETSYNC(pull) -AT_CHECK(MONOTONE2 cat revision $B11, [], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $B21, [], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $B12, [], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $B22, [], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $B13, [], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $B23, [1], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B11, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B21, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B12, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B22, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B13, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B23, [1], [ignore], [ignore]) # but --set-default overrides RUN_NETSYNC(pull --set-default, 'branch*') -AT_CHECK(MONOTONE2 cat revision $B11, [], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $B21, [], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $B12, [], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $B22, [], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $B13, [], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $B23, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B11, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B21, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B12, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B22, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B13, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B23, [], [ignore], [ignore]) REVERT_TO($B13) SET_FILE(testfile, [14 @@ -89,13 +89,13 @@ B24=`BASE_REVISION` RUN_NETSYNC(pull) -AT_CHECK(MONOTONE2 cat revision $B11, [], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $B21, [], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $B12, [], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $B22, [], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $B13, [], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $B23, [], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $B14, [], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $B24, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B11, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B21, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B12, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B22, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B13, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B23, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B14, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B24, [], [ignore], [ignore]) AT_CLEANUP ======================================================================== --- tests/t_netsync_globs.at 0a8790052bf9a94b4a47f8c6e64a2aa98de4649a +++ tests/t_netsync_globs.at 9d07331154e29c0e432b5c69d997357275c51dc5 @@ -25,15 +25,15 @@ # check a glob NETSYNC_CLIENT_N_RUN(2, pull, "*anch2") -AT_CHECK(MONOTONE2 cat revision $REV12, [], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $REV11, [1], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $REV21, [1], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $REV12, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $REV11, [1], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $REV21, [1], [ignore], [ignore]) # check explicit multiple branches NETSYNC_CLIENT_N_RUN(3, pull, 1branch1 2branch1) -AT_CHECK(MONOTONE3 cat revision $REV12, [1], [ignore], [ignore]) -AT_CHECK(MONOTONE3 cat revision $REV11, [], [ignore], [ignore]) -AT_CHECK(MONOTONE3 cat revision $REV21, [], [ignore], [ignore]) +AT_CHECK(MONOTONE3 automate get_revision $REV12, [1], [ignore], [ignore]) +AT_CHECK(MONOTONE3 automate get_revision $REV11, [], [ignore], [ignore]) +AT_CHECK(MONOTONE3 automate get_revision $REV21, [], [ignore], [ignore]) NETSYNC_SERVE_STOP ======================================================================== --- tests/t_netsync_nocerts.at fb066e2badcad62b3b9dfed65f9267ee54411b39 +++ tests/t_netsync_nocerts.at 5b1e9d87f055a58f2c7d3ee0cfaed2e185469955 @@ -19,9 +19,9 @@ RUN_NETSYNC(pull, testbranch) -CHECK_SAME_STDOUT(MONOTONE cat revision $VER0, MONOTONE2 cat revision $VER0) +CHECK_SAME_STDOUT(MONOTONE automate get_revision $VER0, MONOTONE2 automate get_revision $VER0) CHECK_SAME_STDOUT(MONOTONE ls certs $VER0, MONOTONE2 ls certs $VER0) -CHECK_SAME_STDOUT(MONOTONE cat revision $VER1, MONOTONE2 cat revision $VER1) +CHECK_SAME_STDOUT(MONOTONE automate get_revision $VER1, MONOTONE2 automate get_revision $VER1) CHECK_SAME_STDOUT(MONOTONE ls certs $VER1, MONOTONE2 ls certs $VER1) AT_CLEANUP ======================================================================== --- tests/t_netsync_permissions.at 887e4062ab6faa6283d46f0b8dba342f898a23d0 +++ tests/t_netsync_permissions.at 2b2fdda0e34c5c71bad5451e5acdec7416f54162 @@ -36,19 +36,19 @@ AT_CHECK(cp clean.db test2.db) NETSYNC_CLIENT_RUN(pull --key="", testbranch) -AT_CHECK(MONOTONE2 cat revision $BASE, [0], [stdout], [stderr]) +AT_CHECK(MONOTONE2 automate get_revision $BASE, [0], [stdout], [stderr]) # pull with default key AT_CHECK(cp clean.db test2.db) NETSYNC_CLIENT_RUN(pull, testbranch) -AT_CHECK(MONOTONE2 cat revision $BASE, [0], [stdout], [stderr]) +AT_CHECK(MONOTONE2 automate get_revision $BASE, [0], [stdout], [stderr]) # pull with other key AT_CHECK(cp clean.db test2.db) NETSYNC_CLIENT_RUN(pull --key=$OTHER, testbranch) -AT_CHECK(MONOTONE2 cat revision $BASE, [0], [stdout], [stderr]) +AT_CHECK(MONOTONE2 automate get_revision $BASE, [0], [stdout], [stderr]) # pull with unknown key fails @@ -56,7 +56,7 @@ address@hidden AT_CHECK((echo $UNKNOWN; echo $UNKNOWN) | MONOTONE2 genkey $UNKNOWN, [], [ignore], [ignore]) NETSYNC_CLIENT_RUN(pull --key=$UNKNOWN, testbranch) -AT_CHECK(MONOTONE2 cat revision $BASE, [1], [stdout], [stderr]) +AT_CHECK(MONOTONE2 automate get_revision $BASE, [1], [stdout], [stderr]) # push with default key @@ -89,9 +89,9 @@ NETSYNC_SERVE_STOP -AT_CHECK(MONOTONE cat revision $DEFAULT_REV, [0], [stdout], [stderr]) -AT_CHECK(MONOTONE cat revision $OTHER_REV, [0], [stdout], [stderr]) -AT_CHECK(MONOTONE cat revision $UNKNOWN_REV, [1], [stdout], [stderr]) +AT_CHECK(MONOTONE automate get_revision $DEFAULT_REV, [0], [stdout], [stderr]) +AT_CHECK(MONOTONE automate get_revision $OTHER_REV, [0], [stdout], [stderr]) +AT_CHECK(MONOTONE automate get_revision $UNKNOWN_REV, [1], [stdout], [stderr]) # test with closed security settings @@ -122,19 +122,19 @@ AT_CHECK(cp clean.db test2.db) NETSYNC_CLIENT_RUN(pull --key="", testbranch) -AT_CHECK(MONOTONE2 cat revision $BASE, [1], [stdout], [stderr]) +AT_CHECK(MONOTONE2 automate get_revision $BASE, [1], [stdout], [stderr]) # pull with default key AT_CHECK(cp clean.db test2.db) NETSYNC_CLIENT_RUN(pull, testbranch) -AT_CHECK(MONOTONE2 cat revision $BASE, [0], [stdout], [stderr]) +AT_CHECK(MONOTONE2 automate get_revision $BASE, [0], [stdout], [stderr]) # pull with other key fails AT_CHECK(cp clean.db test2.db) NETSYNC_CLIENT_RUN(pull --key=$OTHER, testbranch) -AT_CHECK(MONOTONE2 cat revision $BASE, [1], [stdout], [stderr]) +AT_CHECK(MONOTONE2 automate get_revision $BASE, [1], [stdout], [stderr]) # pull with unknown key fails @@ -142,7 +142,7 @@ address@hidden AT_CHECK((echo $UNKNOWN; echo $UNKNOWN) | MONOTONE2 genkey $UNKNOWN, [], [ignore], [ignore]) NETSYNC_CLIENT_RUN(pull --key=$UNKNOWN, testbranch) -AT_CHECK(MONOTONE2 cat revision $BASE, [1], [stdout], [stderr]) +AT_CHECK(MONOTONE2 automate get_revision $BASE, [1], [stdout], [stderr]) # push with default key @@ -175,8 +175,8 @@ NETSYNC_SERVE_STOP -AT_CHECK(MONOTONE cat revision $DEFAULT_REV, [0], [stdout], [stderr]) -AT_CHECK(MONOTONE cat revision $OTHER_REV, [1], [stdout], [stderr]) -AT_CHECK(MONOTONE cat revision $UNKNOWN_REV, [1], [stdout], [stderr]) +AT_CHECK(MONOTONE automate get_revision $DEFAULT_REV, [0], [stdout], [stderr]) +AT_CHECK(MONOTONE automate get_revision $OTHER_REV, [1], [stdout], [stderr]) +AT_CHECK(MONOTONE automate get_revision $UNKNOWN_REV, [1], [stdout], [stderr]) AT_CLEANUP ======================================================================== --- tests/t_netsync_read_permissions.at 0550bdeac357f6794dd4849b2f0c0ba05a8c6286 +++ tests/t_netsync_read_permissions.at d8c9cc08a754ee36cfb0d18e349647bf815733ff @@ -37,16 +37,16 @@ NETSYNC_SERVE_START(--rcfile=limited_permission.at '*') NETSYNC_CLIENT_RUN(pull, 'branch*') -AT_CHECK(MONOTONE2 cat revision $B1, [1], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $B2, [1], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $B3, [1], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $B4, [1], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B1, [1], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B2, [1], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B3, [1], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B4, [1], [ignore], [ignore]) NETSYNC_CLIENT_RUN(pull, branch1 branch3) -AT_CHECK(MONOTONE2 cat revision $B1, [], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $B2, [], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $B3, [], [ignore], [ignore]) -AT_CHECK(MONOTONE2 cat revision $B4, [1], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B1, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B2, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B3, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $B4, [1], [ignore], [ignore]) AT_CHECK(MONOTONE2 ls certs $B2 | QGREP(branch2), [1]) ======================================================================== --- tests/t_netsync_single.at b3d48b1881c63ccb549d37726ae2d7144a856820 +++ tests/t_netsync_single.at 07187540f12b7fd8cf6ad91b02225c052745a011 @@ -37,12 +37,12 @@ AT_CHECK(grep changelog certs, [], [ignore]) AT_CHECK(grep bad certs, [1], [ignore]) -AT_CHECK(MONOTONE --db=test2.db cat revision $VER0, [], [stdout]) +AT_CHECK(MONOTONE --db=test2.db automate get_revision $VER0, [], [stdout]) AT_CHECK(CANONICALISE(stdout)) CHK=`SHA1(stdout)` AT_CHECK(test $CHK = $VER0) -AT_CHECK(MONOTONE --db=test2.db cat file $F_VER0, [], [stdout]) +AT_CHECK(MONOTONE --db=test2.db automate get_file $F_VER0, [], [stdout]) AT_CHECK(CANONICALISE(stdout)) CHK=`SHA1(stdout)` AT_CHECK(test $CHK = $F_VER0) ======================================================================== --- tests/t_normalized_filenames.at 204c06103e335f45230d94fc86ebcb686e6f7959 +++ tests/t_normalized_filenames.at bf31f5c1d260142de5455950615209dbd4f9c9b7 @@ -7,15 +7,15 @@ # the inner code directly. AT_DATA(MT/work, [add_file "." ]) -AT_CHECK(MONOTONE cat manifest, [3], [ignore], [ignore]) +AT_CHECK(MONOTONE automate get_manifest, [3], [ignore], [ignore]) AT_DATA(MT/work, [add_file "./bar" ]) AT_DATA(bar, [blah blah ]) -AT_CHECK(MONOTONE cat manifest, [3], [stdout], [ignore]) -AT_CHECK(MONOTONE cat revision, [3], [stdout], [ignore]) +AT_CHECK(MONOTONE automate get_manifest, [3], [stdout], [ignore]) +AT_CHECK(MONOTONE automate get_revision, [3], [stdout], [ignore]) AT_CHECK(MONOTONE commit --message=foo --branch=foo, [3], [ignore], [ignore]) AT_CLEANUP ======================================================================== --- tests/t_persistent_server_revision.at 3462ba494a0efb9890baf14f1aed76e53b435967 +++ tests/t_persistent_server_revision.at 04fe8d8a529d07a8bfbb01e999bbbb99eecb254b @@ -25,13 +25,13 @@ NETSYNC_CLIENT_N_RUN(2, sync, testbranch) NETSYNC_CLIENT_N_RUN(3, sync, testbranch) -CHECK_SAME_STDOUT(MONOTONE2 cat revision $REV1, MONOTONE3 cat revision $REV1) +CHECK_SAME_STDOUT(MONOTONE2 automate get_revision $REV1, MONOTONE3 automate get_revision $REV1) CHECK_SAME_STDOUT(MONOTONE2 ls certs $REV1, MONOTONE3 ls certs $REV1) # Also exercise files and manifest 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 automate get_revision $REV2, MONOTONE3 automate get_revision $REV2) CHECK_SAME_STDOUT(MONOTONE2 ls certs $REV2, MONOTONE3 ls certs $REV2) # Also exercise files and manifest AT_CHECK(MONOTONE2 checkout --revision=$REV2 otherdir, [], [ignore], [ignore]) @@ -56,7 +56,7 @@ NETSYNC_CLIENT_N_RUN(3, sync, testbranch) NETSYNC_CLIENT_N_RUN(2, sync, testbranch) -CHECK_SAME_STDOUT(MONOTONE2 cat revision $REV3, MONOTONE3 cat revision $REV3) +CHECK_SAME_STDOUT(MONOTONE2 automate get_revision $REV3, MONOTONE3 automate get_revision $REV3) CHECK_SAME_STDOUT(MONOTONE2 ls certs $REV3, MONOTONE3 ls certs $REV3) # Also exercise files and manifest AT_CHECK(MONOTONE2 checkout --revision=$REV3 somedir2, [], [ignore], [ignore]) @@ -66,7 +66,7 @@ NETSYNC_CLIENT_N_RUN(3, sync, testbranch) -CHECK_SAME_STDOUT(MONOTONE2 cat revision $REV4, MONOTONE3 cat revision $REV4) +CHECK_SAME_STDOUT(MONOTONE2 automate get_revision $REV4, MONOTONE3 automate get_revision $REV4) CHECK_SAME_STDOUT(MONOTONE2 ls certs $REV4, MONOTONE3 ls certs $REV4) # Also exercise files and manifest AT_CHECK(MONOTONE3 checkout --revision=$REV4 somedir3, [], [ignore], [ignore]) ======================================================================== --- tests/t_remerge.at 83424c6866711fddcd090865370ff3f9db1a37b9 +++ tests/t_remerge.at e9cf7d222425e8ed9f7c10a3714af3e5bf5b143e @@ -89,7 +89,7 @@ AT_CHECK(MONOTONE --branch=branch.y merge, [], [ignore], [ignore]) AT_CHECK(MONOTONE --branch=branch.y update, [], [ignore], [ignore]) -AT_CHECK(MONOTONE cat manifest, [], [stdout]) +AT_CHECK(MONOTONE automate get_manifest, [], [stdout]) AT_CHECK(mv stdout manifest) AT_CHECK(grep y manifest, [], [ignore], [ignore]) AT_CHECK(grep -v x manifest, [], [ignore], [ignore]) ======================================================================== --- tests/t_rename.at 9294b9b72fc4eb10f0954f07d3a6103e0c123ab0 +++ tests/t_rename.at 4ec762efe273f44b4a63dcc27cb9c40b0af312b4 @@ -31,7 +31,7 @@ # merge the add and the rename AT_CHECK(MONOTONE merge, [], [ignore], [ignore]) AT_CHECK(MONOTONE update, [], [ignore], [ignore]) -AT_CHECK(MONOTONE cat manifest, [ignore], [stdout]) +AT_CHECK(MONOTONE automate get_manifest, [ignore], [stdout]) AT_CHECK(mv stdout manifest) AT_CHECK(grep bar manifest, [0], [ignore], [ignore]) AT_CHECK(grep bleh manifest, [0], [ignore], [ignore]) ======================================================================== --- tests/t_renamed.at 40f40d3f72061961a6c39af95641177b3289110e +++ tests/t_renamed.at 94f19a1bcd6feb2de88e5c4ab0133065ccb64c9a @@ -35,7 +35,7 @@ # merge the add and the rename AT_CHECK(MONOTONE merge, [], [ignore], [ignore]) AT_CHECK(MONOTONE update, [], [ignore], [ignore]) -AT_CHECK(MONOTONE cat manifest, [ignore], [stdout]) +AT_CHECK(MONOTONE automate get_manifest, [ignore], [stdout]) AT_CHECK(mv stdout manifest) AT_CHECK(grep bar/bar manifest, [0], [ignore], [ignore]) AT_CHECK(grep bar/foo manifest, [0], [ignore], [ignore]) ======================================================================== --- tests/t_scan.at 5269c1fe377163e3a6743b0737e95b45e005b902 +++ tests/t_scan.at b203ac2f2e3960f90effbaba0595c6681c34e386 @@ -26,7 +26,7 @@ AT_CHECK(MONOTONE add testfile0 foo, [], [ignore], [ignore]) AT_CHECK(MONOTONE --branch=testbranch commit --message='blah blah', [], [ignore], [ignore]) -AT_CHECK(MONOTONE cat manifest, [], [stdout]) +AT_CHECK(MONOTONE automate get_manifest, [], [stdout]) AT_CHECK(CANONICALISE(stdout)) AT_CHECK(cmp stdout manifest, [], [ignore]) ======================================================================== --- tests/t_set_default.at 95505520a46b66a6120dae44779dbb01f16fdafb +++ tests/t_set_default.at 4869ee5e5dee61a59e25a34facb6f5834696651d @@ -10,7 +10,7 @@ # set defaults in db 2 RUN_NETSYNC(pull, testbranch) -AT_CHECK(MONOTONE2 cat revision $T1, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $T1, [], [ignore], [ignore]) SET_FILE(testfile, [blah blah ]) @@ -21,7 +21,7 @@ NETSYNC_SERVE_START(testbranch) AT_CHECK(MONOTONE2 pull, [], [ignore], [ignore]) NETSYNC_SERVE_STOP -AT_CHECK(MONOTONE2 cat revision $T2, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $T2, [], [ignore], [ignore]) # do a --set-default pull of another branch NETSYNC_SERVE_START(otherbranch) @@ -39,6 +39,6 @@ AT_CHECK(MONOTONE2 pull, [], [ignore], [ignore]) NETSYNC_SERVE_STOP -AT_CHECK(MONOTONE2 cat revision $O1, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 automate get_revision $O1, [], [ignore], [ignore]) AT_CLEANUP ======================================================================== --- tests/t_singlecvs.at 7d51de64a3015214985b09b0d744f6c22afbf986 +++ tests/t_singlecvs.at 3ab763cc4821f58ecc8cea7ff0d1b8f62004c8ad @@ -29,6 +29,6 @@ # import into monotone and check presence of file AT_CHECK(MONOTONE --branch=testbranch cvs_import $CVSROOT/testdir, [], [ignore], [ignore]) -AT_CHECK(MONOTONE cat file $TSHA0, [], [ignore]) +AT_CHECK(MONOTONE automate get_file $TSHA0, [], [ignore]) AT_CLEANUP ======================================================================== --- tests/t_update_with_pending_add.at 8394d96a687a14e6dcae400383d3bef0e76d1f78 +++ tests/t_update_with_pending_add.at 357bc4be7680dd9d3a898ae914aa1c6a11a47996 @@ -24,8 +24,7 @@ # why doesn't an abbreviated revision id work -AT_CHECK(cd codir && MONOTONE cat revision b482, [1], [ignore], [ignore]) -AT_CHECK(cd codir && MONOTONE cat revision b482c907f27f160f7ff9259d353d5d5399fb9fc4, [], [ignore], [ignore]) +AT_CHECK(cd codir && MONOTONE automate get_revision b482c907f27f160f7ff9259d353d5d5399fb9fc4, [], [ignore], [ignore]) # make sure there are no changes in the working copy ======================================================================== --- tests/t_update_with_pending_drop.at d52d3736c75a01c308500e12237edaf37e8f345f +++ tests/t_update_with_pending_drop.at 00cdc65ce50b1b3b3c54d0542653c7ec47e27072 @@ -19,9 +19,7 @@ AT_CHECK(cd codir && MONOTONE drop file, [], [ignore], [ignore]) AT_CHECK(cd codir && MONOTONE update, [], [ignore], [ignore]) -# why doesn't an abbreviated revision id work -AT_CHECK(cd codir && MONOTONE cat revision a12d, [1], [ignore], [ignore]) -AT_CHECK(cd codir && MONOTONE cat revision a12d8ad50bf5861310c22979ef6c3a8b8a686522, [], [ignore], [ignore]) +AT_CHECK(cd codir && MONOTONE automate get_revision a12d8ad50bf5861310c22979ef6c3a8b8a686522, [], [ignore], [ignore]) # make sure there are no changes in the working copy ======================================================================== --- tests/t_update_with_pending_rename.at d6e60af87b017d9269e0c3c797c93d0a696648fc +++ tests/t_update_with_pending_rename.at 99e70ea11a371b7b400bd8f4dd1fad467f9645e4 @@ -20,9 +20,8 @@ AT_CHECK(cd codir && MONOTONE rename file file2, [], [ignore], [ignore]) AT_CHECK(cd codir && MONOTONE update, [], [ignore], [ignore]) -# why doesn't an abbreviated revision id work -AT_CHECK(cd codir && MONOTONE cat revision 0cb6, [1], [ignore], [ignore]) -AT_CHECK(cd codir && MONOTONE cat revision 0cb6da39a252816db091c515efa830840e77c4eb, [], [ignore], [ignore]) +AT_CHECK(cd codir && MONOTONE automate get_revision 0cb6, [1], [ignore], [ignore]) +AT_CHECK(cd codir && MONOTONE automate get_revision 0cb6da39a252816db091c515efa830840e77c4eb, [], [ignore], [ignore]) # make sure there are no changes in the working copy ======================================================================== --- tests/t_versions.at 91d6fb7180cd75fde30d7f5b82e29cf5feaf9277 +++ tests/t_versions.at 49105adca6a5a867ec44be87731651eacb8cb437 @@ -28,7 +28,7 @@ RSHA=`cat rsha-$i` FSHA=`cat fsha-$i` - AT_CHECK(MONOTONE cat file $FSHA, [], [stdout]) + AT_CHECK(MONOTONE automate get_file $FSHA, [], [stdout]) AT_CHECK(CANONICALISE(stdout)) AT_CHECK(cmp stdout testfile, [], [ignore])