Project

General

Profile

Actions

Defect #28725

closed

Mercurial 4.6 compatibility

Added by Frédéric Fondement almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
SCM
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

Hello,

My Redmine 3.4.5 can't display any info when checking a mercurial repository when I upgrade Mercurial from 4.5.3 to 4.6.

The following error is shown in production.log:

Started GET "/redmine/projects/nerdsarmy/repository" for aaa.bbb.ccc.ddd at 2018-05-09 21:07:37 +0200
Processing by RepositoriesController#show as HTML  Parameters: {"id"=>"nerdsarmy"}                                                                                                                                                       
  Current user: me@mydot.com (id=86)
hg: error during getting info: hg exited with non-zero status: 1
  Rendered common/error.html.erb within layouts/base (1.6ms)
  Rendered plugins/redmine_code_review/app/views/code_review/_html_header.html.erb (5.3ms)
  Rendered plugins/redmine_code_review/app/views/code_review/_change_repository_view.html.erb (0.1ms)
  Rendered plugins/redmine_code_review/app/views/code_review/_body_bottom.html.erb (2.2ms)
Completed 404 Not Found in 524ms (Views: 77.3ms | ActiveRecord: 10.2ms)

The command that triggers the error:

hg -R/hg/gl1718-nerdsarmy-model --encoding=utf-8 --config extensions.redminehelper=/redmine-3.4.5/lib/redmine/scm/adapters/mercurial/redminehelper.py --config diff.git=false rhsummary

whose result is:
<?xml version="1.0"?>
<rhsummary>
<repository root="/hg/gl1718-nerdsarmy-model">
</repository>
</rhsummary>
** Unknown exception encountered with possibly-broken third-party extension redminehelper
** 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 2.7.15 (default, May  9 2018, 19:47:00) [GCC 7.2.1 20170829 (Red Hat 7.2.1-1)]
** Mercurial version 4.6, système de gestion de sources distribué
** Extensions chargées : highlight, strip, redminehelper
Traceback (most recent call last):
  File "/usr/local/bin/hg", line 41, in <module>
    dispatch.run()
  File "/usr/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 90, in run
    status = (dispatch(req) or 0)
  File "/usr/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 210, in dispatch
    ret = _runcatch(req)
  File "/usr/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 351, in _runcatch
    return _callcatch(ui, _runcatchfunc)
  File "/usr/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 359, in _callcatch
    return scmutil.callcatch(ui, func)
  File "/usr/local/lib/python2.7/site-packages/mercurial/scmutil.py", line 160, in callcatch
    return func()
  File "/usr/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 341, in _runcatchfunc
    return _dispatch(req)
  File "/usr/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 971, in _dispatch
    cmdpats, cmdoptions)
  File "/usr/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 727, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 979, in _runcommand
    return cmdfunc()
  File "/usr/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 968, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
  File "/usr/local/lib/python2.7/site-packages/mercurial/util.py", line 1553, in check
    return func(*args, **kwargs)
  File "/usr/share/redmine-3.4.5/lib/redmine/scm/adapters/mercurial/redminehelper.py", line 219, in rhsummary
    _tip(ui, repo)
  File "/usr/share/redmine-3.4.5/lib/redmine/scm/adapters/mercurial/redminehelper.py", line 64, in _tip
    tipctx = repo.changectx(tiprev())
  File "/usr/local/lib/python2.7/site-packages/mercurial/repoview.py", line 255, in __getattr
    return getattr(self._unfilteredrepo, attr)
AttributeError: 'localrepository' object has no attribute 'changectx'

All of this is back to normal when downgrading mercurial to 4.5.3

Regards


Files

fix-28725.diff (2.06 KB) fix-28725.diff updated patch by Frédéric Fondement (#28725#note-5) Go MAEDA, 2018-05-24 23:49
Actions

Also available in: Atom PDF