Any way to prevent Evolve's `metaedit` from opening the message?

Marcos Cruz evolve-testers-list at programandala.net
Fri Apr 7 17:56:11 UTC 2023


Faheem Mitha escribió/skribis/wrote/scrit (2023-04-07T22:18:48+0530):

> Yes, normally metaedit is intended to edit the existing commit message.
> Hence it's natural to open an editor. What's the problem with that?

I'm converting my last Fossil repos to Mercurial.

The other day I had to fix the author of 287 commits that lacked email
because of an old unnoticed misconfiguration in the Fossil repo, which
has a GitHub mirror.

I wrote a simple shell loop in order to change all of the commits in a
single step… but I had to close the Neovim editor 287 times instead :)
(I did a pause to check the docs and do some tests, but it seemed clear
that there was no solution, so I finished the 287 manual non-editions…)

I've found a second repo with ca. 90 commits without user email, so I
prefered to ask, just in case.

> What different behavior would you prefer?

I've used the `metaedit` and `evolve` commands before, to fix some old
wrong dates, and it worked great, it's impressive; but I never realized
this limitation because I had to change only a few commits.

The mandatory edition of the commit message makes it impossible to
automatize the fixing of dates or users when the commit message needs no
edition.

A possible solution would be to write a shell program to extract all of
the current messages and add them to `metaedit` with the `-m` option.

I think a flag option meaning "no message edition required", say `-M`,
would make `metaedit` more flexible without breaking the current default
behaviour.

-- 
Marcos Cruz
http://programandala.net


More information about the Evolve-testers mailing list