# # # patch "tests/branch/__driver__.lua" # from [a5ad931c6d0ebefaafad9c7f953cf91349beb61f] # to [e2dd24c420248682d89ff1515d9bd390a5390d81] # ============================================================ --- tests/branch/__driver__.lua a5ad931c6d0ebefaafad9c7f953cf91349beb61f +++ tests/branch/__driver__.lua e2dd24c420248682d89ff1515d9bd390a5390d81 @@ -21,5 +21,30 @@ check(qgrep("the existing branch testbra check(mtn("branch", "testbranch"), 0, false, true) check(qgrep("the existing branch testbranch", "stderr")) --- TODO: check for the divergence warning +-- check if branch issues a warning if we're trying to change the +-- branch to a branch with an entirely independent base +check(mtn("automate", "put_file", "blablabla"), 0, true, false) +canonicalize("stdout") +fileid = string.sub(readfile("stdout"), 0, -2) +rev = [[ +format_version "1" +new_manifest [0000000000000000000000000000000000000000] + +old_revision [] + +add_dir "" + +add_file "bla" +]] + +rev = rev .. "content [" .. fileid .. "]\n" + +check(mtn("automate", "put_revision", rev), 0, true, false) +canonicalize("stdout") +revid = string.sub(readfile("stdout"), 0, -2) +check(mtn("automate", "cert", revid, "branch", "other_branch"), 0, false, false) + +check(mtn("branch", "other_branch"), 0, false, true) +check(qgrep("two unmergable heads", "stderr")) +