cannot run histedit, strange message
Dan Villiom Podlaski Christiansen
danchr at gmail.com
Fri May 7 15:11:31 UTC 2021
On 7 May 2021, at 17.00, Uwe Brauer <oub at mat.ucm.es> wrote:
> Hi
>
> I have a typo in a commit message so I thought to run
>
> hg histedit
>
> However I obtain a message I never saw before
> abort: cannot edit history that contains merges
>
> The change set whose message I want to change does not contain a merge,
> but of course in this branch there have been merges, but some changesets
> ago.
>
> I can run uncommit, but I am wondering about the message honestly.
>
Without more context, it's hard to tell what's going on; by default, histedit edits the draft ancestors, and one of them might indeed be a merge. However, I'd suggest two things:
1) You can edit specific commits by passing -r/--rev to histedit.
2) You can do more advanced history editing with the the evolve[1] extension. It includes a `metaedit` command that allows specifically editing changeset metadata, including commit message.
[1] https://www.mercurial-scm.org/wiki/EvolveExtension
--
Dan Villiom Podlaski Christiansen
danchr at gmail.com
More information about the Mercurial
mailing list