##// 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 def canperformstreamclone(pullop, bailif
80 80 streamreqs = remote.capable('streamreqs')
81 81 # This is weird and shouldn't happen with modern servers.
82 82 if not streamreqs:
83 pullop.repo.ui.warn(_(
84 'warning: stream clone requested but server has them '
85 'disabled\n'))
83 86 return False, None
84 87
85 88 streamreqs = set(streamreqs.split(','))
86 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 98 return False, None
89 99 requirements = streamreqs
90 100
@@ -58,6 +58,7 clone via stream
58 58 try to clone via stream, should use pull instead
59 59
60 60 $ hg clone --uncompressed http://localhost:$HGPORT1/ copy2
61 warning: stream clone requested but server has them disabled
61 62 requesting all changes
62 63 adding changesets
63 64 adding manifests
@@ -75,6 +76,8 try to clone via stream but missing requ
75 76 > EOF
76 77
77 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 81 requesting all changes
79 82 adding changesets
80 83 adding manifests
@@ -49,6 +49,7 clone via stream
49 49 try to clone via stream, should use pull instead
50 50
51 51 $ hg clone --uncompressed http://localhost:$HGPORT1/ copy2
52 warning: stream clone requested but server has them disabled
52 53 requesting all changes
53 54 adding changesets
54 55 adding manifests
@@ -66,6 +67,8 try to clone via stream but missing requ
66 67 > EOF
67 68
68 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 72 requesting all changes
70 73 adding changesets
71 74 adding manifests
General Comments 0
You need to be logged in to leave comments. Login now