# # # patch "ChangeLog" # from [b1d5230758947aa85a95c414f36f4dd6860bd56a] # to [3d3fee2b96ae007e5ed9276f66930f9a978955b9] # # patch "cmd_merging.cc" # from [5451cf9170ebcf77bc78c201e8c038b9fedba9b8] # to [82cc40471c9e06fc7c8d5815aed5de64c17ab5e3] # # patch "tests/two_parent_workspace_pluck/__driver__.lua" # from [1e1602a94d6554e34fe774ad65044d25843c2d97] # to [91d7f48e38e6d38281798af976ffff8864cb540e] # ============================================================ --- ChangeLog b1d5230758947aa85a95c414f36f4dd6860bd56a +++ ChangeLog 3d3fee2b96ae007e5ed9276f66930f9a978955b9 @@ -1,3 +1,9 @@ +2007-02-07 Matthew Gregan + + * cmd_merging.cc (CMD(pluck)): Migrate to new internal + multi-parent workspace API. + * tests/two_parent_workspace_pluck: Un-xfail test. + 2007-02-07 Zack Weinberg * tests/two_parent_workspace_commands_that_fail @@ -8,7 +14,7 @@ 2007-02-07 Matthew Gregan * cmd_merging.cc (CMD(merge_into_workspace)): N() out if user is -f trying to merge in the workspace's current revision. + trying to merge in the workspace's current revision. * tests/merge_into_workspace_same_rev/*: New test. * testsuite.lua: Add it. ============================================================ --- cmd_merging.cc 5451cf9170ebcf77bc78c201e8c038b9fedba9b8 +++ cmd_merging.cc 82cc40471c9e06fc7c8d5815aed5de64c17ab5e3 @@ -744,7 +744,7 @@ CMD(show_conflicts, N_("informative"), N % result.rename_target_conflicts.size()); P(F("There are %s directory_loop_conflicts.") % result.directory_loop_conflicts.size()); -} +} CMD(pluck, N_("workspace"), N_("[-r FROM] -r TO [PATH...]"), N_("Apply changes made at arbitrary places in history to current workspace.\n" @@ -755,7 +755,7 @@ CMD(pluck, N_("workspace"), N_("[-r FROM "renames, conflicts, and so on.\n" "\n" "If one revision is given, applies the changes made in that revision\n" - "compared to its parent.\n" + "compared to its parent.\n" "\n" "If two revisions are given, applies the changes made to get from the\n" "first revision to the second."), @@ -829,10 +829,10 @@ CMD(pluck, N_("workspace"), N_("[-r FROM MM(*from_roster); app.db.get_roster(from_rid, *from_roster); - // Get the WORKING roster, and also the base roster while we're at it + // Get the WORKING roster roster_t working_roster; MM(working_roster); - roster_t base_roster; MM(base_roster); - app.work.get_base_and_current_roster_shape(base_roster, working_roster, nis); + app.work.get_current_roster_shape(working_roster, nis); + app.work.update_current_roster_from_filesystem(working_roster); // Get the FROM->TO cset... @@ -883,11 +883,11 @@ CMD(pluck, N_("workspace"), N_("[-r FROM P(F("applied changes to workspace")); // and record any remaining changes in _MTN/revision - revision_id base_id; + parent_map parents; revision_t remaining; MM(remaining); - app.work.get_revision_id(base_id); - make_revision_for_workspace(base_id, base_roster, merged_roster, remaining); + app.work.get_parent_rosters(parents); + make_revision_for_workspace(parents, merged_roster, remaining); // small race condition here... app.work.put_work_rev(remaining); ============================================================ --- tests/two_parent_workspace_pluck/__driver__.lua 1e1602a94d6554e34fe774ad65044d25843c2d97 +++ tests/two_parent_workspace_pluck/__driver__.lua 91d7f48e38e6d38281798af976ffff8864cb540e @@ -25,5 +25,5 @@ check(qgrep("quack quack", "pluckfile")) check(not qgrep("ancestor", "testfile")) check(qgrep("quack quack", "pluckfile")) +check(mtn("pluck", "-r", pluckrev), 0, false, false) +check(qgrep("brawwk brawwk", "pluckfile")) -xfail(mtn("pluck", "-r", pluckrev), 0, false, false) -xfail(qgrep("brawwk brawwk", "pluckfile"))