# # # add_dir "tests/pluck_lifecycle" # # add_file "tests/pluck_lifecycle/__driver__.lua" # content [fddb5a14e2762127c618fed0d12eb2aa2dc88c4b] # # patch "ChangeLog" # from [8d331ae89d3c67913fd7561b8e8b3a4e32304a89] # to [413999494b3a74c2bfef273733974e35b38c9bab] # # patch "testsuite.lua" # from [d905626236ef9c395cb971c3e592cfe56c704015] # to [70846b44088044d7bb5551cde9af167f0df47846] # ============================================================ --- tests/pluck_lifecycle/__driver__.lua fddb5a14e2762127c618fed0d12eb2aa2dc88c4b +++ tests/pluck_lifecycle/__driver__.lua fddb5a14e2762127c618fed0d12eb2aa2dc88c4b @@ -0,0 +1,57 @@ +mtn_setup() + +-- root - contains a, b, c +-- | \ +-- | \ +-- | two_rev - drop c, add d +-- | | +-- one_rev | - edit a +-- | \ | +-- | \ | +-- | \ | +-- | merge 1 +-- | +-- pluck_rev - edit b +-- +-- In a workspace at merge 1, we want to pluck the edit of b from pluck_rev. + +-- set up root +addfile("a", "original\n") +addfile("b", "original\n") +addfile("c", "original\n") +commit() +root_rev = base_revision() + +-- and one_rev +writefile("a", "updated\n") +commit() +one_rev = base_revision() + +-- and pluck_rev +writefile("b", "updated\n") +commit() +pluck_rev = base_revision() + +-- and two_rev +revert_to(root_rev) +addfile("d", "original\n") +check(mtn("drop", "-e", "c"), 0, false, false) +commit() +two_rev = base_revision() + +-- and merge 1 +check(mtn("explicit_merge", one_rev, two_rev, "testbranch"), 0, false, false) +check(mtn("update"), 0, false, false) + +-- check that we need the edit for b +check(readfile("b") == "original\n", 0, false, false) +-- pluck the edit +check(mtn("pluck", "-r", pluck_rev), 0, false, false) +-- check that we go it +check(readfile("b") == "updated\n", 0, false, false) + +-- check the pending rev; we don't expect to see changes from two_rev +check(mtn("status"), 0, true, false) +xfail_if(true, grep("delete", "stdout")) +xfail_if(true, grep("add_file", "stdout")) + ============================================================ --- ChangeLog 8d331ae89d3c67913fd7561b8e8b3a4e32304a89 +++ ChangeLog 413999494b3a74c2bfef273733974e35b38c9bab @@ -1,3 +1,9 @@ +2006-07-08 Matthew Gregan + + * tests/pluck_lifecycle/__driver__.lua: New XFAILed test for a + minor pluck bug. + * testsuite.lua: Add it. + 2006-07-07 Timothy Brownawell * tester.cc: Add a newline to the help message. ============================================================ --- testsuite.lua d905626236ef9c395cb971c3e592cfe56c704015 +++ testsuite.lua 70846b44088044d7bb5551cde9af167f0df47846 @@ -646,3 +646,4 @@ table.insert(tests, "automate_branches") table.insert(tests, "merge_conflict_with_no_lca") table.insert(tests, "pluck_basics") +table.insert(tests, "pluck_lifecycle")