# # # add_dir "tests/update_with_pending_modification" # # add_file "tests/update_with_pending_modification/__driver__.lua" # content [03be28a852978808341205ba2e2f713ce8dcaf35] # ============================================================ --- tests/update_with_pending_modification/__driver__.lua 03be28a852978808341205ba2e2f713ce8dcaf35 +++ tests/update_with_pending_modification/__driver__.lua 03be28a852978808341205ba2e2f713ce8dcaf35 @@ -0,0 +1,32 @@ + +mtn_setup() + +-- add a first file +addfile("file1", "contents of file1") +commit() + +-- store the newly created revision id +REV1=base_revision() + +-- check(mtn("--branch", "testbranch", "co", "codir"), 0, false, false) +-- writefile("codir/file2", "contents of file2") + +-- add another file and commit +addfile("file2", "contents of file2") +commit() + +-- change that new file +writefile("file2", "new contents of file2") + +-- .. and upadte to the previous revision, which didn't have file2. +-- At the moment, this simply drops file2 and all changes to it. +-- +-- See bug #15058 + +xfail(mtn("update", "-r", REV1), 1, true, true) + +-- IMO, the correct curse of action should be to fail updating due to +-- a conflict. +check(exists("file2")) +check(samelines("file2", {"new contents of file2"})) +