Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • mercurial/mercurial-devel
1 result
Show changes
Commits on Source (7)
......@@ -271,4 +271,5 @@
b267c5764cc6b804c619a42067405f27e8705beb 0 iQHNBAABCgA3FiEEH2b4zfZU6QXBHaBhoR4BzQ4F2VYFAmc99H8ZHGFscGhhcmVAcmFwaGFlbGdvbWVzLmRldgAKCRChHgHNDgXZVlpkDACOfStBiT60lrkLPDKzwQH/vM8U26XIPkxQ5lypmyomeWS8ss/+dDEHVWdoBM1wAIf90sCEV4yxRuEcT00YNqvW0aI4R6If8VB1Xg1aJ7c3MLpIWWs9BFp1uoi2Fvpx9HJmY3mPyrS4uIxPWaG+QVYOcmx6CGru+7Yd6w5aUFhWBJ/8ZqR496so3Q59z3+MJjHOVx+3UruGEjqP8tfWgX2RgwLi+utckq2Z+pDzDz/hfBQMx6aFmZN9pHBtQDyDuZD30bBLQi6xiPb6ddOXd6h2OjEa+X2VNUW2adbTVU4LBXSe4uvLx8jXcVE5TSxmL1v7FuHJxPUHz5sRh7NiQoOceHO7DWZn8cO73jF+L6WI946bbEsSE+7JgIEpcshsS1njw6LcPGPqFFdqyJ+eEmJ4/Naqd52/j8yWOIKEkNzGLDl8AADzxXnjejCgW/L7+sqF60JRz7p0H4WaT40rALeVTxxL/UhlRaSNKPzGwkfIlhSyP6VuCVVpTg6EmEUDjKE=
9751b9ccd74d8386687f88fbdfe280877840ec7d 0 iQHNBAABCgA3FiEEH2b4zfZU6QXBHaBhoR4BzQ4F2VYFAmeJLnYZHGFscGhhcmVAcmFwaGFlbGdvbWVzLmRldgAKCRChHgHNDgXZVtVZC/4tQcl/jGwcw8VQqg7l4gNNyk4GRvM+YsHQwfTtp8Xt2OnqwbI8sMuvEdXC3vmb9qfgKZX6qjwLe+9A8Jyz3jl0bIZSEHAiL5s9DZ/eKMKaxOn1DHrx3W/sFjd+GQOA/Xk6g4Dm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aTSf/V1eOHv0TutV3SEFnymdvMOi0wOmzOJIU/OLE7kWX2kUab1sDWagenoF9nAwDMLTgodLkNcSSTEv7t3iOKoZ8F+OECbGyRSC1bqwuGdL7ndyzXBPycMANYmT2584smRQsqNwpD+TTRNw3uMjqk1tsTkMUJdfaVYpPO2e2rhOZjFxDFfS95jDYLlG8rOwrmr9pYSwA7LV3ZJP9L3LBdcnIMxRF9iyoGLq5zLQgOzwhyDoqKGtTGKa/JnR+Hs6oCQYe12mQAlY797TQUHFUbNf+va0DaJpZzW0MFsUfr+SgL/ruHnOYa2ijejwxHLP38pvAMBSZKvBkW0gLcPS16kvk4XZtbHXeFbRhFiKOxgrkLQyncoFk7N5XNVucUsIsMd2JFwFTpxGrp+TploJw0AC/xAC816XY2iIulKVyZ3VjOI0+oqZRVr4T7fJCzs6bcqYvShMf96J1wS5crKBeTIiTZYJCakj/ql4GvJmSshxGa3flL695HMcqWUcE5Ql1BHgg==
......@@ -287,4 +287,5 @@
b267c5764cc6b804c619a42067405f27e8705beb 6.9
9751b9ccd74d8386687f88fbdfe280877840ec7d 6.9.1
b964f92261d4fbb64f19aa6af2b072f7730b913a 6.9.2
89ab2459f62ac8da3eb4f3ee2120d1814ce805d5 6.9.3
ed68f9a47a090cc6450a7d5617baf123ba5fc42a 7.0rc0
......@@ -124,7 +124,7 @@
<p>
If you are IRC-savvy, that's usually the fastest way to get
help. Go to <tt>#mercurial</tt> on <tt>libra.chat</tt>.
help. Go to <tt>#mercurial</tt> on <tt>libera.chat</tt>.
</p>
<h1>Author and copyright information</h1>
......
......@@ -322,7 +322,14 @@
# repo supports and error if the bundle isn't compatible.
if b'requirements' in params:
requirements = set(cast(bytes, params[b'requirements']).split(b','))
missingreqs = requirements - requirementsmod.STREAM_FIXED_REQUIREMENTS
if missingreqs:
relevant_reqs = (
requirements - requirementsmod.STREAM_IGNORABLE_REQUIREMENTS
)
# avoid cycle (not great for pytype)
from . import localrepo
supported_req = localrepo.gathersupportedrequirements(repo.ui)
missing_reqs = relevant_reqs - supported_req
if missing_reqs:
raise error.UnsupportedBundleSpecification(
_(b'missing support for repository features: %s')
......@@ -327,6 +334,6 @@
raise error.UnsupportedBundleSpecification(
_(b'missing support for repository features: %s')
% b', '.join(sorted(missingreqs))
% b', '.join(sorted(missing_reqs))
)
# Compute contentopts based on the version
......
......@@ -105,8 +105,6 @@
DIRSTATE_V2_REQUIREMENT,
}
# List of requirement that impact "stream-clone" (and hardlink clone) and
# cannot be changed in such cases.
#
# requirements not in this list are safe to be altered during stream-clone.
# List of requirement that do not impact "stream-clone" (and hardlink clone) and
# can be ignored in such case.
#
......@@ -112,15 +110,8 @@
#
# note: the list is currently inherited from previous code and miss some relevant requirement while containing some irrelevant ones.
STREAM_FIXED_REQUIREMENTS = {
ARCHIVED_PHASE_REQUIREMENT,
BOOKMARKS_IN_STORE_REQUIREMENT,
CHANGELOGV2_REQUIREMENT,
COPIESSDC_REQUIREMENT,
GENERALDELTA_REQUIREMENT,
INTERNAL_PHASE_REQUIREMENT,
REVLOG_COMPRESSION_ZSTD,
REVLOGV1_REQUIREMENT,
REVLOGV2_REQUIREMENT,
SPARSEREVLOG_REQUIREMENT,
TREEMANIFEST_REQUIREMENT,
# requirements not in this list safe to be altered during stream-clone.
STREAM_IGNORABLE_REQUIREMENTS = WORKING_DIR_REQUIREMENTS | {
DOTENCODE_REQUIREMENT, # abstracted by the vfs layer
FNCACHE_REQUIREMENT, # abstracted by the vfs layer
STORE_REQUIREMENT, # abstracted by the vfs layer
NODEMAP_REQUIREMENT, # Have some special logic to handle that case
}
......@@ -75,7 +75,7 @@
configuration choice when possible.
"""
requirements = set(default_requirements)
requirements -= requirementsmod.STREAM_FIXED_REQUIREMENTS
requirements & requirementsmod.STREAM_IGNORABLE_REQUIREMENTS
requirements.update(streamed_requirements)
return requirements
......@@ -86,7 +86,7 @@
This is used for advertising the stream options and to generate the actual
stream content."""
requiredformats = (
repo.requirements & requirementsmod.STREAM_FIXED_REQUIREMENTS
repo.requirements - requirementsmod.STREAM_IGNORABLE_REQUIREMENTS
)
return requiredformats
......
......@@ -945,6 +945,6 @@
standard clone
--------------
The persistent nodemap should exist after a streaming clone
The persistent nodemap should exist after a normal clone
$ hg clone --pull --quiet -U test-repo standard-clone
......@@ -949,5 +949,7 @@
$ hg clone --pull --quiet -U test-repo standard-clone
$ hg debugformat -R standard-clone | grep persistent-nodemap
persistent-nodemap: yes
$ ls -1 standard-clone/.hg/store/ | grep -E '00(changelog|manifest)(\.n|-.*\.nd)'
00changelog-*.nd (glob)
00changelog.n
......@@ -961,6 +963,19 @@
data-unused: 0
data-unused: 0.000%
standard clone, no nodemap requested
-------------------------------------
If persistent normal is requested to not be here, it should not exist after a normal clone
$ hg clone --pull --quiet -U test-repo standard-clone-no-nm \
> --config format.use-persistent-nodemap=no
$ hg debugformat -R standard-clone-no-nm | grep persistent-nodemap
persistent-nodemap: no
$ ls -1 standard-clone-no-nm/.hg/store/ | grep -E '00(changelog|manifest)(\.n|-.*\.nd)'
[1]
$ hg -R standard-clone-no-nm debugnodemap --metadata
local clone
------------
......@@ -968,6 +983,8 @@
The persistent nodemap should exist after a streaming clone
$ hg clone -U test-repo local-clone
$ hg debugformat -R local-clone | grep persistent-nodemap
persistent-nodemap: yes
$ ls -1 local-clone/.hg/store/ | grep -E '00(changelog|manifest)(\.n|-.*\.nd)'
00changelog-*.nd (glob)
00changelog.n
......@@ -981,6 +998,44 @@
data-unused: 0
data-unused: 0.000%
stream clone
------------
$ hg clone -U --stream ssh://user@dummy/test-repo stream-clone --quiet
$ hg debugformat -R stream-clone | grep persistent-nodemap
persistent-nodemap: yes
$ ls -1 stream-clone/.hg/store/ | grep -E '00(changelog|manifest)(\.n|-.*\.nd)'
00changelog-*.nd (glob)
00changelog.n
00manifest-*.nd (glob)
00manifest.n
$ hg -R stream-clone debugnodemap --metadata
uid: * (glob)
tip-rev: 5005
tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe
data-length: 121088
data-unused: 0
data-unused: 0.000%
stream requesting no persistent nodemap
---------------------------------------
Even if persistent nodemap affect the store, there is logic to stream clone
without it.
This helps client without supports for persistent nodemap.
$ hg clone -U --stream ssh://user@dummy/test-repo stream-clone-no-nm \
> --config format.use-persistent-nodemap=no \
> --config devel.persistent-nodemap=no \
> --config revlog.persistent-nodemap.slow-path=no \
> --quiet
$ hg debugformat -R stream-clone-no-nm | grep persistent-nodemap
persistent-nodemap: no
$ ls -1 stream-clone-no-nm/.hg/store/ | grep -E '00(changelog|manifest)(\.n|-.*\.nd)'
[1]
$ hg -R stream-clone-no-nm debugnodemap --metadata
Test various corruption case
============================
......
......@@ -109,5 +109,15 @@
$ "$PYTHON" $TESTDIR/dumbhttp.py -p $HGPORT1 --pid http.pid
$ cat http.pid >> $DAEMON_PIDS
$ cd ..
Requirements filtering
======================
Unknown requirements
--------------------
Stream bundle spec with unknown requirements should be filtered out
......@@ -112,6 +122,5 @@
Stream bundle spec with unknown requirements should be filtered out
#if stream-v2
$ cat > .hg/clonebundles.manifest << EOF
> http://localhost:$HGPORT1/bundle.hg BUNDLESPEC=none-v2;stream=v2;requirements%3Drevlogv42
$ cat > main/.hg/clonebundles.manifest << EOF
> http://localhost:$HGPORT1/bundle.hg BUNDLESPEC=none-v2;stream=$stream_version;requirements%3Drevlogv42
> EOF
......@@ -117,8 +126,2 @@
> EOF
#endif
#if stream-v3
$ cat > .hg/clonebundles.manifest << EOF
> http://localhost:$HGPORT1/bundle.hg BUNDLESPEC=none-v2;stream=v3-exp;requirements%3Drevlogv42
> EOF
#endif
......@@ -124,5 +127,4 @@
$ cd ..
$ hg clone -U http://localhost:$HGPORT stream-clone-unsupported-requirements
no compatible clone bundles available on server; falling back to regular clone
......@@ -134,4 +136,44 @@
added 5 changesets with 5 changes to 5 files
new changesets 426bada5c675:9bc730a19041 (5 drafts)
known requirements
------------------
Stream bundle spec with known requirements should be filtered out
$ cat > main/.hg/clonebundles.manifest << EOF
> http://localhost:$HGPORT1/bundle.hg BUNDLESPEC=none-v2;stream=$stream_version;requirements%3Dsparserevlog,revlogv1
> EOF
$ hg clone -U http://localhost:$HGPORT stream-clone-supported-requirements
applying clone bundle from http://localhost:$HGPORT1/bundle.hg
* to transfer* (glob)
stream-cloned * in * seconds (*/sec) (glob)
finished applying clone bundle
searching for changes
no changes found
known but irrelevant requirements
---------------------------------
As fncache and dotencode are abstracted by the vfs, they don't actually matters for streamclone
$ cat > main/.hg/clonebundles.manifest << EOF
> http://localhost:$HGPORT1/bundle.hg BUNDLESPEC=none-v2;stream=$stream_version;requirements%3Dshare-safe
> http://localhost:$HGPORT1/bundle.hg BUNDLESPEC=none-v2;stream=$stream_version;requirements%3Dshare-safe,fncache,dotencode
> EOF
$ hg clone -U http://localhost:$HGPORT stream-clone-ignorable-requirements
applying clone bundle from http://localhost:$HGPORT1/bundle.hg
* to transfer* (glob)
stream-cloned * in * seconds (*/sec) (glob)
finished applying clone bundle
searching for changes
no changes found
Test that we can apply the bundle as a stream clone bundle
......@@ -137,4 +179,5 @@
Test that we can apply the bundle as a stream clone bundle
==========================================================
$ cat > main/.hg/clonebundles.manifest << EOF
> http://localhost:$HGPORT1/bundle.hg BUNDLESPEC=`hg debugbundle --spec main/bundle.hg`
......