# # patch "ChangeLog" # from [dabaf521855697e3621527d7a6663b65e866cda4] # to [c052000953d4ac37c4e2d987d241bfe8c4acd0e1] # # patch "commands.cc" # from [1d3ffb053901c8cbdaae7aab407b213c5f2c9707] # to [627f94732bd7bd2886d9688dab916bb203b8ed77] # # patch "tests/t_add_stomp_file.at" # from [77c4431e1c15af16e1375d4c0fc433007baa1fb8] # to [5bbd2eb4c43a8400477107da7c242e63596650b3] # # patch "tests/t_add_vs_commit.at" # from [7fd4b57e97609427e699e0cf3cca5c984ffd1330] # to [92280abe24d27ced1ce60d8b8e87efc310be4550] # # patch "tests/t_annotate.at" # from [c41984b9c72ac6a45393a06dfba8f56dd910bf21] # to [d216df41c2dc211585a5d317cc31263651e47fa6] # # patch "tests/t_lf_crlf.at" # from [6320cbf9fb0416ac32b1a3627ff87ddd0903dded] # to [957aa1c817b7e7b23414ad3e45f0379f8afa0821] # # patch "tests/t_update_nonexistent.at" # from [a7f5255b645f8be25c40d15a62f9f5279bf2aa59] # to [045eadf406dd46aa126cc91b318006098e76002e] # # patch "tests/t_update_off_branch.at" # from [098a2d92e488117572fdd96112cc29d95e712c7e] # to [1ce8c8ecbb87f94254f0c7090d738273f4812b44] # # patch "tests/t_update_to_revision.at" # from [e97fda6d61ea056ad72a290d7b580b79f0177eda] # to [a8a0f7025381a5e14f3c650d14c1d21ade3cd589] # --- ChangeLog +++ ChangeLog @@ -1,3 +1,19 @@ +2005-05-30 Richard Levitte
+ + * commands.cc (CMD(checkout), CMD(cdiff), CMD(diff), CMD(log)): + Remove '[--revision=REVISION]' from command argument synopsis, + and add more text to the help to explain what happens when + --revision options are used. + (CMD(update)): Instead of the optional revision argument, use + the --revision option. Add information on what happens when the + --revision option is used, and when it's not. + + * tests/t_add_stomp_file.at, tests/t_add_vs_commit.at, + tests/t_annotate.at, tests/t_lf_crlf.at, + tests/t_update_nonexistent.at, tests/t_update_off_branch.at, + tests/t_update_to_revision.at: Update to use --revision with + 'monotone update'. + 2005-05-29 Timothy Brownawell * contrib/monoprof.sh: Add support for using valgrind for --- commands.cc +++ commands.cc @@ -1255,7 +1255,8 @@ } -CMD(status, "informative", "[PATH]...", "show status of working copy", OPT_DEPTH) +CMD(status, "informative", "[PATH]...", "show status of working copy", + OPT_DEPTH) { revision_set rs; manifest_map m_old, m_new; @@ -1396,8 +1397,11 @@ } -CMD(checkout, "tree", "[--revision=REVISION] [DIRECTORY]\n", - "check out revision from database into directory", +CMD(checkout, "tree", "[DIRECTORY]\n", + "check out revision from database into directory.\n" + "If a revision is given, that's the one that will be checked out.\n" + "Otherwise, it will be the head of the branch (given or implicit).\n" + "If no directory is given, the branch name will be used as directory", OPT_BRANCH_NAME % OPT_REVISION) { revision_id ident; @@ -2670,15 +2674,21 @@ dump_diffs(composite.deltas, app, new_is_archived, type); } -CMD(cdiff, "informative", "[--revision=REVISION [--revision=REVISION]] [PATH]...", - "show current context diffs on stdout", +CMD(cdiff, "informative", "[PATH]...", + "show current context diffs on stdout.\n" + "If one revision is given, the diff between the working directory and\n" + "that revision is shown. If two revisions are given, the diff between\n" + "them is given.", OPT_BRANCH_NAME % OPT_REVISION) { do_diff(name, app, args, context_diff); } -CMD(diff, "informative", "[--revision=REVISION [--revision=REVISION]] [PATH]...", - "show current unified diffs on stdout", +CMD(diff, "informative", "[PATH]...", + "show current unified diffs on stdout.\n" + "If one revision is given, the diff between the working directory and\n" + "that revision is shown. If two revisions are given, the diff between\n" + "them is given.", OPT_BRANCH_NAME % OPT_REVISION % OPT_DEPTH) { do_diff(name, app, args, unified_diff); @@ -2825,8 +2835,11 @@ // cout << "change set '" << name << "'\n" << dat << endl; // } -CMD(update, "working copy", "[REVISION]", "update working copy to be based off another revision", - OPT_BRANCH_NAME) +CMD(update, "working copy", "", + "update working copy.\n" + "If a revision is given, base the update on that revision. If not,\n" + "base the update on the head of the branch (given or implicit).", + OPT_BRANCH_NAME % OPT_REVISION) { manifest_map m_old, m_ancestor, m_working, m_chosen; manifest_id m_ancestor_id, m_chosen_id; @@ -2834,9 +2847,12 @@ revision_id r_old_id, r_chosen_id; change_set old_to_chosen, update; - if (args.size() != 0 && args.size() != 1) + if (args.size() > 0) throw usage(name); + if (app.revision_selectors.size() > 0) + throw usage(name); + if (!app.branch_name().empty()) app.make_branch_sticky(); app.require_working_copy(); @@ -2849,7 +2865,7 @@ N(!null_id(r_old_id), F("this working directory is a new project; cannot update")); - if (args.size() == 0) + if (app.revision_selectors.size() == 0) { set