Actions
Defect #44231
openMercurial tests fail with Mercurial 7.2.3 on MacOS
Status:
New
Priority:
Normal
Assignee:
-
Category:
SCM
Target version:
-
Resolution:
Affected version:
Description
It seems that the redmine_helper.py needs to be updated for more modern Mercurial versions. At least the rhsummary call used by Redmine::Scm::Adaptes::MercurialAdapter#summary seems to fail. I tested this with the current trunk at r24831.
hg -R tmp/test/mercurial_repository --encoding=utf-8 --config extensions.redminehelper=lib/redmine/scm/adapters/mercurial/redminehelper.py --config redminehelper.path_encoding= --config diff.git=false rhsummary
This outputs the following:
<?xml version="1.0"?>
<rhsummary>
<repository root="/redmine/tmp/test/mercurial_repository">
<tip revision="42" node="ba20ebce08dbd2f0320b93faf7bba7c86186a1f7"/>
<tag revision="37" node="cf5f7c556f5a643e1ec7cb01775be539f64eeefb" name="double%22quote%22tag"/>
<tag revision="21" node="adf805632193500ad3b615cd04f58f9b0769f576" name="tag-%C3%9C-00"/>
<tag revision="5" node="6987191f453a5f6557018d522feea2c450d5588d" name="tag_test.00"/>
<tag revision="0" node="0885933ad4f68d77c2649cd11f8311276e7ef7ce" name="tag-init-revision"/>
</repository>
</rhsummary>
** Unknown exception encountered with possibly-broken third-party extension "redminehelper" (version N/A)
** which supports versions unknown of Mercurial.
** Please disable "redminehelper" and try your action again.
** If that fixes the bug please report it to the extension author.
** Python 3.14.6 (main, Jun 10 2026, 10:03:53) [Clang 21.0.0 (clang-2100.0.123.102)]
** Mercurial Distributed SCM (version 7.2.3)
** Extensions loaded: redminehelper
Traceback (most recent call last):
File "/opt/homebrew/bin/hg", line 51, in <module>
dispatch.run()
~~~~~~~~~~~~^^
File "/opt/homebrew/lib/python3.14/site-packages/mercurial/dispatch.py", line 100, in run
status = dispatch(req)
File "/opt/homebrew/lib/python3.14/site-packages/mercurial/dispatch.py", line 189, in dispatch
status = _rundispatch(req)
File "/opt/homebrew/lib/python3.14/site-packages/mercurial/dispatch.py", line 239, in _rundispatch
ret = _runcatch(req) or 0
~~~~~~~~~^^^^^
File "/opt/homebrew/lib/python3.14/site-packages/mercurial/dispatch.py", line 435, in _runcatch
return _callcatch(ui, _runcatchfunc)
File "/opt/homebrew/lib/python3.14/site-packages/mercurial/dispatch.py", line 445, in _callcatch
return scmutil.callcatch(ui, func)
~~~~~~~~~~~~~~~~~^^^^^^^^^^
File "/opt/homebrew/lib/python3.14/site-packages/mercurial/scmutil.py", line 202, in callcatch
return func()
File "/opt/homebrew/lib/python3.14/site-packages/mercurial/dispatch.py", line 425, in _runcatchfunc
return _dispatch(req)
File "/opt/homebrew/lib/python3.14/site-packages/mercurial/dispatch.py", line 930, in _dispatch
return _dispatch_post_cwd(req)
File "/opt/homebrew/lib/python3.14/site-packages/mercurial/dispatch.py", line 1195, in _dispatch_post_cwd
return runcommand(
lui, repo, cmd, fullargs, ui, options, d, cmdpats, cmdoptions
)
File "/opt/homebrew/lib/python3.14/site-packages/mercurial/dispatch.py", line 862, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/opt/homebrew/lib/python3.14/site-packages/mercurial/dispatch.py", line 1208, in _runcommand
return cmdfunc()
File "/opt/homebrew/lib/python3.14/site-packages/mercurial/dispatch.py", line 1193, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.14/site-packages/mercurial/util.py", line 1998, in check
return func(*args, **kwargs)
File "lib/redmine/scm/adapters/mercurial/redminehelper.py", line 251, in rhsummary
_branches(ui, repo)
~~~~~~~~~^^^^^^^^^^
File "lib/redmine/scm/adapters/mercurial/redminehelper.py", line 116, in _branches
for t, n, r in sorted(iterbranches(), key=lambda e: e[2], reverse=True):
~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "lib/redmine/scm/adapters/mercurial/redminehelper.py", line 104, in iterbranches
for tag, heads, tip, isclosed in repo.branchmap().iterbranches():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'BranchCacheV2' object has no attribute 'iterbranches'
Updated by Holger Just 1 day ago
It seems that the iterbranches method was removed in Mercurial 7.2 with https://repo.mercurial-scm.org/hg/rev/02010bf96a32
Possibly related to this is the TortoiseHG project working on this very issue: https://groups.google.com/g/thg-dev/c/4ATavKiCuDA
Actions