##// END OF EJS Templates
stream-clone: filter possible missing requirements using all supported one...
marmoute -
r49522:6d2ddea0 stable
parent child Browse files
Show More
@@ -104,7 +104,7 b' def canperformstreamclone(pullop, bundle'
104
104
105 streamreqs = set(streamreqs.split(b','))
105 streamreqs = set(streamreqs.split(b','))
106 # Server requires something we don't support. Bail.
106 # Server requires something we don't support. Bail.
107 missingreqs = streamreqs - repo.supportedformats
107 missingreqs = streamreqs - repo.supported
108 if missingreqs:
108 if missingreqs:
109 pullop.repo.ui.warn(
109 pullop.repo.ui.warn(
110 _(
110 _(
@@ -481,7 +481,7 b' def applybundlev1(repo, fp):'
481 )
481 )
482
482
483 filecount, bytecount, requirements = readbundle1header(fp)
483 filecount, bytecount, requirements = readbundle1header(fp)
484 missingreqs = requirements - repo.supportedformats
484 missingreqs = requirements - repo.supported
485 if missingreqs:
485 if missingreqs:
486 raise error.Abort(
486 raise error.Abort(
487 _(b'unable to apply stream clone: unsupported format: %s')
487 _(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