Now that we have a config option for enabling local-only obsolescence,
it is time to do something with it.
This commit teaches cleanupnodes() - which is called after rewrite
operations - to handle local only obsolescence mode.
In this mode, we create a backup bundle of the obsoleted changesets -
just like what happens if obsolescence is disabled. But we don't strip
the repo: we keep the original changesets around in a non-visible state.
The new code verifies that no unstable changesets are introduced in
local-only obsolescence mode.
The new code hackily only runs if the action is "amend." The intent
is to make this conditional only on the feature option. However,
doing that would have significant test fallout. So we limit to "amend"
for now.
TODO:
- Better test coverage (I think the "(testcase !)" syntax might be subtly wrong by flagging output as optional and not required).
- Delete obsolescence markers when we pull and unbundle from the bundle.
- Support pulling locally-hidden heads.