Mercurial > hg
comparison tests/test-http.t @ 48600:d9017df70135
stream-clone: filter possible missing requirements using all supported one
The `supportedformat` requirements is missing some important requirements and it
seems better to filter out with all requirements we know, not just an
"arbitrary" subset.
This is especially relevant as we about to phase out the `supportedformat` class
attribute.
(a backport of this change to stable should be sent soon).
Differential Revision: https://phab.mercurial-scm.org/D12031
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 24 Jan 2022 11:49:06 +0100 |
parents | 5ac0f2a8ba72 |
children | 2f2682f40ea0 |
comparison
equal
deleted
inserted
replaced
48599:dfbfa802876b | 48600:d9017df70135 |
---|---|
57 | 57 |
58 try to clone via stream but missing requirements, so should use pull instead | 58 try to clone via stream but missing requirements, so should use pull instead |
59 | 59 |
60 $ cat > $TESTTMP/removesupportedformat.py << EOF | 60 $ cat > $TESTTMP/removesupportedformat.py << EOF |
61 > from mercurial import localrepo | 61 > from mercurial import localrepo |
62 > def extsetup(ui): | 62 > def reposetup(ui, repo): |
63 > localrepo.localrepository.supportedformats.remove(b'generaldelta') | 63 > local = repo.local() |
64 > if local is not None: | |
65 > local.supported.remove(b'generaldelta') | |
64 > EOF | 66 > EOF |
65 | 67 |
66 $ hg clone --config extensions.rsf=$TESTTMP/removesupportedformat.py --stream http://localhost:$HGPORT/ copy3 | 68 $ hg clone --config extensions.rsf=$TESTTMP/removesupportedformat.py --stream http://localhost:$HGPORT/ copy3 |
67 warning: stream clone requested but client is missing requirements: generaldelta | 69 warning: stream clone requested but client is missing requirements: generaldelta |
68 (see https://www.mercurial-scm.org/wiki/MissingRequirement for more information) | 70 (see https://www.mercurial-scm.org/wiki/MissingRequirement for more information) |