Server-side obsolete heads prevent merging from the UI
This happened to me while merging heptapod-tests!7 (merged) from the Web UI. The current version of this instance is heptapod/omnibus@f8005bd26eb0d12a52bad4c6faf2b5ce69be5e64
The merge failed, but didn't break the MR page, that restored itself after the 6s timer wait.
What the logs show is that the merge commit has been cohnsidered to create multiple heads on the default branch and hence got rejected by hg-git technical limitations (not to be confused with the functional server-side prohibition with experimental.single-head-per-branch
). This should work once hg-git!9 (merged) gets landed, but I'd prefer to fix it independently, because it is simply wrong. I did reproduce the exact same commands on my local repository (without hg-git
), and indeed got only one head on default
.
Here's the graph, taken on the server:
o changeset: 111:3a4df500c31e
| tag: tip
| topic: mr_named_branch
| user: Georges Racinet <georges.racinet@octobus.net>
| date: Fri Aug 30 15:29:16 2019 +0200
| summary: Testing autodetection of MR merges for named branches (heptapod#50)
|
o changeset: 110:bac6c0577b15
| topic: mr_named_branch
| user: Georges Racinet <georges.racinet@octobus.net>
| date: Fri Aug 30 14:59:11 2019 +0200
| summary: Testing merging MR of named branches from GitLab (heptapod#50)
|
o changeset: 109:c81e40af2ebd
| topic: mr_named_branch
| parent: 105:9bcad39031be
| user: Georges Racinet <georges.racinet@octobus.net>
| date: Fri Aug 30 14:56:59 2019 +0200
| summary: Project creation: another possible async page
|
| o changeset: 108:1d14980392e2
| | topic: multiple_heads
| | user: Georges Racinet <georges.racinet@octobus.net>
| | date: Thu Aug 29 11:58:57 2019 +0200
| | summary: Test for handling of multiple heads (hg-git#2)
| |
| o changeset: 107:1cdb9ec3fb02
|/ topic: multiple_heads
| parent: 105:9bcad39031be
| user: Georges Racinet <georges.racinet@octobus.net>
| date: Thu Aug 29 11:56:58 2019 +0200
| summary: Project: methods to manage server-side repo HGRC
|
| o changeset: 106:d8f5b7de29cd
|/ user: Georges Racinet <georges.racinet@octobus.net>
| date: Wed Aug 28 13:51:44 2019 +0200
| summary: Functional test for publication permission (heptapod#79)
|
o changeset: 105:9bcad39031be
| user: Georges Racinet <georges.racinet@octobus.net>
| date: Wed Aug 28 15:33:13 2019 +0200
| summary: Project: deduplication of API methods running as the owner
Here are the logs:
[2019-08-31 08:05:58 +0000] [24345] [INFO] repo:None [hg.logging] Diverted all output to the standard Python logging module
[2019-08-31 08:05:58 +0000] [24345] [INFO] repo:/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg [hg.command] -R/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg log --limit 1 -rd8f5b7de29cd52dfb72c7f1509701bde7494b4c6 '-T{branch}'
[2019-08-31 08:05:58 +0000] [24345] [INFO] repo:None [hg.commandfinish] -R/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg log --limit 1 -rd8f5b7de29cd52dfb72c7f1509701bde7494b4c6 '-T{branch}' exited 0 after 0.18 seconds
[2019-08-31 08:05:58 +0000] [24347] [INFO] [hgext3rd.loggingmod] jsonconf=None
[2019-08-31 08:05:58 +0000] [24347] [INFO] repo:None [hg.logging] Diverted all output to the standard Python logging module
[2019-08-31 08:05:58 +0000] [24347] [INFO] repo:/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg [hg.command] -R/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg log --limit 1 -r3a4df500c31eaf520e3fdb52adb9dfea64b3617e '-T{branch}'
[2019-08-31 08:05:58 +0000] [24347] [INFO] repo:None [hg.commandfinish] -R/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg log --limit 1 -r3a4df500c31eaf520e3fdb52adb9dfea64b3617e '-T{branch}' exited 0 after 0.17 seconds
[2019-08-31 08:05:59 +0000] [24354] [INFO] [hgext3rd.loggingmod] jsonconf=None
[2019-08-31 08:05:59 +0000] [24354] [INFO] repo:None [hg.logging] Diverted all output to the standard Python logging module
[2019-08-31 08:05:59 +0000] [24354] [INFO] repo:/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg [hg.command] -R/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg up -C d8f5b7de29cd52dfb72c7f1509701bde7494b4c6
[2019-08-31 08:05:59 +0000] [24354] [INFO] repo:/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg [hg] resolving manifests
[2019-08-31 08:05:59 +0000] [24354] [INFO] repo:None [hg.commandfinish] -R/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg up -C d8f5b7de29cd52dfb72c7f1509701bde7494b4c6 exited 0 after 0.21 seconds
q[2019-08-31 08:05:59 +0000] [24356] [INFO] [hgext3rd.loggingmod] jsonconf=None
[2019-08-31 08:05:59 +0000] [24356] [INFO] repo:None [hg.logging] Diverted all output to the standard Python logging module
[2019-08-31 08:05:59 +0000] [24356] [INFO] repo:/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg [hg.command] -R/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg merge -t 'internal:fail' -r 3a4df500c31eaf520e3fdb52adb9dfea64b3617e
[2019-08-31 08:05:59 +0000] [24356] [INFO] repo:/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg [hg] resolving manifests
[2019-08-31 08:05:59 +0000] [24356] [INFO] repo:None [hg.commandfinish] -R/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg merge -t 'internal:fail' -r 3a4df500c31eaf520e3fdb52adb9dfea64b3617e exited 0 after 0.19 seconds
[2019-08-31 08:05:59 +0000] [24359] [INFO] [hgext3rd.loggingmod] jsonconf=None
[2019-08-31 08:05:59 +0000] [24359] [INFO] repo:None [hg.logging] Diverted all output to the standard Python logging module
[2019-08-31 08:05:59 +0000] [24359] [INFO] repo:/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg [hg.command] -R/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg --config 'ui.username=Georges Racinet <georges.racinet@octobus.net>' commit -m 'Merge branch '\''topic/default/mr_named_branch'\'' into '\''branch/default'\''
Tests for Merge Requests and named branches
See merge request heptapod/heptapod-tests!7'
[2019-08-31 08:05:59 +0000] [24359] [INFO] repo:/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg [hg.branchcache] updated served-topic branch cache in 0.0039 seconds
[2019-08-31 08:05:59 +0000] [24359] [INFO] repo:/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg [hg] committing files:
[2019-08-31 08:05:59 +0000] [24359] [INFO] repo:/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg [hg] tests/test_merge_requests.py
[2019-08-31 08:05:59 +0000] [24359] [INFO] repo:/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg [hg] tests/utils/project.py
[2019-08-31 08:05:59 +0000] [24359] [INFO] repo:/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg [hg] committing manifest
[2019-08-31 08:05:59 +0000] [24359] [INFO] repo:/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg [hg] committing changelog
[2019-08-31 08:05:59 +0000] [24359] [INFO] repo:/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg [hg.evoext-cache] updated evo-ext-obscache in 0.0002 seconds (1r, 0o)
[2019-08-31 08:05:59 +0000] [24359] [INFO] repo:/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg [hg.branchcache] updated visible-topic branch cache in 0.0004 seconds
[2019-08-31 08:05:59 +0000] [24359] [INFO] repo:/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg [hg] calling hook pretxnclose.heptapod_sync: heptapod_hooks.git_sync.mirror
[2019-08-31 08:05:59 +0000] [24359] [INFO] repo:/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg [hg] Heptapod mirror starting
[2019-08-31 08:05:59 +0000] [24359] [INFO] repo:/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg [hg] finding hg commits to export
[2019-08-31 08:05:59 +0000] [24359] [INFO] repo:/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg [hg] exporting hg objects to git
[2019-08-31 08:05:59 +0000] [24359] [INFO] repo:/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg [hg] converting revision 8953d044b138f9955981d296b5a8e875e526b5fa
[2019-08-31 08:05:59 +0000] [24359] [INFO] repo:/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg [hg.tagscache] writing .hg/cache/tags2 with 0 tags
[2019-08-31 08:05:59 +0000] [24359] [INFO] repo:/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg [hg.branchcache] updated None branch cache in 0.0006 seconds
[2019-08-31 08:05:59 +0000] [24359] [INFO] repo:/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg [hg.branchcache] wrote None branch cache with 3 labels and 11 nodes
[2019-08-31 08:05:59 +0000] [24359] [WARNING] repo:/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg [hg] error: pretxnclose.heptapod_sync hook failed: cannot export branch default: has multiple heads
[2019-08-31 08:05:59 +0000] [24359] [INFO] repo:/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg [hg.pythonhook] pythonhook-pretxnclose: heptapod_hooks.git_sync.mirror finished in 0.03 seconds
[2019-08-31 08:05:59 +0000] [24359] [WARNING] repo:/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg [hg] transaction abort!
[2019-08-31 08:05:59 +0000] [24359] [WARNING] repo:/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg [hg] rollback completed
[2019-08-31 08:05:59 +0000] [24359] [ERROR] repo:None [hg] abort: cannot export branch default: has multiple heads
[2019-08-31 08:05:59 +0000] [24359] [INFO] repo:None [hg.commandfinish] -R/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg --config 'ui.username=Georges Racinet <georges.racinet@octobus.net>' commit -m 'Merge branch '\''topic/default/mr_named_branch'\'' into '\''branch/default'\''
Tests for Merge Requests and named branches
See merge request heptapod/heptapod-tests!7' exited 255 after 0.24 seconds
[2019-08-31 08:05:59 +0000] [24360] [INFO] [hgext3rd.loggingmod] jsonconf=None
[2019-08-31 08:05:59 +0000] [24360] [INFO] repo:None [hg.logging] Diverted all output to the standard Python logging module
[2019-08-31 08:06:00 +0000] [24360] [INFO] repo:/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg [hg.command] -R/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg up -C 0000000000000000000000000000000000000000
[2019-08-31 08:06:00 +0000] [24360] [INFO] repo:/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg [hg] resolving manifests
[2019-08-31 08:06:00 +0000] [24360] [INFO] repo:None [hg.commandfinish] -R/var/opt/gitlab/git-data/repositories/heptapod/heptapod-tests.hg up -C 0000000000000000000000000000000000000000 exited 0 after 0.20 seconds