| 1 |
# Mercurial 7.2 (2026-01-29) |
| 2 |
|
| 3 |
## Mercurial 7.2.4 (2026-08-11) |
| 4 |
|
| 5 |
- Fix the detection of peers with limited query size during discovery (9f732870676c) |
| 6 |
- rhg: include the path in purge's directory removal errors (94be520c5190) |
| 7 |
- verify: remove incorrect fncache branch in file index case (f43ea4a964e7) |
| 8 |
- update: fix status after a flag-only update of symlink into a file, in rust (a491512f1f79) |
| 9 |
- update: fix status after a flag-only update of a file into a symlink, in rust (5829e64543c3) |
| 10 |
- rust: respect umask for executable files during update (33bb83b15bdc) |
| 11 |
|
| 12 |
## Mercurial 7.2.3 (2026-06-29) |
| 13 |
|
| 14 |
- Fix issue where files would appear modified even if clean (71e06e01d26b + 4d6df1ba8506) |
| 15 |
- Add documentation for narrow, shapes and shards (f6b4469fe4eb) |
| 16 |
- Fix a bug in the narrow patterns generation (baa13eff9ddc) |
| 17 |
- Fix empty paths case in narrowspec generation (ac9cfd305ccd) |
| 18 |
- Fix hgweb initialization issue (9ddd9c311109) |
| 19 |
- Upgrades to the test harness's resistance to slow CI runners |
| 20 |
|
| 21 |
## Mercurial 7.2.2 (2026-05-07) |
| 22 |
|
| 23 |
- Fixed upgrade to share-safe not dropping all store requirements (22f5fb843bc2) |
| 24 |
- Fixed chg commands sharing too much config with the top process (a6cb1a89cd02) |
| 25 |
- Restore option for including obsmarkers in streaming clone bundles (362b64997b57) |
| 26 |
- Adjustments to the support for Python 3.15's alpha and the general lazy-loading modules |
| 27 |
|
| 28 |
## Mercurial 7.2.1 (2026-04-01) |
| 29 |
|
| 30 |
A normal bugfix release, fashionably late. |
| 31 |
|
| 32 |
- A bunch of fixes and improvements to the test runner and CI stability |
| 33 |
- Fixed a corruption and crash in branchmap v3 (8471e18f1619) |
| 34 |
- Backed out making parallel streaming bundle processing the default (64053b131c0b) |
| 35 |
- Fixed dirstate backup files being forgotten about (f80ad355012d) |
| 36 |
- has-meta-flag: ignore censored revision when importing older bundles (1afb8f260d18) |
| 37 |
- Fixed a crash in quickaccess logic when it races with commit (5104190c6e4d) |
| 38 |
- Improved support for Python 3.15's alpha |
| 39 |
|
| 40 |
## Mercurial 7.2 (2026-01-29) |
| 41 |
|
| 42 |
**This is the first release to support Python 3.14 and likely the last to |
| 43 |
support Python 3.9.** |
| 44 |
|
| 45 |
This release is exceptionally full of changes, and as always a lot of minor |
| 46 |
changes have been omitted from these release notes. |
| 47 |
|
| 48 |
### New Features |
| 49 |
|
| 50 |
- Support for Python 3.14 |
| 51 |
- Added a `closesbranch()` template keyword |
| 52 |
- Added support for support `--remote-hidden` in `hg incoming` |
| 53 |
- `hg clone` now supports `--no-stream` to force opt-out of a streamclone |
| 54 |
- `hg strip` will optionally accept empty revision sets without bailing out |
| 55 |
(`--permit-empty-revset`). This is unconditionally enabled for `hg debugstrip` |
| 56 |
- Support for ZSTD is improved by falling back to the system package if the |
| 57 |
vendored module is not available. This change mostly affects pure python |
| 58 |
installs and helps distributions to use their integrated version by default. |
| 59 |
The appropriate package has been added as a Python optional dependency |
| 60 |
to help people who need it. |
| 61 |
- Added a new `usage.resources.bandwidth` config to tune how aggressive |
| 62 |
Mercurial is with its bandwidth usage. |
| 63 |
|
| 64 |
### Features moved out of experimental |
| 65 |
|
| 66 |
#### `dirstate-v2` format (8c912a652c54) |
| 67 |
|
| 68 |
A better format for storing the working copy information, provides a significant |
| 69 |
performance boost to `hg status` performance (and other commands that need that |
| 70 |
information like `commit`, `purge`, etc). |
| 71 |
|
| 72 |
**The use of `dirstate-v2` can only be recommended when using the Rust |
| 73 |
extensions, as the Python version is quite slow at most operations (likely |
| 74 |
slower than dirstate-v1).** |
| 75 |
|
| 76 |
See `hg help config.format.use-dirstate-v2` for details. |
| 77 |
|
| 78 |
#### `diff.merge` configuration (a1c2e0753d1a) |
| 79 |
|
| 80 |
When set, running `hg diff` on a merge will show the difference compared to the |
| 81 |
default merge result instead of the diff against a parent. This is quite useful |
| 82 |
to spot changes introduced by a merge and how conflicts were resolved. |
| 83 |
|
| 84 |
See `hg help config.diff.merge` for details. |
| 85 |
|
| 86 |
|
| 87 |
#### `tracked-hint` format (bdd10cd37f6a) |
| 88 |
|
| 89 |
A small format variant that keeps a small file that helps external automation to |
| 90 |
detect changes to the set of tracked files. |
| 91 |
|
| 92 |
See `hg help config.revlog.reuse-external-delta-compression` for details. |
| 93 |
|
| 94 |
#### Parallel stream clone processing (c9f086eb8b3f) |
| 95 |
|
| 96 |
The parallel processing of incoming stream bundles is out of experimental. It |
| 97 |
is not enabled by default yet as some users reported it negatively impacts, |
| 98 |
more testing is needed. Try it yourself, it might speed stream clone in your |
| 99 |
cases. |
| 100 |
|
| 101 |
See `hg help config.worker.parallel-stream-bundle-processing` for details. |
| 102 |
|
| 103 |
### Performance improvements for existing features |
| 104 |
|
| 105 |
- `hg purge` (aka `hg clean`) now better leverages the Rust implementation of |
| 106 |
"status" when available. This provides performance improvement similar to the |
| 107 |
one provided by the rust status. |
| 108 |
- The computation of deltas when storing a revision (during `commit`, `clone`, |
| 109 |
`push`, `pull`, `unbundle`, ...) was significantly sped up in Mercurial 7.2. |
| 110 |
This was achieved by a mix of reducing the amount of useless work done, |
| 111 |
improving the algorithms used, and smarter cache usage. All flavors of |
| 112 |
Mercurial (using the Rust extensions or not) should see a performance |
| 113 |
improvement, but using the Rust extensions will show a more dramatic |
| 114 |
improvement (some benchmark move from almost 4 hours to 2 minutes). |
| 115 |
|
| 116 |
(Here is small set of the involved changesets: 916d5b1db75f, a2cbf3d71a94, |
| 117 |
2e8ba3356d7e, 4eb879393c45, 855cfc1c7c42, 2cbc32498a83) |
| 118 |
|
| 119 |
- The performance of caches related to tags has been improved when using the |
| 120 |
Rust extensions (f93ba6645f8e, eed40a296a18) |
| 121 |
- The performance of `commit` has been improved by removing useless computation |
| 122 |
- The performance of the Rust index (specifically the nodemap) with large |
| 123 |
revlogs has been improved |
| 124 |
- Warming a cold filenode tag cache is up to 12% faster |
| 125 |
|
| 126 |
### New Experimental Features and Formats |
| 127 |
|
| 128 |
#### Narrow-Store's Shapes |
| 129 |
|
| 130 |
We are introducing the concept of "shapes" to improve the experience using |
| 131 |
`narrow`. Since using `narrow` implies using a more centralized workflow of |
| 132 |
version control, clients being dependent on the server for all practical |
| 133 |
matters of exchanging changes, we want to make this hybrid |
| 134 |
centralized/distributed world more practical. |
| 135 |
|
| 136 |
The feature is still experimental and actively worked on, but Mercurial 7.2 |
| 137 |
ships some already usable parts: |
| 138 |
|
| 139 |
- A new server-side configuration (`.hg/store/server-shapes`) to define shapes, |
| 140 |
which are normalized and minimal descriptions of views into a slice of a |
| 141 |
repository store based on file names |
| 142 |
- A new `admin::narrow-server` command to get and list important information |
| 143 |
about these shapes |
| 144 |
- A new `admin::narrow-client` command to inspect the client state within this |
| 145 |
workflow |
| 146 |
- `hg bundle` is now able to generate streaming narrow clonebundles from shapes: |
| 147 |
- Support for *non-streaming* narrow clonebundles is not implemented yet |
| 148 |
- Each such bundle's bundlespec contains the fingerprint of the shape it was |
| 149 |
generated with |
| 150 |
- A client `hg` can generate the same fingerprint from the narrow patterns |
| 151 |
passed to `clone` (`--include`, `--exclude`) |
| 152 |
- This makes the client `hg` filter out bundles that do not have the |
| 153 |
expected fingerprint |
| 154 |
- Old clients will not receive fingerprinted bundles when listing |
| 155 |
clonebundles, so backwards compatibility is conserved |
| 156 |
- This process is quite manual still, but is expected to improve in the |
| 157 |
coming versions |
| 158 |
|
| 159 |
For more detailed information, see `hg help shapes`. |
| 160 |
|
| 161 |
#### File Index |
| 162 |
|
| 163 |
The File Index is a new repository format that supersedes the `fncache` format. |
| 164 |
It tracks all file paths ever used within a repository throughout its entire |
| 165 |
history (excluding the working copy) and is useful for many common commands. |
| 166 |
The File Index is designed for efficient querying and updating and our |
| 167 |
benchmarks show significant performance improvements compared to when using the |
| 168 |
`fncache`. This is an internal format change that doesn't affect the |
| 169 |
availability of any feature. |
| 170 |
|
| 171 |
The introduction of the File Index will also open the door for other |
| 172 |
datastructures and algorithms to make use of its internal mapping of unique |
| 173 |
file to unique token, further unlocking a ton of performance down the line. You |
| 174 |
can learn more about its design by running `hg help internals.file-index`. |
| 175 |
|
| 176 |
**While basic support for the file index is implemented in Python, its use is |
| 177 |
only recommended when using the Rust extensions for performance reasons.** |
| 178 |
|
| 179 |
#### Revlog delta info |
| 180 |
|
| 181 |
The `delta-info-revlog` format variant is a small adjustment to the `revlog-v1` |
| 182 |
format to better keep track of some information to help speed up some operations |
| 183 |
and improve the internal storage. This is an internal format change that doesn't |
| 184 |
affect the availability of any feature. |
| 185 |
|
| 186 |
The new information stored mostly focuses on: |
| 187 |
|
| 188 |
- Does a file revision contain file rename metadata? |
| 189 |
- Is a stored delta a "standard delta" or a "snapshot" (of any level)? |
| 190 |
- Is the stored delta "small" and which parent is best to find such a "small" |
| 191 |
delta? |
| 192 |
|
| 193 |
Having this information around has various benefits: |
| 194 |
|
| 195 |
- We no longer need to manually inspect rename metadata in any case, speeding up |
| 196 |
various operations. This especially helps the copy tracing used by `hg status` |
| 197 |
and `hg merge` where such checks would add up to ⅓ of the total time. |
| 198 |
- We no longer need to worry about `issue6528` on delta-info repositories |
| 199 |
(especially during exchanges given that `changegroup-v4` is used) |
| 200 |
- Having more information about delta quality and "best parent" helps to |
| 201 |
generate better bundles faster when the stored delta cannot be directly |
| 202 |
reused. |
| 203 |
- Having more precise snapshot information allows for more advanced heuristics |
| 204 |
when creating the delta tree used for storage. In particular, it unlocks |
| 205 |
skipping over redundant deltas in the parents' chain, using delta folding |
| 206 |
heuristics. That last part requires the Rust extensions to be enabled. |
| 207 |
|
| 208 |
Consider giving the format a try on large repositories if you experience slow |
| 209 |
`push`/`pull`. |
| 210 |
|
| 211 |
Some of these features are controlled by the following experimental features: |
| 212 |
- `storage.revlog.record-delta-quality` |
| 213 |
- `storage.delta-fold-estimate` |
| 214 |
|
| 215 |
#### Changegroup v4 |
| 216 |
|
| 217 |
A new changegroup format was introduced to carry the new information from |
| 218 |
delta-info. The format also includes some extra features that help performance |
| 219 |
overall: |
| 220 |
|
| 221 |
- explicitly transfer the full revision size to avoid situations where the |
| 222 |
client has to recompute at unbundle time |
| 223 |
- explicitly carry the "has metadata" information for filelogs to avoid the need |
| 224 |
to detect `issue6528` at unbundle time |
| 225 |
- explicitly carry snapshot and quality information regarding exchanged delta to |
| 226 |
help the client to take more informed decisions when applying incoming deltas |
| 227 |
- explicitly carry the source delta base information to help the client find a |
| 228 |
suitable base quicker when receiving a recomputed delta |
| 229 |
- allow the exchange of deltas in their compressed form. This reduces the |
| 230 |
overall efficiently of compressing the bundle stream, but avoids costs |
| 231 |
associated with decompressing and recompressing the deltas on the server *and* |
| 232 |
the client. This also helps to identify deltas that won't benefit from being |
| 233 |
compressed to speedup their application. |
| 234 |
|
| 235 |
This format is not used by default unless the `delta-info-revlog` format variant |
| 236 |
is in use. It can be enabled using the `experimental.changegroup4` |
| 237 |
configuration. |
| 238 |
|
| 239 |
The various new features and behaviors associated with it can be controlled |
| 240 |
using various configuration options: |
| 241 |
|
| 242 |
- `storage.revlog.exchange-compressed-delta` |
| 243 |
- `storage.revlog.reuse-external-delta-compression` |
| 244 |
- `storage.revlog.reuse-external-suspicious-delta-parent` |
| 245 |
|
| 246 |
#### Branchmap v3 |
| 247 |
|
| 248 |
The V3 version of the branchmap is a small evolution from the V2 format that has |
| 249 |
been used. The main difference is that the topological heads are no longer |
| 250 |
explicitly listed in the cache. This significantly reduces the size the |
| 251 |
branchmap that has to be read and written to disk and allows for various |
| 252 |
optimizations when a repository update only affects topological heads on a |
| 253 |
branch. |
| 254 |
|
| 255 |
In particular, this new branchmap format drastically reduces the cost of |
| 256 |
named-branch-related computations for large repositories that don't use the |
| 257 |
feature. |
| 258 |
|
| 259 |
Further performance improvements are expected with further code changes in later |
| 260 |
versions (without affecting the format). |
| 261 |
|
| 262 |
That feature is not enabled by default yet, don't hesitate to give it a try on |
| 263 |
any repositories with many heads or branches you might have at hand. |
| 264 |
|
| 265 |
#### Rust Fast Path |
| 266 |
|
| 267 |
`rhg` now supports the `purge` (aka `clean`) command, for even better |
| 268 |
performance that combines with the on this command gains previously mentioned. |
| 269 |
|
| 270 |
### Bug Fixes |
| 271 |
|
| 272 |
- The `profiling.output-dir` now supports expansion of tilde and shell variables |
| 273 |
- The `lfs` extension now expands and resolves the blob cache path to an |
| 274 |
absolute path |
| 275 |
- The availability of the given compression engine is now checked before |
| 276 |
applying a clonebundle |
| 277 |
- Extensions can now alter the contents of the repo's default config when using |
| 278 |
stream clone |
| 279 |
- Support for changing the process name on Linux and MacOS has been restored |
| 280 |
(useful for `chg` users) |
| 281 |
- Using `RUST_LOG` when profiling with `py-spy` will not display the logs of |
| 282 |
`py-spy` itself anymore |
| 283 |
- `hgweb` now validates that plain filesystem paths exist in `--web-conf` file |
| 284 |
instead of raising 500 |
| 285 |
- subrepo: fix an error handler in `hgsubrepo.matchfileset()` |
| 286 |
- largefiles: fix a MergeAction bytes vs str issue for marking a file removed |
| 287 |
- Local access to repositories with `pull`/`incoming` and `push` now honors |
| 288 |
`server.view` (note that `hg clone` in link-mode still does *not* honour |
| 289 |
`server.view`, `hg clone --pull` does) |
| 290 |
- repo-cache: fix using --chg with the rust extension (issue10048) |
| 291 |
- update: fix crash in rust update-from-clean on certain byte sequences |
| 292 |
- tracing: avoid writing traces to stdout, write to stderr instead |
| 293 |
- verify: fix fncache consistency checks (fixes #10045) |
| 294 |
- encoding: skip over "environ" re-encoding it the codec is bad |
| 295 |
|
| 296 |
|
| 297 |
### Internal API Changes |
| 298 |
|
| 299 |
The large and ongoing Python typing effort has once again made significant |
| 300 |
progress. To that end, there was a large import-cycle-breaking series that |
| 301 |
implied refactoring, new files which may make this merge more difficult for |
| 302 |
extension maintainers. We're sorry about that, but typing the Python code is |
| 303 |
helping us make the codebase a lot clearer and is now catching a lot of bugs |
| 304 |
during development, including within common third-party extensions like |
| 305 |
`tortoise-hg`. |
| 306 |
|
| 307 |
Raw changes are listed here to help with migrating. |
| 308 |
|
| 309 |
- 54d9dc0c2209 "cleanup: drop compatibility for `islocal(<repo-obj>)`" |
| 310 |
- f2aa1bb35860 "deprecations: remove support for `HGWITHRUSTEXT` env var and |
| 311 |
its usages" |
| 312 |
- f026848bebe4 "deprecations: remove `manifest.readfast`" |
| 313 |
- e915f96ea1d5 "deprecations: remove `manifest.readdelta`" |
| 314 |
- ee0a7fa4cdd5 "revlog: enforce the "writable parameter"" |
| 315 |
- 592438265fb3 "cleanup: drop the simplestorerepo extension" |
| 316 |
- 4963494bbd3f "bundle2: deprecate `bundle2.getrepocaps()` for hg 7.3" |
| 317 |
- a49c8fe2c986 "branchmap: drop the `repo.branchheads` method" |
| 318 |
|
| 319 |
### Miscellaneous |
| 320 |
|
| 321 |
- Add a `commands.commit.report-head-changes` config option, to remove the need |
| 322 |
for what can be an expensive computation in cases where it's not needed. |
| 323 |
- contrib: update apache-server Dockerfile to debian:trixie |
| 324 |
- Added `--py-installer` option to `run-tests.py` to control how Mercurial is |
| 325 |
installed before tests |
| 326 |
- Added an `--offline` option to `run-tests.py` |
| 327 |
- Documented installation through `uv` for Rust extensions (see `hg help rust`) |
| 328 |
- `hg debug::clonebundle-manifest` can be used to analyze the clonebundle |
| 329 |
matching process. |
| 330 |
|
| 331 |
Following the significant work made in 7.1 in this area, further changes have |
| 332 |
been made to the way developers can create a local copy of Mercurial for |
| 333 |
testing. Here are the unedited changes to make it easier to follow for those |
| 334 |
affected: |
| 335 |
|
| 336 |
- e2d10987bf26 "make-local: change the venv name" |
| 337 |
- e53ba925c7eb "make-local: add a symbolic link hg-local" |
| 338 |
- 2d69d5a333a6 "make-local: OFFLINE option" |