Merge request depending to draft ancestors should not be published without warning
Summary
During the development of a feature, in its own topic, it may happen (in a rare and not very good workflow) that you write a second "sub"-feature and create a merge request onto that topic.
By merging that MR, it'll publish all ancestor topics without a warning.
NB: This has happened to me as a newcomer to Mercurial in a real work repo, I wasn't aware of phases.
Steps to reproduce
- Draft commit in a new topic
foo
- Draft commit in a new topic
bar
, descendant offoo
's commit - Create a merge request from
bar
topic tofoo
- Merge it!
Actual result
All these draft commits get published.
Expected behavior
Multiple behavior may be chosen:
- Warn that ancestor topic (or rather the based commit) is a draft and, either:
- prevent merging
- confirm that merging will publish ancestors too
- Rebase instead of merge to keep it draft
It has been suggested that behavior could be different if ancestors got existing merge requests, e.g. by linking to these. At least work in progress should probably prevent publishing. Also, ancestor merge requests that now reference published commits may be considered obsolete.