Fixing commit author with broken character encoding

Dr Rainer Woitok rainer.woitok at gmail.com
Sat May 4 15:37:09 UTC 2019


Gregor,

On Thursday, 2019-05-02 16:02:34 +0200, you wrote:

> ...
> 
> I have a repository with a commit that I apparently made with a 
> misconfigured mercurial instance. Specificially, my author string seems 
> to have been broken so that my last name was mangled into something that 
> seems to be utterly broken.

If your repository is not spread all about the web, that is,  if it only
exists on a handful computers and backup media you have control of,  you
could try to run  "hg histedit <changeset>",  select "edit" for the top-
most changeset, save and close the editor, and then run

   hg commit --amend --user 'Gregor Mueckl <gmueckl at gregor-mueckl.de>'
   hg histedit --continue

Mind however,  that I have not  tried this myself!   And  mind that this
will change the hash  of this changeset and all its siblings,  so you'll
have to delete all clones of this repository and clone them anew.

I faintly remember that my Mercurial refused umlauts in commit messages,
but maybe some flavors of Mercurial or Tortoise won't.  So avoid the "ü"
in your name.

Sincerely,
  Rainer



More information about the Mercurial mailing list