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hhcmVAcmFwaGFlbGdvbWVzLmRldgAKCRChHgHNDgXZVn8nDACU04KbPloLl+if6DQYreESnF9LU8C+qnLC/j5RRuaFNh/ec6C3DzLWqWdmnWA/siV3nUR1bXHfTui95azxJfYvWoXH2R2yam+YhE256B4rDDYWS1LI9kNNM+A33xcPS2HxVowkByhjB5FPKR6I90dX42BYJpTS5s/VPx63wXLznjFWuD7XJ3P0VI7D72j/+6EQCmHaAUEE5bO00Ob2JxmzJlaP+02fYc814PAONE2/ocfR0aExAVS3VA+SJGXnXTVpoaHr7NJKC2sBLFsdnhIRwtCf3rtGEvIJ5v2U2xx0ZEz/mimtGzW5ovkthobV4mojk0DRz7xBtA96pOGSRTD8QndIsdMCUipo8zZ/AGAMByCtsQOX7OYhR6gp+I6+iPh8fTR5oCbkO7cizDDQtXcrR5OT/BDH9xkAF1ghNL8o23a09/wfZ9NPg5zrh/4T/dFfoe2COlkAJJ1ttDPYyQkCfMsoWm3OXk6xJ3ExVbwkZzUDQSzsxGS+oxbFDWJZ64Q=
--- a/.hgtags Tue Jan 03 11:53:35 2023 -0500
+++ b/.hgtags Wed Jan 04 16:02:22 2023 +0100
@@ -253,3 +253,4 @@
04f1dba53c961dfdb875c8469adc96fa999cfbed 6.3.0
0000000000000000000000000000000000000000 6.3.0
c890d8b8bc59b18e5febf60caada629df5356ee2 6.3.1
+59466b13a3ae0e29a5d4f485393e516cfbb057d0 6.3.2
--- a/Makefile Tue Jan 03 11:53:35 2023 -0500
+++ b/Makefile Wed Jan 04 16:02:22 2023 +0100
@@ -260,10 +260,9 @@
$(PYOXIDIZER) build --path ./rust/hgcli --release
-PYOX_DIR=build/pyoxidizer/x86_64-pc-windows-msvc/release/app
-
# a temporary target to setup all we need for run-tests.py --pyoxidizer
# (should go away as the run-tests implementation improves
+pyoxidizer-windows-tests: PYOX_DIR=build/pyoxidizer/x86_64-pc-windows-msvc/release/app
pyoxidizer-windows-tests: pyoxidizer
rm -rf $(PYOX_DIR)/templates
cp -ar $(PYOX_DIR)/lib/mercurial/templates $(PYOX_DIR)/templates
@@ -277,9 +276,25 @@
cp -ar doc $(PYOX_DIR)/doc
+# a temporary target to setup all we need for run-tests.py --pyoxidizer
+# (should go away as the run-tests implementation improves
+pyoxidizer-macos-tests: PYOX_DIR=build/pyoxidizer/x86_64-apple-darwin/release/app
+pyoxidizer-macos-tests: pyoxidizer
+ rm -rf $(PYOX_DIR)/templates
+ cp -a mercurial/templates $(PYOX_DIR)/templates
+ rm -rf $(PYOX_DIR)/helptext
+ cp -a mercurial/helptext $(PYOX_DIR)/helptext
+ rm -rf $(PYOX_DIR)/defaultrc
+ cp -a mercurial/defaultrc $(PYOX_DIR)/defaultrc
+ rm -rf $(PYOX_DIR)/contrib
+ cp -a contrib $(PYOX_DIR)/contrib
+ rm -rf $(PYOX_DIR)/doc
+ cp -a doc $(PYOX_DIR)/doc
+
+
.PHONY: help all local build doc cleanbutpackages clean install install-bin \
install-doc install-home install-home-bin install-home-doc \
dist dist-notests check tests rust-tests check-code format-c \
- update-pot pyoxidizer pyoxidizer-windows-tests \
+ update-pot pyoxidizer pyoxidizer-windows-tests pyoxidizer-macos-tests \
$(packaging_targets) \
osx
--- a/contrib/packaging/debian/copyright Tue Jan 03 11:53:35 2023 -0500
+++ b/contrib/packaging/debian/copyright Wed Jan 04 16:02:22 2023 +0100
@@ -3,7 +3,7 @@
Source: https://www.mercurial-scm.org/
Files: *
-Copyright: 2005-2022, Olivia Mackall <olivia@selenic.com> and others.
+Copyright: 2005-2023, Olivia Mackall <olivia@selenic.com> and others.
License: GPL-2+
This program is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public
--- a/contrib/packaging/inno/mercurial.iss Tue Jan 03 11:53:35 2023 -0500
+++ b/contrib/packaging/inno/mercurial.iss Wed Jan 04 16:02:22 2023 +0100
@@ -6,7 +6,7 @@
#endif
[Setup]
-AppCopyright=Copyright 2005-2022 Olivia Mackall and others
+AppCopyright=Copyright 2005-2023 Olivia Mackall and others
AppName=Mercurial
AppVersion={#VERSION}
OutputBaseFilename=Mercurial-{#VERSION}{#SUFFIX}
@@ -29,7 +29,7 @@
DefaultDirName={pf}\Mercurial
SourceDir=stage
VersionInfoDescription=Mercurial distributed SCM (version {#VERSION})
-VersionInfoCopyright=Copyright 2005-2022 Olivia Mackall and others
+VersionInfoCopyright=Copyright 2005-2023 Olivia Mackall and others
VersionInfoCompany=Olivia Mackall and others
VersionInfoVersion={#QUAD_VERSION}
InternalCompressLevel=max
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/packaging/requirements-macos.txt Wed Jan 04 16:02:22 2023 +0100
@@ -0,0 +1,38 @@
+#
+# This file is autogenerated by pip-compile with python 3.9
+# To update, run:
+#
+# pip-compile --generate-hashes --no-reuse-hashes --output-file=contrib/packaging/requirements-macos.txt contrib/packaging/requirements-macos.txt.in
+#
+docutils==0.19 \
+ --hash=sha256:33995a6753c30b7f577febfc2c50411fec6aac7f7ffeb7c4cfe5991072dcf9e6 \
+ --hash=sha256:5e1de4d849fee02c63b040a4a3fd567f4ab104defd8a5511fbbc24a8a017efbc
+ # via -r contrib/packaging/requirements-macos.txt.in
+fuzzywuzzy==0.18.0 \
+ --hash=sha256:45016e92264780e58972dca1b3d939ac864b78437422beecebb3095f8efd00e8 \
+ --hash=sha256:928244b28db720d1e0ee7587acf660ea49d7e4c632569cad4f1cd7e68a5f0993
+ # via -r contrib/packaging/requirements-macos.txt.in
+importlib-metadata==5.1.0 \
+ --hash=sha256:d5059f9f1e8e41f80e9c56c2ee58811450c31984dfa625329ffd7c0dad88a73b \
+ --hash=sha256:d84d17e21670ec07990e1044a99efe8d615d860fd176fc29ef5c306068fda313
+ # via keyring
+jaraco-classes==3.2.3 \
+ --hash=sha256:2353de3288bc6b82120752201c6b1c1a14b058267fa424ed5ce5984e3b922158 \
+ --hash=sha256:89559fa5c1d3c34eff6f631ad80bb21f378dbcbb35dd161fd2c6b93f5be2f98a
+ # via keyring
+keyring==23.11.0 \
+ --hash=sha256:3dd30011d555f1345dec2c262f0153f2f0ca6bca041fb1dc4588349bb4c0ac1e \
+ --hash=sha256:ad192263e2cdd5f12875dedc2da13534359a7e760e77f8d04b50968a821c2361
+ # via -r contrib/packaging/requirements-macos.txt.in
+more-itertools==9.0.0 \
+ --hash=sha256:250e83d7e81d0c87ca6bd942e6aeab8cc9daa6096d12c5308f3f92fa5e5c1f41 \
+ --hash=sha256:5a6257e40878ef0520b1803990e3e22303a41b5714006c32a3fd8304b26ea1ab
+ # via jaraco-classes
+pygments==2.13.0 \
+ --hash=sha256:56a8508ae95f98e2b9bdf93a6be5ae3f7d8af858b43e02c5a2ff083726be40c1 \
+ --hash=sha256:f643f331ab57ba3c9d89212ee4a2dabc6e94f117cf4eefde99a0574720d14c42
+ # via -r contrib/packaging/requirements-macos.txt.in
+zipp==3.11.0 \
+ --hash=sha256:83a28fcb75844b5c0cdaf5aa4003c2d728c77e05f5aeabe8e95e56727005fbaa \
+ --hash=sha256:a7a22e05929290a67401440b39690ae6563279bced5f314609d9d03798f56766
+ # via importlib-metadata
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/packaging/requirements-macos.txt.in Wed Jan 04 16:02:22 2023 +0100
@@ -0,0 +1,22 @@
+# Declare macOS-specific requirements for generating
+# the compiled (frozen) set of requirements in
+# ./requirements-macos.txt.
+# If run on Windows, it may be necessary to run dos2unix
+# on the output file to replace any CRLF newlines with LF.
+
+# TODO: dulwich, pygit2, and pytest-vcr are flagged as being
+# incompatible with in-memory resources. Maybe there's a
+# way to bundle just them externally.
+
+docutils
+#dulwich
+
+# Needed by the release note tooling
+fuzzywuzzy
+
+keyring
+#pygit2
+pygments
+
+# Needed by the phabricator tests
+#pytest-vcr
--- a/contrib/win32/ReadMe.html Tue Jan 03 11:53:35 2023 -0500
+++ b/contrib/win32/ReadMe.html Wed Jan 04 16:02:22 2023 +0100
@@ -140,7 +140,7 @@
</p>
<p>
- Mercurial is Copyright 2005-2022 Olivia Mackall and others.
+ Mercurial is Copyright 2005-2023 Olivia Mackall and others.
</p>
<p>
--- a/hgdemandimport/demandimportpy3.py Tue Jan 03 11:53:35 2023 -0500
+++ b/hgdemandimport/demandimportpy3.py Wed Jan 04 16:02:22 2023 +0100
@@ -87,7 +87,7 @@
return getattr(object.__getattribute__(self, "_finder"), name)
def __delattr__(self, name):
- return delattr(object.__getattribute__(self, "_finder"))
+ return delattr(object.__getattribute__(self, "_finder"), name)
def __setattr__(self, name, value):
return setattr(object.__getattribute__(self, "_finder"), name, value)
--- a/mercurial/commands.py Tue Jan 03 11:53:35 2023 -0500
+++ b/mercurial/commands.py Wed Jan 04 16:02:22 2023 +0100
@@ -7943,7 +7943,7 @@
)
license = _(
b"(see https://mercurial-scm.org for more information)\n"
- b"\nCopyright (C) 2005-2022 Olivia Mackall and others\n"
+ b"\nCopyright (C) 2005-2023 Olivia Mackall and others\n"
b"This is free software; see the source for copying conditions. "
b"There is NO\nwarranty; "
b"not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
--- a/mercurial/extensions.py Tue Jan 03 11:53:35 2023 -0500
+++ b/mercurial/extensions.py Wed Jan 04 16:02:22 2023 +0100
@@ -729,6 +729,8 @@
'''find paths of disabled extensions. returns a dict of {name: path}'''
import hgext
+ exts = {}
+
# The hgext might not have a __file__ attribute (e.g. in PyOxidizer) and
# it might not be on a filesystem even if it does.
if util.safehasattr(hgext, '__file__'):
@@ -738,23 +740,21 @@
try:
files = os.listdir(extpath)
except OSError:
- return {}
- else:
- return {}
+ pass
+ else:
+ for e in files:
+ if e.endswith(b'.py'):
+ name = e.rsplit(b'.', 1)[0]
+ path = os.path.join(extpath, e)
+ else:
+ name = e
+ path = os.path.join(extpath, e, b'__init__.py')
+ if not os.path.exists(path):
+ continue
+ if name in exts or name in _order or name == b'__init__':
+ continue
+ exts[name] = path
- exts = {}
- for e in files:
- if e.endswith(b'.py'):
- name = e.rsplit(b'.', 1)[0]
- path = os.path.join(extpath, e)
- else:
- name = e
- path = os.path.join(extpath, e, b'__init__.py')
- if not os.path.exists(path):
- continue
- if name in exts or name in _order or name == b'__init__':
- continue
- exts[name] = path
for name, path in _disabledextensions.items():
# If no path was provided for a disabled extension (e.g. "color=!"),
# don't replace the path we already found by the scan above.
@@ -841,6 +841,22 @@
paths = _disabledpaths()
if name in paths:
return _disabledhelp(paths[name])
+ else:
+ try:
+ import hgext
+ from hgext import __index__ # pytype: disable=import-error
+
+ # The extensions are filesystem based, so either an error occurred
+ # or all are enabled.
+ if util.safehasattr(hgext, '__file__'):
+ return
+
+ if name in _order: # enabled
+ return
+ else:
+ return gettext(__index__.docs.get(name))
+ except (ImportError, AttributeError):
+ pass
def _walkcommand(node):
--- a/mercurial/filemerge.py Tue Jan 03 11:53:35 2023 -0500
+++ b/mercurial/filemerge.py Wed Jan 04 16:02:22 2023 +0100
@@ -1132,7 +1132,9 @@
patterns = ui.configlist(section, b'%s.patterns' % name, [])
is_match = True
if patterns:
- m = match.match(repo.root, b'', patterns)
+ m = match.match(
+ repo.root, b'', patterns, ctx=local.fctx.changectx()
+ )
is_match = m(local.fctx.path())
if is_match:
if ui.configbool(section, b'%s.disable' % name):
--- a/mercurial/helptext/hg.1.txt Tue Jan 03 11:53:35 2023 -0500
+++ b/mercurial/helptext/hg.1.txt Wed Jan 04 16:02:22 2023 +0100
@@ -112,7 +112,7 @@
Copying
"""""""
-Copyright (C) 2005-2022 Olivia Mackall.
+Copyright (C) 2005-2023 Olivia Mackall.
Free use of this software is granted under the terms of the GNU General
Public License version 2 or any later version.
--- a/mercurial/helptext/hgignore.5.txt Tue Jan 03 11:53:35 2023 -0500
+++ b/mercurial/helptext/hgignore.5.txt Wed Jan 04 16:02:22 2023 +0100
@@ -26,7 +26,7 @@
Copying
=======
This manual page is copyright 2006 Vadim Gelfer.
-Mercurial is copyright 2005-2022 Olivia Mackall.
+Mercurial is copyright 2005-2023 Olivia Mackall.
Free use of this software is granted under the terms of the GNU General
Public License version 2 or any later version.
--- a/mercurial/helptext/hgrc.5.txt Tue Jan 03 11:53:35 2023 -0500
+++ b/mercurial/helptext/hgrc.5.txt Wed Jan 04 16:02:22 2023 +0100
@@ -34,7 +34,7 @@
Copying
=======
This manual page is copyright 2005 Bryan O'Sullivan.
-Mercurial is copyright 2005-2022 Olivia Mackall.
+Mercurial is copyright 2005-2023 Olivia Mackall.
Free use of this software is granted under the terms of the GNU General
Public License version 2 or any later version.
--- a/mercurial/hg.py Tue Jan 03 11:53:35 2023 -0500
+++ b/mercurial/hg.py Wed Jan 04 16:02:22 2023 +0100
@@ -789,7 +789,7 @@
# data.
createopts[b'lfs'] = True
- if extensions.disabled_help(b'lfs'):
+ if b'lfs' in extensions.disabled():
ui.status(
_(
b'(remote is using large file support (lfs), but it is '
--- a/mercurial/state.py Tue Jan 03 11:53:35 2023 -0500
+++ b/mercurial/state.py Wed Jan 04 16:02:22 2023 +0100
@@ -366,6 +366,7 @@
fname=b'bisect.state',
allowcommit=True,
reportonly=True,
+ cmdhint=_(b"use 'hg bisect --reset'"),
statushint=_(
b'To mark the changeset good: hg bisect --good\n'
b'To mark the changeset bad: hg bisect --bad\n'
--- a/mercurial/utils/urlutil.py Tue Jan 03 11:53:35 2023 -0500
+++ b/mercurial/utils/urlutil.py Wed Jan 04 16:02:22 2023 +0100
@@ -1,6 +1,6 @@
# utils.urlutil - code related to [paths] management
#
-# Copyright 2005-2022 Olivia Mackall <olivia@selenic.com> and others
+# Copyright 2005-2023 Olivia Mackall <olivia@selenic.com> and others
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
--- a/relnotes/6.3 Tue Jan 03 11:53:35 2023 -0500
+++ b/relnotes/6.3 Wed Jan 04 16:02:22 2023 +0100
@@ -1,3 +1,23 @@
+= Mercurial 6.3.2 =
+
+ * [ecfc84b956a8] tests: expect the message from 1baf0fffd82f in test-hghave.t (issue6762)
+ * [5c095119bff4] tests: add the missing space to test-hghave.t (issue6762)
+ * [2c346c1c75ec] tests: use an all too familiar executable in test-run-tests.t (issue6661)
+ * [13c0e3b4fd35] tests: use `test -f` instead of `ls` to see if a file is present (issue6662)
+ * [8ced4ca30ea1] bisect: correct message about aborting an in-progress bisect (issue6527)
+ * filemerge: fix crash when using filesets in [partial-merge-tools]
+ * help: fix a py3 error interpolating Set into b'%s'
+ * match: make the FLAG_RE pattern a raw string
+ * python-compat: adapt to Python 3.11 BC breakage with `random.sample`
+ * rust-status: fix thread count ceiling
+ * hg: show the correct message when cloning an LFS repo with extension disabled
+ * extensions: process disabled external paths when `hgext` package is in-memory
+ * emitrevision: consider ancestors revision to emit as available base
+ * make: add a target for building pyoxidizer tests on macOS
+ * run-tests: support --pyoxidized on macOS
+ * packaging: add dependencies to the PyOxidizer build on macOS
+ * Miscellaneous test fixes
+
= Mercurial 6.3.1 =
* memory-usage: fix `hg log --follow --rev R F` space complexity (dcb2581e33be)
--- a/rust/hg-core/src/dirstate_tree/status.rs Tue Jan 03 11:53:35 2023 -0500
+++ b/rust/hg-core/src/dirstate_tree/status.rs Wed Jan 04 16:02:22 2023 +0100
@@ -55,7 +55,7 @@
// instantiated in `rhg` or some other caller.
// TODO find the underlying cause and fix it, then remove this.
rayon::ThreadPoolBuilder::new()
- .num_threads(16)
+ .num_threads(16.min(rayon::current_num_threads()))
.build_global()
.ok();
--- a/rust/hgcli/pyoxidizer.bzl Tue Jan 03 11:53:35 2023 -0500
+++ b/rust/hgcli/pyoxidizer.bzl Wed Jan 04 16:02:22 2023 +0100
@@ -33,6 +33,7 @@
TIME_STAMP_SERVER_URL = VARS.get("TIME_STAMP_SERVER_URL", "http://timestamp.digicert.com")
IS_WINDOWS = "windows" in BUILD_TARGET_TRIPLE
+IS_MACOS = "apple" in BUILD_TARGET_TRIPLE
# Use in-memory resources for all resources. If false, most of the Python
# stdlib will be in memory, but other things such as Mercurial itself will not
@@ -148,6 +149,10 @@
exe.add_python_resources(
exe.pip_install(["-r", ROOT + "/contrib/packaging/requirements-windows-py3.txt"]),
)
+ if IS_MACOS:
+ exe.add_python_resources(
+ exe.pip_install(["-r", ROOT + "/contrib/packaging/requirements-macos.txt"]),
+ )
extra_packages = VARS.get("extra_py_packages", "")
if extra_packages:
for extra in extra_packages.split(","):
--- a/setup.py Tue Jan 03 11:53:35 2023 -0500
+++ b/setup.py Wed Jan 04 16:02:22 2023 +0100
@@ -1658,7 +1658,7 @@
extra['console'] = [
{
'script': 'hg',
- 'copyright': 'Copyright (C) 2005-2022 Olivia Mackall and others',
+ 'copyright': 'Copyright (C) 2005-2023 Olivia Mackall and others',
'product_version': version,
}
]
--- a/tests/hghave.py Tue Jan 03 11:53:35 2023 -0500
+++ b/tests/hghave.py Wed Jan 04 16:02:22 2023 +0100
@@ -202,6 +202,22 @@
return 'PYOXIDIZED_INSTALLED_AS_HG' in os.environ
+@check(
+ "pyoxidizer-in-memory",
+ "running with pyoxidizer build as 'hg' with embedded resources",
+)
+def has_pyoxidizer():
+ return 'PYOXIDIZED_IN_MEMORY_RSRC' in os.environ
+
+
+@check(
+ "pyoxidizer-in-filesystem",
+ "running with pyoxidizer build as 'hg' with external resources",
+)
+def has_pyoxidizer():
+ return 'PYOXIDIZED_FILESYSTEM_RSRC' in os.environ
+
+
@check("cvs", "cvs client/server")
def has_cvs():
re = br'Concurrent Versions System.*?server'
@@ -612,7 +628,7 @@
@check("pylint", "Pylint python linter")
def has_pylint():
- return matchoutput("pylint --help", br"Usage:[ ]+pylint", True)
+ return matchoutput("pylint --help", br"[Uu]sage:[ ]+pylint", True)
@check("clang-format", "clang-format C code formatter (>= 11)")
@@ -877,7 +893,7 @@
# Add "py27", "py35", ... as possible feature checks. Note that there's no
# punctuation here.
-@checkvers("py", "Python >= %s", (2.7, 3.5, 3.6, 3.7, 3.8, 3.9))
+@checkvers("py", "Python >= %s", (2.7, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11))
def has_python_range(v):
major, minor = v.split('.')[0:2]
py_major, py_minor = sys.version_info.major, sys.version_info.minor
@@ -895,7 +911,7 @@
py = 'python3'
if os.name == 'nt':
py = 'py -3'
- return matchoutput('%s -V' % py, br'^Python 3.(5|6|7|8|9)')
+ return matchoutput('%s -V' % py, br'^Python 3.(5|6|7|8|9|10|11)')
@check("pure", "running with pure Python code")
--- a/tests/run-tests.py Tue Jan 03 11:53:35 2023 -0500
+++ b/tests/run-tests.py Wed Jan 04 16:02:22 2023 +0100
@@ -86,6 +86,7 @@
)
sys.exit(70) # EX_SOFTWARE from `man 3 sysexit`
+MACOS = sys.platform == 'darwin'
WINDOWS = os.name == r'nt'
shellquote = shlex.quote
@@ -745,8 +746,8 @@
parser.error('chg does not work on %s' % os.name)
if (options.rhg or options.with_rhg) and WINDOWS:
parser.error('rhg does not work on %s' % os.name)
- if options.pyoxidized and not WINDOWS:
- parser.error('--pyoxidized is currently Windows only')
+ if options.pyoxidized and not (MACOS or WINDOWS):
+ parser.error('--pyoxidized is currently macOS and Windows only')
if options.with_chg:
options.chg = False # no installation to temporary location
options.with_chg = canonpath(_sys2bytes(options.with_chg))
@@ -3205,9 +3206,18 @@
testdir = os.path.dirname(_sys2bytes(canonpath(sys.argv[0])))
reporootdir = os.path.dirname(testdir)
# XXX we should ideally install stuff instead of using the local build
- bin_path = (
- b'build/pyoxidizer/x86_64-pc-windows-msvc/release/app/hg.exe'
- )
+
+ exe = b'hg'
+ triple = b''
+
+ if WINDOWS:
+ triple = b'x86_64-pc-windows-msvc'
+ exe = b'hg.exe'
+ elif MACOS:
+ # TODO: support Apple silicon too
+ triple = b'x86_64-apple-darwin'
+
+ bin_path = b'build/pyoxidizer/%s/release/app/%s' % (triple, exe)
full_path = os.path.join(reporootdir, bin_path)
self._hgcommand = full_path
# Affects hghave.py
@@ -3441,6 +3451,9 @@
verbosity = 2
runner = TextTestRunner(self, verbosity=verbosity)
+ osenvironb.pop(b'PYOXIDIZED_IN_MEMORY_RSRC', None)
+ osenvironb.pop(b'PYOXIDIZED_FILESYSTEM_RSRC', None)
+
if self.options.list_tests:
result = runner.listtests(suite)
else:
@@ -3851,8 +3864,15 @@
vlog('# build a pyoxidized version of Mercurial')
assert os.path.dirname(self._bindir) == self._installdir
assert self._hgroot, 'must be called after _installhg()'
- cmd = b'"%(make)s" pyoxidizer-windows-tests' % {
+ target = b''
+ if WINDOWS:
+ target = b'windows'
+ elif MACOS:
+ target = b'macos'
+
+ cmd = b'"%(make)s" pyoxidizer-%(platform)s-tests' % {
b'make': b'make',
+ b'platform': target,
}
cwd = self._hgroot
vlog("# Running", cmd)
@@ -3869,6 +3889,20 @@
sys.stdout.buffer.write(out)
sys.exit(1)
+ cmd = _bytes2sys(b"%s debuginstall -Tjson" % self._hgcommand)
+ p = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True)
+ out, err = p.communicate()
+
+ props = json.loads(out)[0]
+
+ # Affects hghave.py
+ osenvironb.pop(b'PYOXIDIZED_IN_MEMORY_RSRC', None)
+ osenvironb.pop(b'PYOXIDIZED_FILESYSTEM_RSRC', None)
+ if props["hgmodules"] == props["pythonexe"]:
+ osenvironb[b'PYOXIDIZED_IN_MEMORY_RSRC'] = b'1'
+ else:
+ osenvironb[b'PYOXIDIZED_FILESYSTEM_RSRC'] = b'1'
+
def _outputcoverage(self):
"""Produce code coverage output."""
import coverage
--- a/tests/test-bisect2.t Tue Jan 03 11:53:35 2023 -0500
+++ b/tests/test-bisect2.t Wed Jan 04 16:02:22 2023 +0100
@@ -794,3 +794,14 @@
17:228c06deef46
18:d42e18c7bc9b
$ hg log -q -r 'bisect(untested)'
+
+in-progress bisect interacts with hg merge (issue6527)
+
+ $ hg up -r 17 -q
+ $ hg merge 7
+ 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+ (branch merge, don't forget to commit)
+ $ hg merge --abort
+ abort: cannot abort merge with bisect in progress
+ (use 'hg bisect --reset')
+ [20]
--- a/tests/test-check-pylint.t Tue Jan 03 11:53:35 2023 -0500
+++ b/tests/test-check-pylint.t Wed Jan 04 16:02:22 2023 +0100
@@ -8,6 +8,7 @@
Current checks:
- W0102: no mutable default argument
+- C0321: only one statement on a single line
$ touch $TESTTMP/fakerc
$ pylint --rcfile=$TESTTMP/fakerc --disable=all \
--- a/tests/test-chg.t Tue Jan 03 11:53:35 2023 -0500
+++ b/tests/test-chg.t Wed Jan 04 16:02:22 2023 +0100
@@ -1,5 +1,11 @@
#require chg
+Scale the timeout for the chg-server to the test timeout scaling.
+This is done to reduce the flakiness of this test on heavy load.
+
+ $ CHGTIMEOUT=`expr $HGTEST_TIMEOUT / 6`
+ $ export CHGTIMEOUT
+
$ mkdir log
$ cp $HGRCPATH $HGRCPATH.unconfigured
$ cat <<'EOF' >> $HGRCPATH
--- a/tests/test-debugextensions.t Tue Jan 03 11:53:35 2023 -0500
+++ b/tests/test-debugextensions.t Wed Jan 04 16:02:22 2023 +0100
@@ -43,16 +43,20 @@
tested with: 3.0 3.1 3.2.1
bug reporting: https://example.org/bts
histedit
- location: */hgext/histedit.py* (glob)
+ location: */hgext/histedit.py* (glob) (no-pyoxidizer-in-memory !)
+ location: */release/app/hg* (glob) (pyoxidizer-in-memory !)
bundled: yes
mq
- location: */hgext/mq.py* (glob)
+ location: */hgext/mq.py* (glob) (no-pyoxidizer-in-memory !)
+ location: */release/app/hg* (glob) (pyoxidizer-in-memory !)
bundled: yes
patchbomb
- location: */hgext/patchbomb.py* (glob)
+ location: */hgext/patchbomb.py* (glob) (no-pyoxidizer-in-memory !)
+ location: */release/app/hg* (glob) (pyoxidizer-in-memory !)
bundled: yes
rebase
- location: */hgext/rebase.py* (glob)
+ location: */hgext/rebase.py* (glob) (no-pyoxidizer-in-memory !)
+ location: */release/app/hg* (glob) (pyoxidizer-in-memory !)
bundled: yes
$ hg debugextensions -Tjson | sed 's|\\\\|/|g'
@@ -75,28 +79,32 @@
"buglink": "",
"bundled": true,
"name": "histedit",
- "source": "*/hgext/histedit.py*", (glob)
+ "source": "*/hgext/histedit.py*", (glob) (no-pyoxidizer-in-memory !)
+ "source": */release/app/hg* (glob) (pyoxidizer-in-memory !)
"testedwith": []
},
{
"buglink": "",
"bundled": true,
"name": "mq",
- "source": "*/hgext/mq.py*", (glob)
+ "source": "*/hgext/mq.py*", (glob) (no-pyoxidizer-in-memory !)
+ "source": */release/app/hg* (glob) (pyoxidizer-in-memory !)
"testedwith": []
},
{
"buglink": "",
"bundled": true,
"name": "patchbomb",
- "source": "*/hgext/patchbomb.py*", (glob)
+ "source": "*/hgext/patchbomb.py*", (glob) (no-pyoxidizer-in-memory !)
+ "source": */release/app/hg* (glob) (pyoxidizer-in-memory !)
"testedwith": []
},
{
"buglink": "",
"bundled": true,
"name": "rebase",
- "source": "*/hgext/rebase.py*", (glob)
+ "source": "*/hgext/rebase.py*", (glob) (no-pyoxidizer-in-memory !)
+ "source": */release/app/hg* (glob) (pyoxidizer-in-memory !)
"testedwith": []
}
]
--- a/tests/test-hghave.t Tue Jan 03 11:53:35 2023 -0500
+++ b/tests/test-hghave.t Wed Jan 04 16:02:22 2023 +0100
@@ -25,6 +25,7 @@
> "$PYTHON" $TESTDIR/run-tests.py --with-hg=$HGTEST_REAL_HG -j 1 \
> $HGTEST_RUN_TESTS_PURE test-hghaveaddon.t \
> )
+ installed Mercurial in * seconds (glob) (?)
running 1 tests using 1 parallel processes
.
# Ran 1 tests, 0 skipped, 0 failed.
--- a/tests/test-hgrc.t Tue Jan 03 11:53:35 2023 -0500
+++ b/tests/test-hgrc.t Wed Jan 04 16:02:22 2023 +0100
@@ -308,7 +308,7 @@
we accept the bad output for now as this is the last thing in the way of
testing the pyoxidizer build.
-#if no-pyoxidizer
+#if no-pyoxidizer-in-filesystem
$ HGRCSKIPREPO=1 hg paths --config extensions.zeroconf=
foo = $TESTTMP/bar
#else
--- a/tests/test-install.t Tue Jan 03 11:53:35 2023 -0500
+++ b/tests/test-install.t Wed Jan 04 16:02:22 2023 +0100
@@ -13,7 +13,8 @@
checking Mercurial version (*) (glob)
checking Mercurial custom build (*) (glob)
checking module policy (*) (glob)
- checking installed modules (*mercurial)... (glob)
+ checking installed modules (*mercurial)... (glob) (no-pyoxidizer-in-memory !)
+ checking installed modules (*/release/app/hg*)... (glob) (pyoxidizer-in-memory !)
checking registered compression engines (*zlib*) (glob)
checking available compression engines (*zlib*) (glob)
checking available compression engines for wire protocol (*zlib*) (glob)
@@ -43,7 +44,8 @@
"encodingerror": null,
"extensionserror": null, (no-pure !)
"hgmodulepolicy": "*", (glob)
- "hgmodules": "*mercurial", (glob)
+ "hgmodules": "*mercurial", (glob) (no-pyoxidizer-in-memory !)
+ "hgmodules": "*/release/app/hg*", (glob) (pyoxidizer-in-memory !)
"hgver": "*", (glob)
"hgverextra": "*", (glob)
"problems": 0,
@@ -76,7 +78,8 @@
checking Mercurial version (*) (glob)
checking Mercurial custom build (*) (glob)
checking module policy (*) (glob)
- checking installed modules (*mercurial)... (glob)
+ checking installed modules (*mercurial)... (glob) (no-pyoxidizer-in-memory !)
+ checking installed modules (*/release/app/hg*)... (glob) (pyoxidizer-in-memory !)
checking registered compression engines (*zlib*) (glob)
checking available compression engines (*zlib*) (glob)
checking available compression engines for wire protocol (*zlib*) (glob)
@@ -125,7 +128,8 @@
checking Mercurial version (*) (glob)
checking Mercurial custom build (*) (glob)
checking module policy (*) (glob)
- checking installed modules (*mercurial)... (glob)
+ checking installed modules (*mercurial)... (glob) (no-pyoxidizer-in-memory !)
+ checking installed modules (*/release/app/hg*)... (glob) (pyoxidizer-in-memory !)
checking registered compression engines (*zlib*) (glob)
checking available compression engines (*zlib*) (glob)
checking available compression engines for wire protocol (*zlib*) (glob)
@@ -154,7 +158,8 @@
checking Mercurial version (*) (glob)
checking Mercurial custom build (*) (glob)
checking module policy (*) (glob)
- checking installed modules (*mercurial)... (glob)
+ checking installed modules (*mercurial)... (glob) (no-pyoxidizer-in-memory !)
+ checking installed modules (*/release/app/hg*)... (glob) (pyoxidizer-in-memory !)
checking registered compression engines (*zlib*) (glob)
checking available compression engines (*zlib*) (glob)
checking available compression engines for wire protocol (*zlib*) (glob)
--- a/tests/test-merge-partial-tool.t Tue Jan 03 11:53:35 2023 -0500
+++ b/tests/test-merge-partial-tool.t Wed Jan 04 16:02:22 2023 +0100
@@ -196,6 +196,30 @@
>>>>>>> merge rev: 8c217da987be - test: a b c d e f2
+Filesets can be used to select which files to run partial merge tools on.
+
+ $ hg up -C 4
+ 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+ $ hg merge 3 -t :merge3 --config partial-merge-tools.head.patterns=set:other
+ merging file
+ warning: conflicts while merging file! (edit, then use 'hg resolve --mark')
+ 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
+ use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
+ [1]
+ $ cat file
+ b
+ c
+ d
+ e
+ <<<<<<< working copy: d57edaa6e21a - test: a b c d e f3
+ f3
+ ||||||| common ancestor: 8ae8bb9cc43a - test: a b c d e f
+ f
+ =======
+ f2
+ >>>>>>> merge rev: 8c217da987be - test: a b c d e f2
+
+
If there are several matching tools, they are run in requested order. We move
`head` after `tail` in order here so it has no effect (the conflict in "f" thus
remains).
--- a/tests/test-paths.t Tue Jan 03 11:53:35 2023 -0500
+++ b/tests/test-paths.t Wed Jan 04 16:02:22 2023 +0100
@@ -144,7 +144,7 @@
we accept the bad output for now as this is the last thing in the way of
testing the pyoxidizer build.
-#if no-pyoxidizer
+#if no-pyoxidizer-in-filesystem
$ hg paths --config extensions.zeroconf=
dupe = $TESTTMP/b#tip
dupe:pushurl = https://example.com/dupe
--- a/tests/test-run-tests.t Tue Jan 03 11:53:35 2023 -0500
+++ b/tests/test-run-tests.t Wed Jan 04 16:02:22 2023 +0100
@@ -21,9 +21,9 @@
error paths
#if symlink
- $ ln -s "/"bin"/"true hg
+ $ ln -s $TESTDIR/run-tests.py hg
$ "$PYTHON" $TESTDIR/run-tests.py --with-hg=./hg
- ^warning: --with-hg should specify an hg script, not: (true|coreutils)$ (re)
+ warning: --with-hg should specify an hg script, not: run-tests.py
running 0 tests using 0 parallel processes
# Ran 0 tests, 0 skipped, 0 failed.
--- a/tests/test-status-tracked-key.t Tue Jan 03 11:53:35 2023 -0500
+++ b/tests/test-status-tracked-key.t Wed Jan 04 16:02:22 2023 +0100
@@ -165,8 +165,7 @@
Test upgrade and downgrade
==========================
- $ ls .hg/dirstate-tracked-hint
- .hg/dirstate-tracked-hint
+ $ test -f .hg/dirstate-tracked-hint
$ hg debugrequires | grep 'tracked'
dirstate-tracked-key-v1
@@ -181,9 +180,8 @@
no revlogs to process
- $ ls -1 .hg/dirstate-tracked-hint
- ls: *.hg/dirstate-tracked-hint*: $ENOENT$ (glob)
- [2]
+ $ test -f .hg/dirstate-tracked-hint
+ [1]
$ hg debugrequires | grep 'tracked'
[1]
@@ -198,8 +196,7 @@
no revlogs to process
- $ ls -1 .hg/dirstate-tracked-hint
- .hg/dirstate-tracked-hint
+ $ test -f .hg/dirstate-tracked-hint
$ hg debugrequires | grep 'tracked'
dirstate-tracked-key-v1
$ cd ..