Mercurial > hg-stable
changeset 48695:e845537f6adb
branching: merge stable into default
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Wed, 02 Feb 2022 17:24:05 +0100 |
parents | 576040155dba (current diff) 01fde63b4ede (diff) |
children | cdb0d857afe2 |
files | mercurial/configitems.py mercurial/helptext/config.txt mercurial/localrepo.py mercurial/revlog.py mercurial/streamclone.py tests/test-basic.t tests/test-commandserver.t tests/test-dirstate-race.t tests/test-dirstate-race2.t tests/test-dirstate.t tests/test-help.t tests/test-hgignore.t tests/test-permissions.t tests/test-persistent-nodemap.t tests/test-purge.t tests/test-share-safe.t tests/test-status.t tests/test-stream-bundle-v2.t tests/test-symlinks.t tests/test-upgrade-repo.t |
diffstat | 29 files changed, 239 insertions(+), 56 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgsigs Wed Jan 26 15:32:18 2022 -0800 +++ b/.hgsigs Wed Feb 02 17:24:05 2022 +0100 @@ -221,3 +221,4 @@ a44bb185f6bdbecc754996d8386722e2f0123b0a 0 iQJJBAABCgAzFiEEgY2HzRrBgMOUyG5jOjPeRg2ew58FAmGKo4sVHDc4OTVwdWxraXRAZ21haWwuY29tAAoJEDoz3kYNnsOffmQP/jsOxxP0F9TliKYp7YjgMagtnebk+qdbq9pX8y8GdjGirRwCy/rMm3pXMNQDiWd3ZdYLICZIz8aSYbPL6HD78O6F68IWOVG5AwLM6knUNcEzmrPoFnSU1J7jaz8ERFmfNV6loes3oYj/VhRUDiFEmG1sflCc1iXvTEXaOi2PObo7iORR/2JtOlMQI7bASBTo0F7QTRzOuh+SzgJ6ItqpvjC+I2Iidn8yZ/F3jZXZ24on/D+b2nLQ5b7yc7pzVNyqiTFF6xHQEtRjNRv+hLS9mdD/oI6Vhwmfv7GD8U4MyudDfz5GEv2AE9cwOKRONfHdXhFX3UiubaDmDlo+mE3xXIPYJoTtadoUhVItCe5YAlp9P6uEAaWk/Z1zI+9ydYACycO0RySrphRJ3DmDITs7D2bQEsK/YB1NBzwlUJVF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Cm6QDF+36VstTR+idWyhnkq8g20NXcgWt79/CTWT7ssFmzdsHhdhWfJF99I0R0FCG0DSV313UmleZawavG1btOh4qCjTAWF5gnvsHfEIV1SAnDeeD6T27c8yIW7au9QXlkZds0xmFWLqkl6TxKpl7oa/bGDArAvOA3zHAeMlwXQKhhthjR7fU9PQnWsFXCt43GVo=
--- a/.hgtags Wed Jan 26 15:32:18 2022 -0800 +++ b/.hgtags Wed Feb 02 17:24:05 2022 +0100 @@ -234,3 +234,4 @@ a44bb185f6bdbecc754996d8386722e2f0123b0a 6.0rc0 5d08b289e2e526259d7d5ea32b70fe76d5b327d7 6.0 799fdf4cca80cb9ae40537a90995e6bd163ebc0b 6.0.1 +75676122c2bf7594ac732b7388db4c74c648b365 6.0.2
--- a/hgext/uncommit.py Wed Jan 26 15:32:18 2022 -0800 +++ b/hgext/uncommit.py Wed Feb 02 17:24:05 2022 +0100 @@ -273,6 +273,8 @@ curctx = repo[b'.'] rewriteutil.precheck(repo, [curctx.rev()], b'unamend') + if len(curctx.parents()) > 1: + raise error.InputError(_(b"cannot unamend merge changeset")) # identify the commit to which to unamend markers = list(predecessormarkers(curctx))
--- a/mercurial/branchmap.py Wed Jan 26 15:32:18 2022 -0800 +++ b/mercurial/branchmap.py Wed Feb 02 17:24:05 2022 +0100 @@ -149,6 +149,13 @@ def clear(self): self._per_filter.clear() + def write_delayed(self, repo): + unfi = repo.unfiltered() + for filtername, cache in self._per_filter.items(): + if cache._delayed: + repo = unfi.filtered(filtername) + cache.write(repo) + def _unknownnode(node): """raises ValueError when branchcache found a node which does not exists""" @@ -199,6 +206,7 @@ has a given node or not. If it's not provided, we assume that every node we have exists in changelog""" self._repo = repo + self._delayed = False if tipnode is None: self.tipnode = repo.nullid else: @@ -403,6 +411,13 @@ ) def write(self, repo): + tr = repo.currenttransaction() + if not getattr(tr, 'finalized', True): + # Avoid premature writing. + # + # (The cache warming setup by localrepo will update the file later.) + self._delayed = True + return try: f = repo.cachevfs(self._filename(repo), b"w", atomictemp=True) cachekey = [hex(self.tipnode), b'%d' % self.tiprev] @@ -427,6 +442,7 @@ len(self._entries), nodecount, ) + self._delayed = False except (IOError, OSError, error.Abort) as inst: # Abort may be raised by read only opener, so log and continue repo.ui.debug(
--- a/mercurial/configitems.py Wed Jan 26 15:32:18 2022 -0800 +++ b/mercurial/configitems.py Wed Feb 02 17:24:05 2022 +0100 @@ -1277,9 +1277,10 @@ # Enable this dirstate format *when creating a new repository*. # Which format to use for existing repos is controlled by .hg/requires b'format', - b'exp-rc-dirstate-v2', + b'use-dirstate-v2', default=False, experimental=True, + alias=[(b'format', b'exp-rc-dirstate-v2')], ) coreconfigitem( b'format', @@ -1851,7 +1852,7 @@ default=b'skip', experimental=True, ) -# experimental as long as format.exp-rc-dirstate-v2 is. +# experimental as long as format.use-dirstate-v2 is. coreconfigitem( b'storage', b'dirstate-v2.slow-path',
--- a/mercurial/helptext/config.txt Wed Jan 26 15:32:18 2022 -0800 +++ b/mercurial/helptext/config.txt Wed Feb 02 17:24:05 2022 +0100 @@ -915,7 +915,7 @@ Enabled by default. -``exp-rc-dirstate-v2`` +``use-dirstate-v2`` Enable or disable the experimental "dirstate-v2" feature. The dirstate functionality is shared by all commands interacting with the working copy. The new version is more robust, faster and stores more information. @@ -939,7 +939,7 @@ $ hg debugupgraderepo \ --run \ - --config format.exp-rc-dirstate-v2=False \ + --config format.use-dirstate-v2=False \ --config storage.dirstate-v2.slow-path=allow For a more comprehensive guide, see :hg:`help internals.dirstate-v2`.
--- a/mercurial/helptext/internals/dirstate-v2.txt Wed Jan 26 15:32:18 2022 -0800 +++ b/mercurial/helptext/internals/dirstate-v2.txt Wed Feb 02 17:24:05 2022 +0100 @@ -37,12 +37,12 @@ ------------------------------------------------ When creating a new local repository such as with `hg init` or `hg clone`, -the `exp-rc-dirstate-v2` boolean in the `format` configuration section +the `use-dirstate-v2` boolean in the `format` configuration section controls whether to use this file format. This is disabled by default as of this writing. To enable it for a single repository, run for example:: - $ hg init my-project --config format.exp-rc-dirstate-v2=1 + $ hg init my-project --config format.use-dirstate-v2=1 Checking the format of an existing local repository -------------------------------------------------- @@ -63,15 +63,15 @@ The `debugupgrade` command does various upgrades or downgrades on a local repository based on the current Mercurial version and on configuration. -The same `format.exp-rc-dirstate-v2` configuration is used again. +The same `format.use-dirstate-v2` configuration is used again. Example to upgrade:: - $ hg debugupgrade --config format.exp-rc-dirstate-v2=1 + $ hg debugupgrade --config format.use-dirstate-v2=1 Example to downgrade to `dirstate-v1`:: - $ hg debugupgrade --config format.exp-rc-dirstate-v2=0 + $ hg debugupgrade --config format.use-dirstate-v2=0 Both of this commands do nothing but print a list of proposed changes, which may include changes unrelated to the dirstate.
--- a/mercurial/helptext/rust.txt Wed Jan 26 15:32:18 2022 -0800 +++ b/mercurial/helptext/rust.txt Wed Feb 02 17:24:05 2022 +0100 @@ -15,10 +15,11 @@ ======== The following operations are sped up when using Rust: + - discovery of differences between repositories (pull/push) - nodemap (see :hg:`help config.format.use-persistent-nodemap`) - all commands using the dirstate (status, commit, diff, add, update, etc.) - - dirstate-v2 (see :hg:`help config.format.exp-rc-dirstate-v2`) + - dirstate-v2 (see :hg:`help config.format.use-dirstate-v2`) - iteration over ancestors in a graph More features are in the works, and improvements on the above listed are still
--- a/mercurial/localrepo.py Wed Jan 26 15:32:18 2022 -0800 +++ b/mercurial/localrepo.py Wed Feb 02 17:24:05 2022 +0100 @@ -1190,7 +1190,7 @@ b"fast implementation." ) hint = _( - b"check `hg help config.format.exp-rc-dirstate-v2` " b"for details" + b"check `hg help config.format.use-dirstate-v2` " b"for details" ) if not dirstate.HAS_FAST_DIRSTATE_V2: if slow_path == b'warn': @@ -2824,6 +2824,8 @@ self.ui.debug(b'updating the branch cache\n') self.filtered(b'served').branchmap() self.filtered(b'served.hidden').branchmap() + # flush all possibly delayed write. + self._branchcaches.write_delayed(self) if repository.CACHE_CHANGELOG_CACHE in caches: self.changelog.update_caches(transaction=tr) @@ -3618,9 +3620,9 @@ if ui.configbool(b'format', b'sparse-revlog'): requirements.add(requirementsmod.SPARSEREVLOG_REQUIREMENT) - # experimental config: format.exp-rc-dirstate-v2 + # experimental config: format.use-dirstate-v2 # Keep this logic in sync with `has_dirstate_v2()` in `tests/hghave.py` - if ui.configbool(b'format', b'exp-rc-dirstate-v2'): + if ui.configbool(b'format', b'use-dirstate-v2'): requirements.add(requirementsmod.DIRSTATE_V2_REQUIREMENT) # experimental config: format.exp-use-copies-side-data-changeset
--- a/mercurial/revlog.py Wed Jan 26 15:32:18 2022 -0800 +++ b/mercurial/revlog.py Wed Feb 02 17:24:05 2022 +0100 @@ -1971,7 +1971,7 @@ raise error.RevlogError( _(b"%s not found in the transaction") % self._indexfile ) - trindex = 0 + trindex = None tr.add(self._datafile, 0) existing_handles = False @@ -1994,10 +1994,17 @@ with self._indexfp() as read_ifh: for r in self: new_dfh.write(self._getsegmentforrevs(r, r, df=read_ifh)[1]) - if troffset <= self.start(r) + r * self.index.entry_size: + if ( + trindex is None + and troffset + <= self.start(r) + r * self.index.entry_size + ): trindex = r new_dfh.flush() + if trindex is None: + trindex = 0 + with self.__index_new_fp() as fp: self._format_flags &= ~FLAG_INLINE_DATA self._inline = False
--- a/mercurial/transaction.py Wed Jan 26 15:32:18 2022 -0800 +++ b/mercurial/transaction.py Wed Feb 02 17:24:05 2022 +0100 @@ -229,6 +229,10 @@ if self._journal: self._abort() + @property + def finalized(self): + return self._finalizecallback is None + @active def startgroup(self): """delay registration of file entry
--- a/relnotes/6.0 Wed Jan 26 15:32:18 2022 -0800 +++ b/relnotes/6.0 Wed Feb 02 17:24:05 2022 +0100 @@ -1,3 +1,25 @@ += Mercurial 6.0.2 = + + * Fix `hg incoming` and `hg outgoing` with remote subrepos on Windows + * Fix Rust build on MacOS + * Fix a (15 year old?) bug where some data loss could happen in a very tight race window (f38ae2d7390e + ccd9cb73125c) + * Remove support for running `hg unamend` on merge changesets at it was never actually implemented + * Fix stream-clone requirements filtering which caused some stream-clones to be unusable from an older version of Mercurial + * Rename dirstate-v2 configuration name from `exp-rc-dirstate-v2` to `use-dirstate-v2`. This was overlooked in `6.0`, the old name will be kept as an alias for compatibility. + * Fix a bug where the branchmap could point to uncommitted data + += Mercurial 6.0.1 = + + * Improve documentation around Rust (see hg help rust) and rust-related actions + * Improve upgrade/downgrade edge cases for dirstate-v2 + * Make the test suite nicer to big-endian platforms + * Make the test suite nicer to NetBSD + * Fix a performance regression on fsmonitor (issue6612) + * Add fixes for Python 3.10 + * Fix a deadlock when using sparse and share-safe together + += Mercurial 6.0 = + == New Features == * `debugrebuildfncache` now has an option to rebuild only the index files * a new `bookmarks.mode` path option have been introduced to control the
--- a/tests/test-basic.t Wed Jan 26 15:32:18 2022 -0800 +++ b/tests/test-basic.t Wed Feb 02 17:24:05 2022 +0100 @@ -6,7 +6,7 @@ devel.all-warnings=true devel.default-date=0 0 extensions.fsmonitor= (fsmonitor !) - format.exp-rc-dirstate-v2=1 (dirstate-v2 !) + format.use-dirstate-v2=1 (dirstate-v2 !) largefiles.usercache=$TESTTMP/.cache/largefiles lfs.usercache=$TESTTMP/.cache/lfs ui.slash=True
--- a/tests/test-branches.t Wed Jan 26 15:32:18 2022 -0800 +++ b/tests/test-branches.t Wed Feb 02 17:24:05 2022 +0100 @@ -1242,3 +1242,99 @@ C 3:4a546028fa8f (inactive) B 1:0bc7d348d965 (inactive) $ cd .. + +Check that the cache are not written too early +---------------------------------------------- + + $ hg log -R branchmap-testing1 -G + o changeset: 3:71ca9a6d524e + |\ branch: A + | | tag: tip + | | parent: 2:a3b807b3ff0b + | | parent: 1:99ba08759bc7 + | | user: debugbuilddag + | | date: Thu Jan 01 00:00:03 1970 +0000 + | | summary: r3 + | | + | o changeset: 2:a3b807b3ff0b + | | branch: A + | | parent: 0:2ab8003a1750 + | | user: debugbuilddag + | | date: Thu Jan 01 00:00:02 1970 +0000 + | | summary: r2 + | | + o | changeset: 1:99ba08759bc7 + |/ branch: A + | tag: p1 + | user: debugbuilddag + | date: Thu Jan 01 00:00:01 1970 +0000 + | summary: r1 + | + o changeset: 0:2ab8003a1750 + branch: A + tag: base + user: debugbuilddag + date: Thu Jan 01 00:00:00 1970 +0000 + summary: r0 + + $ hg bundle -R branchmap-testing1 --base 1 bundle.hg --rev 'head()' + 2 changesets found + +Unbundling revision should warm the served cache + + $ hg clone branchmap-testing1 --rev 1 branchmap-update-01 + adding changesets + adding manifests + adding file changes + added 2 changesets with 0 changes to 0 files + new changesets 2ab8003a1750:99ba08759bc7 + updating to branch A + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cat branchmap-update-01/.hg/cache/branch2-served + 99ba08759bc7f6fdbe5304e83d0387f35c082479 1 + 99ba08759bc7f6fdbe5304e83d0387f35c082479 o A + $ hg -R branchmap-update-01 unbundle bundle.hg + adding changesets + adding manifests + adding file changes + added 2 changesets with 0 changes to 0 files + new changesets a3b807b3ff0b:71ca9a6d524e (2 drafts) + (run 'hg update' to get a working copy) + $ cat branchmap-update-01/.hg/cache/branch2-served + 71ca9a6d524ed3c2a215119b2086ac3b8c4c8286 3 + 71ca9a6d524ed3c2a215119b2086ac3b8c4c8286 o A + +aborted Unbundle should not update the on disk cache + + $ cat >> simplehook.py << EOF + > import sys + > from mercurial import node + > from mercurial import branchmap + > def hook(ui, repo, *args, **kwargs): + > s = repo.filtered(b"served") + > s.branchmap() + > return 1 + > EOF + $ hg clone branchmap-testing1 --rev 1 branchmap-update-02 + adding changesets + adding manifests + adding file changes + added 2 changesets with 0 changes to 0 files + new changesets 2ab8003a1750:99ba08759bc7 + updating to branch A + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + + $ cat branchmap-update-02/.hg/cache/branch2-served + 99ba08759bc7f6fdbe5304e83d0387f35c082479 1 + 99ba08759bc7f6fdbe5304e83d0387f35c082479 o A + $ hg -R branchmap-update-02 unbundle bundle.hg --config "hooks.pretxnclose=python:$TESTTMP/simplehook.py:hook" + adding changesets + adding manifests + adding file changes + transaction abort! + rollback completed + abort: pretxnclose hook failed + [40] + $ cat branchmap-update-02/.hg/cache/branch2-served + 99ba08759bc7f6fdbe5304e83d0387f35c082479 1 + 99ba08759bc7f6fdbe5304e83d0387f35c082479 o A
--- a/tests/test-commandserver.t Wed Jan 26 15:32:18 2022 -0800 +++ b/tests/test-commandserver.t Wed Feb 02 17:24:05 2022 +0100 @@ -218,7 +218,7 @@ devel.all-warnings=true devel.default-date=0 0 extensions.fsmonitor= (fsmonitor !) - format.exp-rc-dirstate-v2=1 (dirstate-v2 !) + format.use-dirstate-v2=1 (dirstate-v2 !) largefiles.usercache=$TESTTMP/.cache/largefiles lfs.usercache=$TESTTMP/.cache/lfs ui.slash=True
--- a/tests/test-dirstate-race.t Wed Jan 26 15:32:18 2022 -0800 +++ b/tests/test-dirstate-race.t Wed Feb 02 17:24:05 2022 +0100 @@ -3,7 +3,7 @@ #if dirstate-v2 $ cat >> $HGRCPATH << EOF > [format] - > exp-rc-dirstate-v2=1 + > use-dirstate-v2=1 > [storage] > dirstate-v2.slow-path=allow > EOF
--- a/tests/test-dirstate-race2.t Wed Jan 26 15:32:18 2022 -0800 +++ b/tests/test-dirstate-race2.t Wed Feb 02 17:24:05 2022 +0100 @@ -3,7 +3,7 @@ #if dirstate-v2 $ cat >> $HGRCPATH << EOF > [format] - > exp-rc-dirstate-v2=1 + > use-dirstate-v2=1 > [storage] > dirstate-v2.slow-path=allow > EOF
--- a/tests/test-dirstate.t Wed Jan 26 15:32:18 2022 -0800 +++ b/tests/test-dirstate.t Wed Feb 02 17:24:05 2022 +0100 @@ -3,7 +3,7 @@ #if dirstate-v2 $ cat >> $HGRCPATH << EOF > [format] - > exp-rc-dirstate-v2=1 + > use-dirstate-v2=1 > [storage] > dirstate-v2.slow-path=allow > EOF
--- a/tests/test-help.t Wed Jan 26 15:32:18 2022 -0800 +++ b/tests/test-help.t Wed Feb 02 17:24:05 2022 +0100 @@ -1597,7 +1597,7 @@ "usefncache" - "exp-rc-dirstate-v2" + "use-dirstate-v2" "use-persistent-nodemap"
--- a/tests/test-hgignore.t Wed Jan 26 15:32:18 2022 -0800 +++ b/tests/test-hgignore.t Wed Feb 02 17:24:05 2022 +0100 @@ -3,7 +3,7 @@ #if dirstate-v2 $ cat >> $HGRCPATH << EOF > [format] - > exp-rc-dirstate-v2=1 + > use-dirstate-v2=1 > [storage] > dirstate-v2.slow-path=allow > EOF
--- a/tests/test-permissions.t Wed Jan 26 15:32:18 2022 -0800 +++ b/tests/test-permissions.t Wed Feb 02 17:24:05 2022 +0100 @@ -5,7 +5,7 @@ #if dirstate-v2 $ cat >> $HGRCPATH << EOF > [format] - > exp-rc-dirstate-v2=1 + > use-dirstate-v2=1 > [storage] > dirstate-v2.slow-path=allow > EOF
--- a/tests/test-persistent-nodemap.t Wed Jan 26 15:32:18 2022 -0800 +++ b/tests/test-persistent-nodemap.t Wed Feb 02 17:24:05 2022 +0100 @@ -800,7 +800,7 @@ requirements preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-zstd no-dirstate-v2 !) preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd no-dirstate-v2 !) - preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd dirstate-v2 !) + preserved: dotencode, use-dirstate-v2, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd dirstate-v2 !) removed: persistent-nodemap processed revlogs: @@ -844,7 +844,7 @@ requirements preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-zstd no-dirstate-v2 !) preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd no-dirstate-v2 !) - preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd dirstate-v2 !) + preserved: dotencode, use-dirstate-v2, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd dirstate-v2 !) added: persistent-nodemap processed revlogs: @@ -876,7 +876,7 @@ requirements preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (no-zstd no-dirstate-v2 !) preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd no-dirstate-v2 !) - preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd dirstate-v2 !) + preserved: dotencode, use-dirstate-v2, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd dirstate-v2 !) optimisations: re-delta-all
--- a/tests/test-purge.t Wed Jan 26 15:32:18 2022 -0800 +++ b/tests/test-purge.t Wed Feb 02 17:24:05 2022 +0100 @@ -3,7 +3,7 @@ #if dirstate-v2 $ cat >> $HGRCPATH << EOF > [format] - > exp-rc-dirstate-v2=1 + > use-dirstate-v2=1 > [storage] > dirstate-v2.slow-path=allow > EOF
--- a/tests/test-share-safe.t Wed Jan 26 15:32:18 2022 -0800 +++ b/tests/test-share-safe.t Wed Feb 02 17:24:05 2022 +0100 @@ -225,7 +225,7 @@ requirements preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-dirstate-v2 !) - preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (dirstate-v2 !) + preserved: dotencode, use-dirstate-v2, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (dirstate-v2 !) added: revlog-compression-zstd processed revlogs: @@ -253,8 +253,8 @@ requirements preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-zstd no-dirstate-v2 !) preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd no-dirstate-v2 !) - preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-zstd dirstate-v2 !) - preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd dirstate-v2 !) + preserved: dotencode, use-dirstate-v2, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-zstd dirstate-v2 !) + preserved: dotencode, use-dirstate-v2, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd dirstate-v2 !) added: persistent-nodemap processed revlogs: @@ -360,7 +360,7 @@ $ hg debugupgraderepo -q requirements preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-dirstate-v2 !) - preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !) + preserved: dotencode, use-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !) added: share-safe no revlogs to process @@ -370,7 +370,7 @@ requirements preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-dirstate-v2 !) - preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !) + preserved: dotencode, use-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !) added: share-safe share-safe @@ -448,7 +448,7 @@ $ hg debugupgraderepo -q requirements preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-dirstate-v2 !) - preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !) + preserved: dotencode, use-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !) removed: share-safe no revlogs to process @@ -458,7 +458,7 @@ requirements preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-dirstate-v2 !) - preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !) + preserved: dotencode, use-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !) removed: share-safe no revlogs to process @@ -541,7 +541,7 @@ requirements preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-dirstate-v2 !) - preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !) + preserved: dotencode, use-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !) added: share-safe no revlogs to process
--- a/tests/test-status.t Wed Jan 26 15:32:18 2022 -0800 +++ b/tests/test-status.t Wed Feb 02 17:24:05 2022 +0100 @@ -3,7 +3,7 @@ #if dirstate-v2 $ cat >> $HGRCPATH << EOF > [format] - > exp-rc-dirstate-v2=1 + > use-dirstate-v2=1 > [storage] > dirstate-v2.slow-path=allow > EOF
--- a/tests/test-symlinks.t Wed Jan 26 15:32:18 2022 -0800 +++ b/tests/test-symlinks.t Wed Feb 02 17:24:05 2022 +0100 @@ -5,7 +5,7 @@ #if dirstate-v2 $ cat >> $HGRCPATH << EOF > [format] - > exp-rc-dirstate-v2=1 + > use-dirstate-v2=1 > [storage] > dirstate-v2.slow-path=allow > EOF
--- a/tests/test-transaction-rollback-on-revlog-split.t Wed Jan 26 15:32:18 2022 -0800 +++ b/tests/test-transaction-rollback-on-revlog-split.t Wed Feb 02 17:24:05 2022 +0100 @@ -17,22 +17,28 @@ > extensions.wrapfunction(util.atomictempfile, 'close', close) > EOF -Test offset computation to correctly factor in the index entries themselve. +Test offset computation to correctly factor in the index entries themselves. Also test that the new data size has the correct size if the transaction is aborted after the index has been replaced. -Test repo has one small, one moderate and one big change. The clone has -the small and moderate change and will transition to non-inline storage when -adding the big change. +Test repo has commits a, b, c, D, where D is large (grows the revlog enough that it +transitions to non-inline storage). The clone initially has changes a, b +and will transition to non-inline storage when adding c, D. + +If the transaction adding c, D is rolled back, then we don't undo the revlog split, +but truncate the index and the data to remove both c and D. $ hg init troffset-computation --config format.revlog-compression=none $ cd troffset-computation $ printf '%20d' '1' > file - $ hg commit -Aqm_ + $ hg commit -Aqma $ printf '%1024d' '1' > file - $ hg commit -Aqm_ + $ hg commit -Aqmb + $ printf '%20d' '1' > file + $ hg commit -Aqmc $ dd if=/dev/zero of=file bs=1k count=128 > /dev/null 2>&1 - $ hg commit -Aqm_ + $ hg commit -AqmD + $ cd .. $ hg clone -r 1 troffset-computation troffset-computation-copy --config format.revlog-compression=none -q @@ -59,7 +65,7 @@ $ cat .hg/store/journal | tr -s '\000' ' ' | grep data/file | tail -1 data/file.i 128 -The first file.i entry should match the size above. +The first file.i entry should match the "Reference size" above. The first file.d entry is the temporary record during the split, the second entry after the split happened. The sum of the second file.d and the second file.i entry should match the first file.i entry. @@ -76,11 +82,11 @@ .hg/store/data/file.d: size=1046 .hg/store/data/file.i: size=128 $ hg tip - changeset: 1:3ce491143aec + changeset: 1:cfa8d6e60429 tag: tip user: test date: Thu Jan 01 00:00:00 1970 +0000 - summary: _ + summary: b $ hg verify -q warning: revlog 'data/file.d' not in fncache! @@ -126,11 +132,11 @@ .hg/store/data/file.d: size=1046 .hg/store/data/file.i: size=1174 $ hg tip - changeset: 1:3ce491143aec + changeset: 1:cfa8d6e60429 tag: tip user: test date: Thu Jan 01 00:00:00 1970 +0000 - summary: _ + summary: b $ hg verify -q $ cd .. @@ -158,11 +164,11 @@ .hg/store/data/file.d: size=1046 .hg/store/data/file.i: size=128 $ hg tip - changeset: 1:3ce491143aec + changeset: 1:cfa8d6e60429 tag: tip user: test date: Thu Jan 01 00:00:00 1970 +0000 - summary: _ + summary: b $ hg verify -q warning: revlog 'data/file.d' not in fncache!
--- a/tests/test-unamend.t Wed Jan 26 15:32:18 2022 -0800 +++ b/tests/test-unamend.t Wed Feb 02 17:24:05 2022 +0100 @@ -421,3 +421,27 @@ A d b R b + +Try to unamend a merge + + $ cd .. + $ hg init merge + $ cd merge + $ echo initial > initial + $ hg ci -Aqm initial + $ echo left > left + $ hg ci -Aqm left + $ hg co -q 0 + $ echo right > right + $ hg ci -Aqm right + $ hg merge -q 1 + $ hg ci -m merge + $ echo accidental > initial + $ hg st --rev 1 --rev . + A right + $ hg st --rev 2 --rev . + A left + $ hg amend + $ hg unamend + abort: cannot unamend merge changeset + [10]
--- a/tests/test-upgrade-repo.t Wed Jan 26 15:32:18 2022 -0800 +++ b/tests/test-upgrade-repo.t Wed Feb 02 17:24:05 2022 +0100 @@ -1713,9 +1713,9 @@ Upgrade to dirstate-v2 - $ hg debugformat -v --config format.exp-rc-dirstate-v2=1 | grep dirstate-v2 + $ hg debugformat -v --config format.use-dirstate-v2=1 | grep dirstate-v2 dirstate-v2: no yes no - $ hg debugupgraderepo --config format.exp-rc-dirstate-v2=1 --run + $ hg debugupgraderepo --config format.use-dirstate-v2=1 --run upgrade will perform the following actions: requirements @@ -1769,14 +1769,14 @@ dirstate-v2: upgrade and downgrade from and empty repository: ------------------------------------------------------------- - $ hg init --config format.exp-rc-dirstate-v2=no dirstate-v2-empty + $ hg init --config format.use-dirstate-v2=no dirstate-v2-empty $ cd dirstate-v2-empty $ hg debugformat | grep dirstate-v2 dirstate-v2: no upgrade - $ hg debugupgraderepo --run --config format.exp-rc-dirstate-v2=yes + $ hg debugupgraderepo --run --config format.use-dirstate-v2=yes upgrade will perform the following actions: requirements @@ -1800,7 +1800,7 @@ downgrade - $ hg debugupgraderepo --run --config format.exp-rc-dirstate-v2=no + $ hg debugupgraderepo --run --config format.use-dirstate-v2=no upgrade will perform the following actions: requirements