Default branch value overridden by topic
It happened today here on mercurial/mercurial-devel>: topic/stable/uninstall-issue6762
became the default branch.
From the logs, it's not clear why, except that it was made through HGitaly:
[2022-11-28 12:15:00,917] [501] [DEBUG] [hgitaly.interceptors] Starting to process RPC CountCommitsRequest { repository { storage_name: "default" relative_path: "@hashed/78/5f/785f3ec7eb32f30b90cd0fcf3657d388b5ff4297f2f9716ff66e9b69c05ddd09.git" gl_repository: "project-22" gl_project_path: "mercurial/mercurial-devel" } revision: "topic/stable/uninstall-issue-6762" }
[2022-11-28 12:15:03,045] [501] [DEBUG] [hgitaly.interceptors] Starting to process RPC FindAllBranchNamesRequest { repository { storage_name: "default" relative_path: "@hashed/78/5f/785f3ec7eb32f30b90cd0fcf3657d388b5ff4297f2f9716ff66e9b69c05ddd09.git" gl_repository: "project-22" gl_project_path: "mercurial/mercurial-devel" } }
[2022-11-28 12:15:03,245] [501] [DEBUG] [hgitaly.interceptors] Starting to process RPC WriteRefRequest { repository { storage_name: "default" relative_path: "@hashed/78/5f/785f3ec7eb32f30b90cd0fcf3657d388b5ff4297f2f9716ff66e9b69c05ddd09.git" gl_repository: "project-22" gl_project_path: "mercurial/mercurial-devel" } ref: "HEAD" revision: "refs/heads/topic/stable/uninstall-issue-6762" }
The above extract is all requests for the project, from the first involving the topic up to the one setting default branch, it case it helps understanding the sequence.
We should at least add logs in the Mercurial-specific code in PostReceiveWorker
that is supposed to set the default branch if needed.