# # # add_dir "tests/merge_conflict_with_no_lca" # # add_file "tests/merge_conflict_with_no_lca/__driver__.lua" # content [6e54e4eca1aa844a5ef1c7273f1227c62bcf82ca] # # add_file "tests/merge_conflict_with_no_lca/rcfile" # content [fb1ad4f385ad3ea92f27e74422429baf82f000a4] # # patch "ChangeLog" # from [a2df4c2fe12838f080c4c9eb73a5317cf3b4cb50] # to [e369c0222f33a719d1119e0587d279ee57a33bbf] # # patch "testsuite.lua" # from [a958a32341dacf6077633d520376af16b54fb735] # to [ace2e8cf29a362a716f553babc7a6a1a1cd21149] # ============================================================ --- tests/merge_conflict_with_no_lca/__driver__.lua 6e54e4eca1aa844a5ef1c7273f1227c62bcf82ca +++ tests/merge_conflict_with_no_lca/__driver__.lua 6e54e4eca1aa844a5ef1c7273f1227c62bcf82ca @@ -0,0 +1,32 @@ + +include("common/netsync.lua") +mtn_setup() +netsync.setup() + +addfile("bar", "bar") +commit("otherbranch") +remove("_MTN") +check(mtn("setup", ".", "-b", "testbranch"), 0, false, false) +addfile("foo", "foo\n") +commit() +base = base_revision() + +netsync.sync("*branch") +append("foo", "bar\n") +commit() +check(mtn("merge_into_dir", "otherbranch", "testbranch", "test"), 0, false, false) + +check(mtn("update", "-r", base), 0, false, false) + +append("foo", "baz\n") +commit(nil, nil, mtn2) +check(mtn2("merge_into_dir", "otherbranch", "testbranch", "test"), 0, false, false) + +get("rcfile") +check(mtn("merge", "--rcfile", "rcfile"), 0, false, false) +check(mtn2("merge", "--rcfile", "rcfile"), 0, false, false) + +netsync.sync("*branch") + +-- should be a conflict +xfail_if(true, mtn("merge"), 1, false, false) ============================================================ --- tests/merge_conflict_with_no_lca/rcfile fb1ad4f385ad3ea92f27e74422429baf82f000a4 +++ tests/merge_conflict_with_no_lca/rcfile fb1ad4f385ad3ea92f27e74422429baf82f000a4 @@ -0,0 +1,3 @@ +function merge3(anc_path, left_path, right_path, merged_path, ancestor, left, right) + return left +end ============================================================ --- ChangeLog a2df4c2fe12838f080c4c9eb73a5317cf3b4cb50 +++ ChangeLog e369c0222f33a719d1119e0587d279ee57a33bbf @@ -1,5 +1,10 @@ 2006-07-05 Timothy Brownawell + * tests/merge_conflict_with_no_lca: We don't want to crash when + a merge has a content conflict but no lca. + +2006-07-05 Timothy Brownawell + * randomfile.hh (file_randomizer::build_random_fork): When generating two consecutive 'insert' hunks where the inserts occur on opposite sides of the fork, insert spacer lines between the hunks. This ============================================================ --- testsuite.lua a958a32341dacf6077633d520376af16b54fb735 +++ testsuite.lua ace2e8cf29a362a716f553babc7a6a1a1cd21149 @@ -644,3 +644,4 @@ table.insert(tests, "netsync_over_pipes") table.insert(tests, "ls_unknown_of_unknown_subdir") table.insert(tests, "automate_branches") +table.insert(tests, "merge_conflict_with_no_lca")