--- a/hg Tue May 23 01:39:47 2023 +0200
+++ b/hg Thu Apr 20 16:07:47 2023 -0400
@@ -38,21 +38,21 @@
)
)
-from hgdemandimport import tracing
+try:
+ from hgdemandimport import tracing
+except ImportError:
+ sys.stderr.write(
+ "abort: couldn't find mercurial libraries in [%s]\n"
+ % ' '.join(sys.path)
+ )
+ sys.stderr.write("(check your install and PYTHONPATH)\n")
+ sys.exit(-1)
with tracing.log('hg script'):
# enable importing on demand to reduce startup time
- try:
- import hgdemandimport
+ import hgdemandimport
- hgdemandimport.enable()
- except ImportError:
- sys.stderr.write(
- "abort: couldn't find mercurial libraries in [%s]\n"
- % ' '.join(sys.path)
- )
- sys.stderr.write("(check your install and PYTHONPATH)\n")
- sys.exit(-1)
+ hgdemandimport.enable()
from mercurial import dispatch