# # # rename "tests/checkout_clobbers_workspace" # to "tests/checkout_does_not_clobber_workspace" # # rename "tests/update_clobbers_workspace" # to "tests/update_does_not_clobber_workspace" # # add_dir "tests/pluck_does_not_clobber_workspace" # # add_file "tests/pluck_does_not_clobber_workspace/__driver__.lua" # content [f04d49e1c510c672744e6ff0b7590e12006165aa] # # patch "ChangeLog" # from [ce05b19f18b46e392d1d49b335644e31c553ff9c] # to [d71127b65f7b24b91c4789cae48984f90bf8f93b] # # patch "testsuite.lua" # from [e6bfff711945291f9ac6aa3116ace3aaa5e1007f] # to [42c8364f7b891ddbdb155b75eea111a3ac96234d] # ============================================================ --- tests/pluck_does_not_clobber_workspace/__driver__.lua f04d49e1c510c672744e6ff0b7590e12006165aa +++ tests/pluck_does_not_clobber_workspace/__driver__.lua f04d49e1c510c672744e6ff0b7590e12006165aa @@ -0,0 +1,43 @@ +mtn_setup() + +addfile("base", "base") +commit() +base = base_revision() + +mkdir("foo") +addfile("file1", "file1") +addfile("foo/file2", "foofile2") +commit() + +source = base_revision() + +-- pluck to clean workspace +mkdir("test1") +check(indir("test1", mtn("checkout", "--revision", base, "."))) +check(indir("test1", mtn("pluck", "-r", source)), 0, false, true) + +-- pluck to workspace with an unversioned file blocking a versioned file +mkdir("test2") +writefile("test2/file1", "blocker") +check(indir("test2", mtn("checkout", "--revision", base, "."))) +check(indir("test2", mtn("pluck", "-r", source)), 1, false, true) + +-- pluck to workspace with an unversioned directory blocking a versioned directory +mkdir("test3") +mkdir("test3/foo") +writefile("test3/foo/asdf", "asdf") +check(indir("test3", mtn("checkout", "--revision", base, "."))) +check(indir("test3", mtn("pluck", "-r", source)), 1, false, true) +check(exists("test3/foo/asdf")) + +-- update workspace with an unversioned directory blocking a versioned file +mkdir("test4") +mkdir("test4/file1") +check(indir("test4", mtn("checkout", "--revision", base, "."))) +check(indir("test4", mtn("pluck", "-r", source)), 1, false, true) + +-- update workspace with an unversioned file blocking a versioned directory +mkdir("test5") +writefile("test5/foo", "foobar") +check(indir("test5", mtn("checkout", "--revision", base, "."))) +check(indir("test5", mtn("pluck", "-r", source)), 1, false, true) ============================================================ --- ChangeLog ce05b19f18b46e392d1d49b335644e31c553ff9c +++ ChangeLog d71127b65f7b24b91c4789cae48984f90bf8f93b @@ -1,9 +1,15 @@ +2007-02-07 Daniel Carosone + + * rename tests {update,checkout}_clobbers_workspace to + _does_not_clobber_workspace, because they now no longer do. + * add a corollary pluck_does_not_clobber_workspace + 2007-02-07 Nathaniel Smith * tests/ls_unknown_in_subdir: Update test to match new non-recursiveness of ls unknown. -2007-02-07 Daniel Carosone +2007-02-07 Daniel Carosone * tests/db_kill_rev_and_recommit/__driver__.lua/: add a test (xfail'ed, until fixed) for a bug (#18990) I just tripped over, ============================================================ --- testsuite.lua e6bfff711945291f9ac6aa3116ace3aaa5e1007f +++ testsuite.lua 42c8364f7b891ddbdb155b75eea111a3ac96234d @@ -705,3 +705,4 @@ table.insert(tests, "db_kill_rev_and_rec table.insert(tests, "test_a_merge_8") table.insert(tests, "magic__MTN_in_restrictions") table.insert(tests, "db_kill_rev_and_recommit") +table.insert(tests, "pluck_clobbers_workspace")