Problem using hg 5.2

Hohensee, Paul hohensee at amazon.com
Thu Dec 19 21:44:11 UTC 2019


+hg-tools-dev

From: "Hohensee, Paul" <hohensee at amazon.com>
Date: Thursday, December 19, 2019 at 1:15 PM
To: "code-tools-dev at penjdk.java.net" <code-tools-dev at penjdk.java.net>
Subject: Problem using hg 5.2

Has anyone seen or can anyone help with the following?

I have the latest jcheck and defpath extensions installed in ~/.hgext on my Mac laptop running Mohave 10.14.6. I installed hg 5.2 via brew, but when I run “hg --version”, I get


*** failed to import extension hgext.jcheck from $HOME/.hgext/jcheck.py: No module named 'urllib2'

*** failed to import extension hgext.defpath from $HOME/.hgext/defpath.py: invalid syntax (defpath.py, line 157)

Mercurial Distributed SCM (version 5.2)

(see https://mercurial-scm.org for more information)



Copyright (C) 2005-2019 Matt Mackall and others

This is free software; see the source for copying conditions. There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Trying to run “hg defpath” produces


*** failed to import extension hgext.jcheck from $HOME/.hgext/jcheck.py: No module named 'urllib2'

*** failed to import extension hgext.defpath from $HOME/.hgext/defpath.py: invalid syntax (defpath.py, line 157)

hg: unknown command 'defpath'

(did you mean one of patch, paths?)

I haven’t changed my .hgrc: it contains

[extensions]
hgext.jcheck = $HOME/.hgext/jcheck.py
hgext.defpath = $HOME/.hgext/defpath.py

Importing urllib2 from the python shell works, vis


% python

Python 2.7.17 (default, Oct 24 2019, 12:57:47)

[GCC 4.2.1 Compatible Apple LLVM 11.0.0 (clang-1100.0.33.8)] on darwin

Type "help", "copyright", "credits" or "license" for more information.

>>> import urllib2

>>>

Any help would be greatly appreciated.

Thanks,
Paul


More information about the hg-tools-dev mailing list