##// END OF EJS Templates
clone: warn when streaming was requested but couldn't be performed...
Siddharth Agarwal -
r32259:076f1ff4 default
parent child Browse files
Show More
@@ -80,11 +80,21 b' def canperformstreamclone(pullop, bailif'
80 streamreqs = remote.capable('streamreqs')
80 streamreqs = remote.capable('streamreqs')
81 # This is weird and shouldn't happen with modern servers.
81 # This is weird and shouldn't happen with modern servers.
82 if not streamreqs:
82 if not streamreqs:
83 pullop.repo.ui.warn(_(
84 'warning: stream clone requested but server has them '
85 'disabled\n'))
83 return False, None
86 return False, None
84
87
85 streamreqs = set(streamreqs.split(','))
88 streamreqs = set(streamreqs.split(','))
86 # Server requires something we don't support. Bail.
89 # Server requires something we don't support. Bail.
87 if streamreqs - repo.supportedformats:
90 missingreqs = streamreqs - repo.supportedformats
91 if missingreqs:
92 pullop.repo.ui.warn(_(
93 'warning: stream clone requested but client is missing '
94 'requirements: %s\n') % ', '.join(sorted(missingreqs)))
95 pullop.repo.ui.warn(
96 _('(see https://www.mercurial-scm.org/wiki/MissingRequirement '
97 'for more information)\n'))
88 return False, None
98 return False, None
89 requirements = streamreqs
99 requirements = streamreqs
90
100
@@ -58,6 +58,7 b' clone via stream'
58 try to clone via stream, should use pull instead
58 try to clone via stream, should use pull instead
59
59
60 $ hg clone --uncompressed http://localhost:$HGPORT1/ copy2
60 $ hg clone --uncompressed http://localhost:$HGPORT1/ copy2
61 warning: stream clone requested but server has them disabled
61 requesting all changes
62 requesting all changes
62 adding changesets
63 adding changesets
63 adding manifests
64 adding manifests
@@ -75,6 +76,8 b' try to clone via stream but missing requ'
75 > EOF
76 > EOF
76
77
77 $ hg clone --config extensions.rsf=$TESTTMP/removesupportedformat.py --uncompressed http://localhost:$HGPORT/ copy3
78 $ hg clone --config extensions.rsf=$TESTTMP/removesupportedformat.py --uncompressed http://localhost:$HGPORT/ copy3
79 warning: stream clone requested but client is missing requirements: generaldelta
80 (see https://www.mercurial-scm.org/wiki/MissingRequirement for more information)
78 requesting all changes
81 requesting all changes
79 adding changesets
82 adding changesets
80 adding manifests
83 adding manifests
@@ -49,6 +49,7 b' clone via stream'
49 try to clone via stream, should use pull instead
49 try to clone via stream, should use pull instead
50
50
51 $ hg clone --uncompressed http://localhost:$HGPORT1/ copy2
51 $ hg clone --uncompressed http://localhost:$HGPORT1/ copy2
52 warning: stream clone requested but server has them disabled
52 requesting all changes
53 requesting all changes
53 adding changesets
54 adding changesets
54 adding manifests
55 adding manifests
@@ -66,6 +67,8 b' try to clone via stream but missing requ'
66 > EOF
67 > EOF
67
68
68 $ hg clone --config extensions.rsf=$TESTTMP/removesupportedformat.py --uncompressed http://localhost:$HGPORT/ copy3
69 $ hg clone --config extensions.rsf=$TESTTMP/removesupportedformat.py --uncompressed http://localhost:$HGPORT/ copy3
70 warning: stream clone requested but client is missing requirements: generaldelta
71 (see https://www.mercurial-scm.org/wiki/MissingRequirement for more information)
69 requesting all changes
72 requesting all changes
70 adding changesets
73 adding changesets
71 adding manifests
74 adding manifests
General Comments 0
You need to be logged in to leave comments. Login now