no-git: problems with default GitLab branch
See today on mercurial/mercurial-devel>:
remote: File "/home/hg/venv/lib/python3.9/site-packages/hgext3rd/heptapod/__init__.py", line 162, in gitlab_mirror
remote: no_git.NoGitStateMaintainer(ui, repo).sync()
remote: File "/home/hg/venv/lib/python3.9/site-packages/hgext3rd/heptapod/no_git.py", line 86, in sync
remote: self.update_gitlab_references()
remote: File "/home/hg/venv/lib/python3.9/site-packages/hgext3rd/heptapod/state_maintainer.py", line 1060, in update_gitlab_references
remote: self.heptapod_apply_changes(prune_reasons, changes)
remote: File "/home/hg/venv/lib/python3.9/site-packages/hgext3rd/heptapod/state_maintainer.py", line 1071, in heptapod_apply_changes
remote: self.update_default_gitlab_branch(changes)
remote: File "/home/hg/venv/lib/python3.9/site-packages/hgext3rd/heptapod/state_maintainer.py", line 1132, in update_default_gitlab_branch
remote: self.set_default_gitlab_ref(new_default_ref)
remote: File "/home/hg/venv/lib/python3.9/site-packages/hgext3rd/heptapod/no_git.py", line 99, in set_default_gitlab_ref
remote: b"Setting GitLab branch to %s" % new_gl_branch)
remote: TypeError: %b requires a bytes-like object, or an object that implements __bytes__, not 'NoneType'
The root of the problem is that the stored default GitLab branch is wrong:
$ cat .hg/default_gitlab_branch; echo
topic/default/rhg.errors
and that should never have happened, but it should nevertheless get updated correctly in that case.
To complicate things further, the Rails app sees the correct default branch (`branch/default').