Mercurial > hg
comparison mercurial/wireprotov1server.py @ 50542:7b723217d368 stable
clonebundles: filter out invalid schemes instead of failing on them
Previously, an invalid clonebundle scheme would result in a failed
clone. By specifying a list of schemes we support,
we can make sure adding a new scheme (like the one for inline clonebundles)
does not result in clones failing for older clients.
author | Mathias De Mare <mathias.de_mare@nokia.com> |
---|---|
date | Thu, 20 Apr 2023 11:23:45 +0200 |
parents | f254fc73d956 |
children | a41eeb877d07 |
comparison
equal
deleted
inserted
replaced
50541:ef7f943ebabf | 50542:7b723217d368 |
---|---|
378 | 378 |
379 manifest = repo.vfs.tryread(b'pullbundles.manifest') | 379 manifest = repo.vfs.tryread(b'pullbundles.manifest') |
380 if not manifest: | 380 if not manifest: |
381 return None | 381 return None |
382 res = bundlecaches.parseclonebundlesmanifest(repo, manifest) | 382 res = bundlecaches.parseclonebundlesmanifest(repo, manifest) |
383 res = bundlecaches.filterclonebundleentries(repo, res) | 383 res = bundlecaches.filterclonebundleentries(repo, res, pullbundles=True) |
384 if not res: | 384 if not res: |
385 return None | 385 return None |
386 cl = repo.unfiltered().changelog | 386 cl = repo.unfiltered().changelog |
387 heads_anc = cl.ancestors([cl.rev(rev) for rev in heads], inclusive=True) | 387 heads_anc = cl.ancestors([cl.rev(rev) for rev in heads], inclusive=True) |
388 common_anc = cl.ancestors([cl.rev(rev) for rev in common], inclusive=True) | 388 common_anc = cl.ancestors([cl.rev(rev) for rev in common], inclusive=True) |