Character encoding problem while merging MR through the UI
We get non-ASCII related failures if one of these contains non-ASCII characters:
- the merge request title or description (can be generated automatically from topic commits)
- full name of the user who merges through UI
In the former case, that's because they are used in the merge commit message, in the latter they are used for authorship of the merge commit message.
The authors of topic commits being merged don't matter by themselves: they have already been decoded appropriately.
See topic non-ascii
in heptapod-tests for scenario.
Extract of the logs generated by the hg
commands issued from GitLab:
[2019-08-01 09:09:50 +0000] [12532] [INFO] repo:/var/opt/gitlab/git-data/repositories/root/test_project.hg [hg.command] -R/var/opt/gitlab/git-data/repositories/root/test_project.hg --config 'ui.username=Administrator <admin@example.com>' commit -m 'Merge branch '\''topic/default/antelope'\'' into '\''branch/default'\''
Même une antilope !
See merge request root/test_project!1'
[2019-08-01 09:09:50 +0000] [12532] [INFO] repo:/var/opt/gitlab/git-data/repositories/root/test_project.hg [hg.branchcache] updated served-topic branch cache in 0.0025 seconds
[2019-08-01 09:09:50 +0000] [12532] [INFO] repo:/var/opt/gitlab/git-data/repositories/root/test_project.hg [hg] committing files:
[2019-08-01 09:09:50 +0000] [12532] [INFO] repo:/var/opt/gitlab/git-data/repositories/root/test_project.hg [hg] antelope
[2019-08-01 09:09:50 +0000] [12532] [DEBUG] repo:/var/opt/gitlab/git-data/repositories/root/test_project.hg [hg] not reusing manifest (no file change in changelog, but manifest differs)
[2019-08-01 09:09:50 +0000] [12532] [INFO] repo:/var/opt/gitlab/git-data/repositories/root/test_project.hg [hg] committing manifest
[2019-08-01 09:09:50 +0000] [12532] [INFO] repo:/var/opt/gitlab/git-data/repositories/root/test_project.hg [hg] committing changelog
[2019-08-01 09:09:50 +0000] [12532] [WARNING] repo:/var/opt/gitlab/git-data/repositories/root/test_project.hg [hg] transaction abort!
[2019-08-01 09:09:50 +0000] [12532] [WARNING] repo:/var/opt/gitlab/git-data/repositories/root/test_project.hg [hg] rollback completed
[2019-08-01 09:09:50 +0000] [12532] [ERROR] repo:None [hg] abort: decoding near 'efault'
Même une a': 'ascii' codec can't decode byte 0xc3 in position 62: ordinal not in range(128)!
[2019-08-01 09:09:50 +0000] [12532] [INFO] repo:None [hg.commandfinish] -R/var/opt/gitlab/git-data/repositories/root/test_project.hg --config 'ui.username=Administrator <admin@example.com>' commit -m 'Merge branch '\''topic/default/antelope'\'' into '\''branch/default'\''
Même une antilope !
See merge request root/test_project!1' exited 255 after 0.11 seconds
This is done with heptapod-tests, topic non-ascii
, and actually through the REST API instead of the regular UI, but that shouldn't matter.
The UTF-8 user name itself doesn't harm so far.
Edited by Georges Racinet