# HG changeset patch # User Augie Fackler # Date 1599506431 14400 # Node ID a42999f611ff0abff99e778148524ab2194af6a1 # Parent 2d08dcf8fd9e9dbd8994416b5bc5979ccc0ff46a# Parent d58a205d06723b7a742ae69f297dec6c4b001de4 merge with stable diff -r 2d08dcf8fd9e -r a42999f611ff contrib/genosxversion.py --- a/contrib/genosxversion.py Wed Sep 02 19:46:55 2020 +0530 +++ b/contrib/genosxversion.py Mon Sep 07 15:20:31 2020 -0400 @@ -6,9 +6,14 @@ import subprocess import sys -# Always load hg libraries from the hg we can find on $PATH. -hglib = subprocess.check_output(['hg', 'debuginstall', '-T', '{hgmodules}']) -sys.path.insert(0, os.path.dirname(hglib)) +try: + # Always load hg libraries from the hg we can find on $PATH. + hglib = subprocess.check_output(['hg', 'debuginstall', '-T', '{hgmodules}']) + sys.path.insert(0, os.path.dirname(hglib)) +except subprocess.CalledProcessError: + # We're probably running with a PyOxidized Mercurial, so just + # proceed and hope it works out okay. + pass from mercurial import util diff -r 2d08dcf8fd9e -r a42999f611ff contrib/hgweb.fcgi --- a/contrib/hgweb.fcgi Wed Sep 02 19:46:55 2020 +0530 +++ b/contrib/hgweb.fcgi Mon Sep 07 15:20:31 2020 -0400 @@ -3,7 +3,7 @@ # An example FastCGI script for use with flup, edit as necessary # Path to repo or hgweb config to serve (see 'hg help hgweb') -config = "/path/to/repo/or/config" +config = b"/path/to/repo/or/config" # Uncomment and adjust if Mercurial is not installed system-wide # (consult "installed modules" path from 'hg debuginstall'): diff -r 2d08dcf8fd9e -r a42999f611ff contrib/hgweb.wsgi --- a/contrib/hgweb.wsgi Wed Sep 02 19:46:55 2020 +0530 +++ b/contrib/hgweb.wsgi Mon Sep 07 15:20:31 2020 -0400 @@ -2,7 +2,7 @@ # See https://mercurial-scm.org/wiki/modwsgi for more information # Path to repo or hgweb config to serve (see 'hg help hgweb') -config = "/path/to/repo/or/config" +config = b"/path/to/repo/or/config" # Uncomment and adjust if Mercurial is not installed system-wide # (consult "installed modules" path from 'hg debuginstall'): diff -r 2d08dcf8fd9e -r a42999f611ff hgweb.cgi --- a/hgweb.cgi Wed Sep 02 19:46:55 2020 +0530 +++ b/hgweb.cgi Mon Sep 07 15:20:31 2020 -0400 @@ -4,7 +4,7 @@ # See also https://mercurial-scm.org/wiki/PublishingRepositories # Path to repo or hgweb config to serve (see 'hg help hgweb') -config = "/path/to/repo/or/config" +config = b"/path/to/repo/or/config" # Uncomment and adjust if Mercurial is not installed system-wide # (consult "installed modules" path from 'hg debuginstall'): diff -r 2d08dcf8fd9e -r a42999f611ff tests/test-demandimport.py --- a/tests/test-demandimport.py Wed Sep 02 19:46:55 2020 +0530 +++ b/tests/test-demandimport.py Mon Sep 07 15:20:31 2020 -0400 @@ -232,7 +232,7 @@ # Unlike the import statement, __import__() function should not raise # ImportError even if fromlist has an unknown item # (see Python/import.c:import_module_level() and ensure_fromlist()) -assert 'zipfile' not in sys.modules -zipfileimp = __import__('zipfile', globals(), locals(), ['unknownattr']) -assert f(zipfileimp) == "", f(zipfileimp) +assert 'ftplib' not in sys.modules +zipfileimp = __import__('ftplib', globals(), locals(), ['unknownattr']) +assert f(zipfileimp) == "", f(zipfileimp) assert not util.safehasattr(zipfileimp, 'unknownattr')