Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCM-Manager 2.0.0 Error in javahg.py #1179

Closed
nanek-hg opened this issue Jun 10, 2020 · 3 comments · Fixed by #1192
Closed

SCM-Manager 2.0.0 Error in javahg.py #1179

nanek-hg opened this issue Jun 10, 2020 · 3 comments · Fixed by #1192
Labels
bug Something isn't working

Comments

@nanek-hg
Copy link

Issue description

Error in javahg.py

Bug Report

I installed SCM-Manager 2.0.0 for Windows and noticed errors when working with Mercurial.

Describe how to reproduce the bug

I have created an empty repository and click on </> Code on the right. I have no error on the page, but there is an error in the logs.

Describe your SCM-Manager setup

SCM-Manager 2.0.0 for Windows
mercurial-4.9.1.win-amd64-py2.7
Python 2.7.18
java 14.0.1

Log of the bug

cze 10, 2020 12:02:03 PM com.aragost.javahg.log.JULLogger info
INFO: Copy resource /javahg.py to C:\WINDOWS\system32\config\systemprofile.javahg\tmp\1591783323298-0\javahg.py
cze 10, 2020 12:02:07 PM com.aragost.javahg.log.JULLogger error
SEVERE: stderr from Mercurial: *** failed to import extension javahg from C:\WINDOWS\system32\config\systemprofile.javahg\tmp\1591783323298-0\javahg.py: 'module' object has no attribute 'command'

Further information

It seems to me that in javahg.py:
line 32 should be changed from
from mercurial import util, commands, cmdutil, lock, extensions
to
from mercurial import util, commands, cmdutil, lock, extensions, registrar
and
line 42 should be changed from
command = cmdutil.command (cmdtable)
to
command = registrar.command (cmdtable)

cmdutil.comand is invalid since Mercurial 4.7

@pfeuffer
Copy link
Member

Thanks for the report, we will have a look at it. Do you know since what version registrar is available in hg, so that we can ensure backwards compatability?

@nanek-hg
Copy link
Author

https://www.mercurial-scm.org/repo/hg/log/tip/mercurial/registrar.py
2016-01-09 registrar: move cmdutil.command to registrar module (API)

https://www.mercurial-scm.org/repo/hg/log/tip/mercurial/cmdutil.py?revcount=240
2018-05-11 cmdutil: drop deprecated precursor of registrar.command (API)

registrar is available from Mercurial 3.7.1

@pfeuffer pfeuffer added the bug Something isn't working label Jun 11, 2020
@pfeuffer
Copy link
Member

Thank you for this information, @nanek-hg !

@eheimbuch eheimbuch linked a pull request Jun 16, 2020 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants