merge topics (two heads)

Uwe Brauer oub at mat.ucm.es
Thu Oct 31 15:20:22 UTC 2019


> On 10/26/19 1:38 AM, Uwe Brauer wrote:


> What version of hg? With hg-5.1, I do not get the same behavior. `hg
> heads` lists only the NewTopic tip (rev 5).

hg  5.0.1+3-d532292eff22+20190614

For the moment I cannot use 5.1 or 5.2 because of a problem with hg-git.


> I wouldn't expect setting a topic to create a new head. It changes the
> hash, but it's just setting some extra metadata.
Ok 

> But I just tried with hg-3.7.1 and hg-4.7.1, and I get your behavior
> with both. So I guess this has changed recently.

I see.

I tend to prefer, that if I create a topic hg  should create a new head,
but if I understand this correctly it is not actually the case, and the
hg heads
information is somehow invalid.


> If you make sure you have a topological branch to force a new head,
> then I guess this depends on what `hg merge` does with topics.
> Normally, hg commands restrict their view to the current topic. So in
> that way, I could argue that there shouldn't be a merge in your case,
> because the topic has only one head. But I think merge may be one of
> the exceptions, because of the common scenario of merging a topic back
> into the un-topic'ed mainline?

At least that would be a good option. I started to use topics some
months ago and usually would not merge them into the mainline, but I
would prefer if I could. What of course needs to be changed is the
output of hg heads, but as you said: this is already done in more recent
versions of mercurial.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5025 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20191031/da4d9ace/attachment.p7s>


More information about the Mercurial mailing list