From issue2100: @pmezard: please the patch I posted to mercurial-devel yesterday ( http://www.selenic.com/pipermail/mercurial-devel/2010-March/019799.html ). I added test code that does not merely crash, but tests that --collapse and --keepbranches do the right thing together. Also, the kludgy fix that I posted addresses one concern that I don't see in your fix: what if someone tries to rebase --collapse --keepbranch where the source changesets are not all on the same named branch? I think the only option there is to abort, because it's not possible to fulfill the user's wish.
In my opinion there's nothing more we can do with multiple named branches. I've sent a patch that's basically what Greg did more than one year ago (!!!). Maybe we should move this discussion in ML, but I'm for disallowing it.
Fixed by http://selenic.com/repo/hg/rev/b9daa5b7a3af Stefano Tortarolo <stefano.tortarolo@gmail.com> rebase: block collapse with keepbranches on multiple named branches (issue2112) (please test the fix)
--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:07 EDT --- This bug was previously known as _bug_ 2112 at http://mercurial.selenic.com/bts/issue2112