comparison tests/test-topic.t @ 5601:3946ee4ee3ae

topic: add a `exp….topic.linear-merge` option to allow some oedipus If this option is set to `from-branch`, a user can call `hg merge some-topic` from a bare branch even if `some-topic` is a direct descendant of the current working copy parents. This was previously denied if the changesets was on the same branch, since the result would be an "oedipus merge". Some user have been requesting this, and this type of merge is one of Gitlab standard way of merging a "Merge Request". That new option will unlock issue `heptapod#200` and make this mode available for those who wants it.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 14 Oct 2020 15:48:37 +0200
parents 98e2613d797d
children 4ab2f602beb3 e5d91fd1f319 d0f73113fcc0
comparison
equal deleted inserted replaced
5600:d77d61c9e5e9 5601:3946ee4ee3ae
131 with topics to clients with the topic extension (version 9.3+). This might 131 with topics to clients with the topic extension (version 9.3+). This might
132 become the default in future: 132 become the default in future:
133 133
134 [experimental] 134 [experimental]
135 topic.server-gate-topic-changesets = yes 135 topic.server-gate-topic-changesets = yes
136
137 Explicitly merging in the target branch
138 =======================================
139
140 By default, Mercurial will not let your merge a topic into its target branch
141 if that topic is already based on the head of that branch. In other word,
142 Mercurial will not let your create a merge that will eventually have two
143 parents in the same branches, one parent being the ancestors of the other
144 parent. This behavior can be lifted using the following config:
145
146 [experimental]
147 topic.linear-merge = allow-from-bare-branch
148
149 When this option is set to 'allow-from-bare-branch', it is possible to merge a
150 topic branch from a bare branch (commit an active topic (eg: public one))
151 regardless of the topology. The result would typically looks like that:
152
153 @ summary: resulting merge commit
154 |\ branch: my-branch
155 | |
156 | o summary: some more change in a topic, the merge "target"
157 | | branch: my-branch
158 | | topic: my-topic
159 | |
160 | o summary: some change in a topic
161 |/ branch: my-branch
162 | topic: my-topic
163 |
164 o summary: previous head of the branch, the merge "source"
165 | branch: my-branch
136 166
137 list of commands: 167 list of commands:
138 168
139 Change organization: 169 Change organization:
140 170