Mercurial > hg-stable
changeset 45425:a42999f611ff
merge with stable
author | Augie Fackler <augie@google.com> |
---|---|
date | Mon, 07 Sep 2020 15:20:31 -0400 |
parents | 2d08dcf8fd9e (current diff) d58a205d0672 (diff) |
children | 8ddbb75bad09 |
files | |
diffstat | 5 files changed, 14 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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'):
--- 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'):
--- 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'):
--- 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) == "<module 'zipfile' from '?'>", f(zipfileimp) +assert 'ftplib' not in sys.modules +zipfileimp = __import__('ftplib', globals(), locals(), ['unknownattr']) +assert f(zipfileimp) == "<module 'ftplib' from '?'>", f(zipfileimp) assert not util.safehasattr(zipfileimp, 'unknownattr')