# HG changeset patch
# User Pierre-Yves David
- Mercurial is Copyright 2005-2024 Olivia Mackall and others. + Mercurial is Copyright 2005-2025 Olivia Mackall and others.
diff -r bbbb12632607 -r b12a4b9d09ce hgext/acl.py
--- a/hgext/acl.py Mon Dec 09 06:23:34 2024 +0100
+++ b/hgext/acl.py Fri Feb 28 23:18:22 2025 +0100
@@ -59,6 +59,7 @@
Bookmark-based Access Control
-----------------------------
+
Use the ``acl.deny.bookmarks`` and ``acl.allow.bookmarks`` sections to
have bookmark-based access control. Keys in these sections can be
either:
diff -r bbbb12632607 -r b12a4b9d09ce mercurial/color.py
--- a/mercurial/color.py Mon Dec 09 06:23:34 2024 +0100
+++ b/mercurial/color.py Fri Feb 28 23:18:22 2025 +0100
@@ -386,6 +386,9 @@
]
start = b'\033[' + b';'.join(start) + b'm'
stop = b'\033[' + pycompat.bytestr(activeeffects[b'none']) + b'm'
+ if ui._readlineprompt:
+ start = b'\001' + start + b'\001'
+ stop = b'\002' + stop + b'\002'
return _mergeeffects(text, start, stop)
@@ -518,7 +521,8 @@
else:
origattr = csbi.wAttributes
ansire = re.compile(
- br'\033\[([^m]*)m([^\033]*)(.*)', re.MULTILINE | re.DOTALL
+ br'\001?\033\[([^m]*)m\002?([^\033]*)(.*)',
+ re.MULTILINE | re.DOTALL,
)
def win32print(ui, writefunc, text, **opts):
diff -r bbbb12632607 -r b12a4b9d09ce mercurial/commands.py
--- a/mercurial/commands.py Mon Dec 09 06:23:34 2024 +0100
+++ b/mercurial/commands.py Fri Feb 28 23:18:22 2025 +0100
@@ -7640,7 +7640,7 @@
)
license = _(
b"(see https://mercurial-scm.org for more information)\n"
- b"\nCopyright (C) 2005-2024 Olivia Mackall and others\n"
+ b"\nCopyright (C) 2005-2025 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"
diff -r bbbb12632607 -r b12a4b9d09ce mercurial/helptext/hg.1.txt
--- a/mercurial/helptext/hg.1.txt Mon Dec 09 06:23:34 2024 +0100
+++ b/mercurial/helptext/hg.1.txt Fri Feb 28 23:18:22 2025 +0100
@@ -112,7 +112,7 @@
Copying
"""""""
-Copyright (C) 2005-2024 Olivia Mackall.
+Copyright (C) 2005-2025 Olivia Mackall.
Free use of this software is granted under the terms of the GNU General
Public License version 2 or any later version.
diff -r bbbb12632607 -r b12a4b9d09ce mercurial/helptext/hgignore.5.txt
--- a/mercurial/helptext/hgignore.5.txt Mon Dec 09 06:23:34 2024 +0100
+++ b/mercurial/helptext/hgignore.5.txt Fri Feb 28 23:18:22 2025 +0100
@@ -26,7 +26,7 @@
Copying
=======
This manual page is copyright 2006 Vadim Gelfer.
-Mercurial is copyright 2005-2024 Olivia Mackall.
+Mercurial is copyright 2005-2025 Olivia Mackall.
Free use of this software is granted under the terms of the GNU General
Public License version 2 or any later version.
diff -r bbbb12632607 -r b12a4b9d09ce mercurial/helptext/hgrc.5.txt
--- a/mercurial/helptext/hgrc.5.txt Mon Dec 09 06:23:34 2024 +0100
+++ b/mercurial/helptext/hgrc.5.txt Fri Feb 28 23:18:22 2025 +0100
@@ -34,7 +34,7 @@
Copying
=======
This manual page is copyright 2005 Bryan O'Sullivan.
-Mercurial is copyright 2005-2024 Olivia Mackall.
+Mercurial is copyright 2005-2025 Olivia Mackall.
Free use of this software is granted under the terms of the GNU General
Public License version 2 or any later version.
diff -r bbbb12632607 -r b12a4b9d09ce mercurial/helptext/rust.txt
--- a/mercurial/helptext/rust.txt Mon Dec 09 06:23:34 2024 +0100
+++ b/mercurial/helptext/rust.txt Fri Feb 28 23:18:22 2025 +0100
@@ -67,21 +67,16 @@
Using pip
---------
-Users of `pip` can install the Rust extensions with the following command::
-
- $ pip install mercurial \
- --global-option \
- --rust \
- --no-use-pep517 \
- --no-binary mercurial
+Users of `pip` can install the Rust extensions with the following commands::
-`--no-use-pep517` is here to tell `pip` to preserve backwards compatibility with
-the legacy `setup.py` system. Mercurial has not yet migrated its complex setup
-to the new system, so we still need this to add compiled extensions.
+ $ pip cache remove mercurial
+ $ pip install mercurial -v \
+ --config-settings --global-option=--rust \
+ --no-binary mercurial --force
-`--no-binary` is there to tell pip to not use the pre-compiled wheels that are
-missing rust support. This might take a couple of minutes because you're
-compiling everything.
+`pip cache remove` and `--no-binary` are there to tell pip to not use the
+pre-compiled wheels that are missing rust support. This might take a couple
+of minutes because you're compiling everything.
See the "Checking for Rust" section to see if the install succeeded.
diff -r bbbb12632607 -r b12a4b9d09ce mercurial/scmutil.py
--- a/mercurial/scmutil.py Mon Dec 09 06:23:34 2024 +0100
+++ b/mercurial/scmutil.py Fri Feb 28 23:18:22 2025 +0100
@@ -2498,10 +2498,8 @@
RESOURCE_HIGH: int = 3
RESOURCE_MEDIUM: int = 2
RESOURCE_LOW: int = 1
-RESOURCE_DEFAULT: int = 0
RESOURCE_MAPPING: Dict[bytes, int] = {
- b'default': RESOURCE_DEFAULT,
b'low': RESOURCE_LOW,
b'medium': RESOURCE_MEDIUM,
b'high': RESOURCE_HIGH,
@@ -2516,13 +2514,16 @@
"""return the resource profile for a dimension
If no dimension is specified, the generic value is returned"""
- generic_name = ui.config(b'usage', b'resources')
- value = RESOURCE_MAPPING.get(generic_name, RESOURCE_DEFAULT)
- if value == RESOURCE_DEFAULT:
- value = DEFAULT_RESOURCE
+
+ def config(section, name):
+ value_name = ui.config(section, name, default=b'default')
+ return RESOURCE_MAPPING.get(value_name)
+
if dimension is not None:
- sub_name = ui.config(b'usage', b'resources.%s' % dimension)
- sub_value = RESOURCE_MAPPING.get(sub_name, RESOURCE_DEFAULT)
- if sub_value != RESOURCE_DEFAULT:
- value = sub_value
- return value
+ value = config(b'usage', b'resources.%s' % dimension)
+ if value is not None:
+ return value
+ value = config(b'usage', b'resources')
+ if value is not None:
+ return value
+ return DEFAULT_RESOURCE
diff -r bbbb12632607 -r b12a4b9d09ce mercurial/ui.py
--- a/mercurial/ui.py Mon Dec 09 06:23:34 2024 +0100
+++ b/mercurial/ui.py Fri Feb 28 23:18:22 2025 +0100
@@ -262,6 +262,8 @@
self.logblockedtimes = False
# color mode: see mercurial/color.py for possible value
self._colormode = None
+ # readline prompt: is this currently for a readline prompt?
+ self._readlineprompt = False
self._terminfoparams = {}
self._styles = {}
self._uninterruptible = False
@@ -1741,7 +1743,12 @@
self.flush()
prompt = b' '
else:
- prompt = self.label(prompt, b'ui.prompt') + b' '
+ wasreadlineprompt = self._readlineprompt
+ try:
+ self._readlineprompt = True
+ prompt = self.label(prompt, b'ui.prompt') + b' '
+ finally:
+ self._readlineprompt = wasreadlineprompt
# prompt ' ' must exist; otherwise readline may delete entire line
# - http://bugs.python.org/issue12833
diff -r bbbb12632607 -r b12a4b9d09ce relnotes/6.9
--- a/relnotes/6.9 Mon Dec 09 06:23:34 2024 +0100
+++ b/relnotes/6.9 Fri Feb 28 23:18:22 2025 +0100
@@ -1,3 +1,21 @@
+= Mercurial 6.9.1 =
+
+ * ci: disable caching of the wheels that get built to save space
+ * tests: use `--no-cache-dir` with `pip`
+ * run-tests: disable caching of the wheels when installing test Mercurial
+ * manifest: delay import of `typing.ByteString` for py 3.14 support (issue6940)
+ * contrib: propagate `pytype` failures outside of `check-pytype.sh`
+ * acl: fix confusing formatting in help text (issue6942)
+ * ui: fix escape sequences in in readline prompts (issue6930)
+ * ci: let branch job run for scheduled build too
+ * ci: automatically starts platform and py-version test for scheduled build
+ * help: fix command build with rust
+ * copyright: update to 2025
+ * ci: also let the nightly build run on tags
+ * usage: refactor usage.resources config parsing
+ * hg-core: fix usage.resources typo
+ * hg-core: fix usage.resources default logic
+
= Mercurial 6.9 =
== Backwards Compatibility Changes ==
diff -r bbbb12632607 -r b12a4b9d09ce rust/hg-core/src/config/mod.rs
--- a/rust/hg-core/src/config/mod.rs Mon Dec 09 06:23:34 2024 +0100
+++ b/rust/hg-core/src/config/mod.rs Fri Feb 28 23:18:22 2025 +0100
@@ -816,19 +816,16 @@
&self,
dimension: Option<&str>,
) -> ResourceProfile {
- let mut value = self.resource_profile_from_item(b"usage", b"resource");
- if let Some(dimension) = &dimension {
- let sub_value = self.resource_profile_from_item(
+ let value = self.resource_profile_from_item(b"usage", b"resources");
+ let sub_value = dimension.and_then(|dimension| {
+ self.resource_profile_from_item(
b"usage",
format!("resources.{}", dimension).as_bytes(),
- );
- if sub_value != ResourceProfileValue::Default {
- value = sub_value
- }
- }
+ )
+ });
ResourceProfile {
dimension: dimension.map(ToOwned::to_owned),
- value,
+ value: sub_value.or(value).unwrap_or_default(),
}
}
@@ -836,13 +833,12 @@
&self,
section: &[u8],
item: &[u8],
- ) -> ResourceProfileValue {
- match self.get(section, item).unwrap_or(b"default") {
- b"default" => ResourceProfileValue::Default,
- b"low" => ResourceProfileValue::Low,
- b"medium" => ResourceProfileValue::Medium,
- b"high" => ResourceProfileValue::High,
- _ => ResourceProfileValue::Default,
+ ) -> Option