##// END OF EJS Templates
stream-clone: filter possible missing requirements using all supported one...
marmoute -
r49446:d9017df7 default
parent child Browse files
Show More
@@ -128,7 +128,7 b' def canperformstreamclone(pullop, bundle'
128
128
129 streamreqs = set(streamreqs.split(b','))
129 streamreqs = set(streamreqs.split(b','))
130 # Server requires something we don't support. Bail.
130 # Server requires something we don't support. Bail.
131 missingreqs = streamreqs - repo.supportedformats
131 missingreqs = streamreqs - repo.supported
132 if missingreqs:
132 if missingreqs:
133 pullop.repo.ui.warn(
133 pullop.repo.ui.warn(
134 _(
134 _(
@@ -503,7 +503,7 b' def applybundlev1(repo, fp):'
503 )
503 )
504
504
505 filecount, bytecount, requirements = readbundle1header(fp)
505 filecount, bytecount, requirements = readbundle1header(fp)
506 missingreqs = requirements - repo.supportedformats
506 missingreqs = requirements - repo.supported
507 if missingreqs:
507 if missingreqs:
508 raise error.Abort(
508 raise error.Abort(
509 _(b'unable to apply stream clone: unsupported format: %s')
509 _(b'unable to apply stream clone: unsupported format: %s')
@@ -70,8 +70,10 b' try to clone via stream but missing requ'
70
70
71 $ cat > $TESTTMP/removesupportedformat.py << EOF
71 $ cat > $TESTTMP/removesupportedformat.py << EOF
72 > from mercurial import localrepo
72 > from mercurial import localrepo
73 > def extsetup(ui):
73 > def reposetup(ui, repo):
74 > localrepo.localrepository.supportedformats.remove(b'generaldelta')
74 > local = repo.local()
75 > if local is not None:
76 > local.supported.remove(b'generaldelta')
75 > EOF
77 > EOF
76
78
77 $ hg clone --config extensions.rsf=$TESTTMP/removesupportedformat.py --stream http://localhost:$HGPORT/ copy3
79 $ hg clone --config extensions.rsf=$TESTTMP/removesupportedformat.py --stream http://localhost:$HGPORT/ copy3
@@ -59,8 +59,10 b' try to clone via stream but missing requ'
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
General Comments 0
You need to be logged in to leave comments. Login now