enforce-single-head = yes prevents commit, although there are no multiple heads
Sushil Khanchi
sushilkhanchi97 at gmail.com
Thu Dec 17 10:31:45 UTC 2020
On Thu, Dec 17, 2020 at 2:03 PM Uwe Brauer <oub at mat.ucm.es> wrote:
> >>> "AB" == Arne Babenhauserheide <arne_bab at web.de> writes:
>
> > Uwe Brauer <oub at mat.ucm.es> writes:
>
> >> [experimental]
> >> enforce-single-head = yes
> > …
> >> abort: 3 heads on "default"
> >> (cbf9827aaa0b, c5126e027526, aa50036267da)
> >>
> >> So I deleted the option and commited again, however when running
> >> hg heads
> >>
> >> It returned one head not three
>
> > Could they be closed? You can check with
>
> > hg heads --closed
>
> Hm, good idea thanks but no:
>
> hg heads --closed
>
> Gives
>
>
> changeset: 900:597cb79b1cdf
> branch: year-2020-21
> tag: tip
> topic: covid19
> user: Uwe Brauer <oub at mat.ucm.es>
> date: Thu Dec 17 08:45:03 2020 +0100
> summary: Typos and switch to email
>
> Buy when I run
>
> hg -r tip -T '{count(revset("head()"))}\n'
>
>
> It return
>
> 17 heads
>
> What the heck is going on?
>
> Maybe hg heads is buggy (for the version I use).
>
Yes, if the working directory parent has an active topic `hg heads` gives
an incorrect result. There is a Merge Request to fix this which will be
merged soon. See
https://foss.heptapod.net/mercurial/evolve/-/merge_requests/286
> Please have a look at this graph (from a test repository
>
> ◍ changeset: 4:047eecd044a9
> │ Branch: default
> │ tag: tip
> │ Author: Uwe Brauer <oub at mat.ucm.es>
> │ Date: Tue, 15 Dec 2020 18:22:55 +0100
> │ Topic: ThirdTopic
> │ Phase: draft
> │ Summary: Second head
> │
> │ ○ changeset: 3:c1b67b9c43dc
> │ │ Branch: default
> │ │ Author: Uwe Brauer <oub at mat.ucm.es>
> │ │ Date: Tue, 15 Dec 2020 18:18:09 +0100
> │ │ Topic: SecondTopic
> │ │ Phase: draft
> │ │ Summary: Fourth
> │ │
> │ ○ changeset: 2:000be01362b3
> │╱ Branch: default
> │ Author: Bernhard Riemann <bernhard.riemann at gmail.com>
> │ Date: Tue, 15 Dec 2020 18:18:09 +0100
> │ Topic: FirstTopic
> │ Phase: draft
> │ Summary: Third
>
>
> Hg heads only returns
>
>
> changeset: 4:047eecd044a9
> tag: tip
> topic: ThirdTopic
> parent: 1:7a628e187155
> user: Uwe Brauer <oub at mat.ucm.es>
> date: Tue Dec 15 18:22:55 2020 +0100
> summary: Second head
>
>
> Which looks incorrect to me.
>
> But
>
> hg -r tip -T '{count(revset("head()"))}\n'
>
> Returns
>
> 4.
>
> Maybe I should interpolate ;-)
>
> _______________________________________________
> Mercurial mailing list
> Mercurial at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20201217/37506cac/attachment-0002.html>
More information about the Mercurial
mailing list