This patch adds a new config option which can be used to override the -B flag
of push command. If config is set to true, changesets will be pushed to that
bookmark on the server. This is equivalent to --to flag of remotenames and
infinitepush.
After this patch if config is set to true, the behavior will be:
- Normal push without -B flag: no behavior change
- specifying one bookmark using -B flag: changesets will be pushed to that bookmark on the server, as explained above. Bookmark pushed will be on the head most revision of the changesets pushed.
- specifying multiple bookmarks using -B flag: no behavior change, the same behavior as it's today without this config option
- specifying multiple topologcial heads to push: no behvaior change
There needs some extra logic to update the remotenames state locally after the
push since we know that the bookmark will now be at a known updated location.
What happens if we're pushing multiple heads? I suspect this will choose a head/revision arbitrarily - maybe depending on the -r arguments to hg push.
I think we need to validate that the outgoing revs are in a single DAG head and we should then pick the rev that is the DAG head.
Please add test coverage for multiple -r arguments and -r arguments that resolve to multiple heads.