From 061eac9a888ed2275ecc917d1aa97df04c476eee Mon Sep 17 00:00:00 2001 From: MAEDA Go Date: Mon, 12 Oct 2026 17:59:41 +0900 Subject: [PATCH 2/2] Fix Mercurial repository support failing with Mercurial 7.2 due to removed branch APIs --- lib/redmine/scm/adapters/mercurial/redminehelper.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/redmine/scm/adapters/mercurial/redminehelper.py b/lib/redmine/scm/adapters/mercurial/redminehelper.py index 4953fa9ff..d7de2c616 100644 --- a/lib/redmine/scm/adapters/mercurial/redminehelper.py +++ b/lib/redmine/scm/adapters/mercurial/redminehelper.py @@ -88,10 +88,12 @@ def _tags(ui, repo): def _branches(ui, repo): # see mercurial/commands.py:branches def iterbranches(): - for tag, heads, tip, isclosed in repo.branchmap().iterbranches(): + branchmap = repo.branchmap() + for tag in branchmap: + tip = branchmap.branchtip(tag) yield tag, tip, repo.changelog.rev(tip) def branchheads(branch): - return repo.branchheads(branch, closed=False) + return repo.branchmap().branchheads(branch, closed=False) def lookup(rev, n): try: return repo.lookup(str(rev).encode('utf-8')) -- 2.55.0