# # delete_file "tests/t_automate_get_manifest.at" # # patch "automate.cc" # from [3363afb1c7295a58b900de799f89d6fe2aeb144a] # to [b74d947d7a0b4f05bdf93966b13f6dda824a285e] # # patch "tests/t_automate_get_revision.at" # from [594fa8320e2c194967de5f22386809f5c9f9cc14] # to [e30012c1ac2c9a95270c2077e8dbd8bc8b9a153b] # # patch "testsuite.at" # from [e20185b74f9d18fd817bc5cb6bb43b4230f933da] # to [e37b92e5720d349ff3b304850fec7678d97756a6] # ======================================================================== --- automate.cc 3363afb1c7295a58b900de799f89d6fe2aeb144a +++ automate.cc b74d947d7a0b4f05bdf93966b13f6dda824a285e @@ -26,7 +26,7 @@ #include "vocab.hh" #include "keys.hh" -static std::string const interface_version = "1.1"; +static std::string const interface_version = "2.0"; // Name: interface_version // Arguments: none @@ -961,55 +961,7 @@ output.write(dat.inner()().data(), dat.inner()().size()); } -// Name: get_manifest -// Arguments: -// 1: a manifest id (optional, determined from working directory if non-existant) -// Added in: 1.0 -// Purpose: Prints the contents of the manifest associated with the given manifest ID. -// -// Output format: One line for each file in the manifest. Each line begins with a -// 40 character file ID, followed by two space characters (' ') and then the filename. -// eg: -// 22382ac1bdffec21170a88ff2580fe39b508243f vocab.hh -// -// Error conditions: If the manifest ID specified is unknown or invalid prints an -// error message to stderr and exits with status 1. -static void -automate_get_manifest(std::vector args, - std::string const & help_name, - app_state & app, - std::ostream & output) -{ - if (args.size() > 1) - throw usage(help_name); - if (args.size() == 0) - { - L(F("dumping working copy manifest")); - app.require_working_copy(); - - // FIXME: this should be refactored - roster_t roster; - temp_node_id_source nis; - get_current_restricted_roster(roster, nis, app); - data dat; - write_manifest_of_roster(roster, dat); - output.write(dat().data(), dat().size()); - } - else - { - I(false); -/* -// FIXME ROSTERS: disabled until rewritten to use rosters - L(F("dumping manifest %s\n") % ident); - ident = manifest_id(idx(args, 0)()); - N(app.db.manifest_version_exists(ident), - F("no manifest version %s found in database") % ident); - app.db.get_manifest_version(ident, dat); -*/ - } -} - // Name: get_file // Arguments: // 1: a file id ======================================================================== --- tests/t_automate_get_revision.at 594fa8320e2c194967de5f22386809f5c9f9cc14 +++ tests/t_automate_get_revision.at e30012c1ac2c9a95270c2077e8dbd8bc8b9a153b @@ -1,25 +1,24 @@ # -*- Autoconf -*- -AT_SETUP([automate get_manifest]) +AT_SETUP([automate get_revision]) NEED_UNB64 MONOTONE_SETUP -AT_DATA(expected, [new_manifest @<:@095e136cd6e47e3519869fb0f07dcce183780b6e@:>@ +AT_DATA(expected, [new_manifest @<:@ee4a0fb04b83aaa7dc91fa796dd4d0feddc9f502@:>@ old_revision @<:@@:>@ old_manifest @<:@@:>@ -add_file "foo" +add_dir "" -patch "foo" - from @<:@@:>@ - to @<:@4cbd040533a2f43fc6691d773d510cda70f4126a@:>@ +add_file "foo" + content @<:@4cbd040533a2f43fc6691d773d510cda70f4126a@:>@ ]) -AT_DATA(expected2, [new_manifest @<:@095e136cd6e47e3519869fb0f07dcce183780b6e@:>@ +AT_DATA(expected2, [new_manifest @<:@ee4a0fb04b83aaa7dc91fa796dd4d0feddc9f502@:>@ -old_revision @<:@306c506078df4b58470f75c845ccd11c2ea8cb26@:>@ -old_manifest @<:@095e136cd6e47e3519869fb0f07dcce183780b6e@:>@ +old_revision @<:@3cf83369cfadbf5ba4ea3a50796fba18ec245489@:>@ +old_manifest @<:@ee4a0fb04b83aaa7dc91fa796dd4d0feddc9f502@:>@ ]) AT_DATA(empty, []) ======================================================================== --- testsuite.at e20185b74f9d18fd817bc5cb6bb43b4230f933da +++ testsuite.at e37b92e5720d349ff3b304850fec7678d97756a6 @@ -729,7 +729,6 @@ m4_include(tests/t_setup_existing_path.at) m4_include(tests/t_mt_ignore.at) m4_include(tests/t_automate_get_file.at) -m4_include(tests/t_automate_get_manifest.at) m4_include(tests/t_automate_get_revision.at) m4_include(tests/t_unreadable_db.at) m4_include(tests/t_restriction_with_exclude.at)