Fetch branch names directly

No need to use get_changeset() for just one thing.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
This commit is contained in:
Felipe Contreras
2023-03-09 18:13:04 -06:00
parent 5e4bc6eb03
commit 432254100b

View File

@@ -512,7 +512,7 @@ def verify_heads(ui,repo,cache,force,ignore_unnamed_heads,branchesmap):
t={}
unnamed_heads=False
for h in repo.filtered(b'visible').heads():
(_,_,_,_,_,_,branch,_)=get_changeset(ui,repo,h)
branch=get_branch(repo[h].branch())
if t.get(branch,False):
stderr_buffer.write(
b'Error: repository has an unnamed head: hg r%d\n'