FWIW, here's the code I've used to merge the emacs-23 branch into the trunk. It presumes that the commits I don't want to include have the keyword "backport" or "merge" in it, so please make sure you include such keywords in your "not to be merged" commits in the future. It's pretty rough, and is scaringly slow (to some extent because of bzr's braindead lack of support for merging into a tree that's not clean). But that merge seemed like a good opportunity, since it had many backports and a naive merge generated tons of conflicts (a large part of them due to "bump version"). BTW, thanks Chong for committing the "bump version" separately from any real change, so I could just skip that patch rather than try and come up with some clever way to recognize and auto-resolve the resulting conflicts. Stefan