# # # rename "tests/update_suggests_suspended_branches" # to "tests/update_does_not_suggest_suspended_branches" # # patch "NEWS" # from [f6dc9547c2093be41cb2a25e6bd1236c8c793d7b] # to [453441b1e2f755d65e324487693924705d71c0d9] # # patch "cmd_merging.cc" # from [8c83032c21fe3f890b8215efd89f4efecebc8bd8] # to [1319e91e0d8119f8079db36332437679e1894b3a] # # patch "tests/update_does_not_suggest_suspended_branches/__driver__.lua" # from [c99aa876addf95745d4b86287d5b71b02fcf3044] # to [24a16b7a74e83ed9b70b451a010d601c04e65ea8] # ============================================================ --- NEWS f6dc9547c2093be41cb2a25e6bd1236c8c793d7b +++ NEWS 453441b1e2f755d65e324487693924705d71c0d9 @@ -61,6 +61,10 @@ Xxx Xxx 99 99:99:99 UTC 2010 Bugs Fixed + - monotone no longer asks to pick a branch from a set of branches + of a revision in which all but one branch have been suspended + (fixes monotone bug #29843) + - monotone now tries harder to find the cancel hint in a commit message and only aborts if it can't find it anywhere (fixes monotone bug #30215) ============================================================ --- cmd_merging.cc 8c83032c21fe3f890b8215efd89f4efecebc8bd8 +++ cmd_merging.cc 1319e91e0d8119f8079db36332437679e1894b3a @@ -136,11 +136,28 @@ pick_branch_for_update(options & opts, d db.get_revision_certs(chosen_rid, branch_cert_name, certs); db.erase_bogus_certs(project, certs); - set< branch_name > branches; + set branches; for (vector::const_iterator i = certs.begin(); i != certs.end(); i++) branches.insert(typecast_vocab(i->value)); + if (!opts.ignore_suspend_certs) + { + vector suspend_certs; + db.get_revision_certs(chosen_rid, suspend_cert_name, suspend_certs); + + for (vector::const_iterator i = suspend_certs.begin(); + i != suspend_certs.end(); i++) + { + branch_name susp_branch = typecast_vocab(i->value); + set::iterator pos = branches.find(susp_branch); + if (pos != branches.end()) + { + branches.erase(pos); + } + } + } + if (branches.find(opts.branch) != branches.end()) { L(FL("using existing branch %s") % opts.branch()); @@ -167,7 +184,6 @@ pick_branch_for_update(options & opts, d } else { - I(branches.empty()); W(F("target revision not in any branch\n" "next commit will use branch %s") % opts.branch); ============================================================ --- tests/update_does_not_suggest_suspended_branches/__driver__.lua c99aa876addf95745d4b86287d5b71b02fcf3044 +++ tests/update_does_not_suggest_suspended_branches/__driver__.lua 24a16b7a74e83ed9b70b451a010d601c04e65ea8 @@ -1,4 +1,4 @@ --- this is an accompanying xfailing test for #29843 +-- this is an accompanying test for #29843 mtn_setup() @@ -17,4 +17,4 @@ check(mtn("update", "-r", base), 0, fals -- this should directly update the workspace to the child -- revision and not ask us which branch to choose -xfail(mtn("update", "-r", child), 0, false, false) +check(mtn("update", "-r", child), 0, false, false)