##// END OF EJS Templates
streamclonebundle: make sure we accept new stream clone bundle spec...
Boris Feld -
r37187:b837655c default
parent child Browse files
Show More
@@ -2180,6 +2180,18 b' def parseclonebundlesmanifest(repo, s):'
2180 2180
2181 2181 return m
2182 2182
2183 def isstreamclonespec(bundlespec):
2184 # Stream clone v1
2185 if (bundlespec.compression == 'UN' and bundlespec.version == 's1'):
2186 return True
2187
2188 # Stream clone v2
2189 if (bundlespec.compression == 'UN' and bundlespec.version == '02' and \
2190 bundlespec.contentopts.get('streamv2')):
2191 return True
2192
2193 return False
2194
2183 2195 def filterclonebundleentries(repo, entries, streamclonerequested=False):
2184 2196 """Remove incompatible clone bundle manifest entries.
2185 2197
@@ -2199,9 +2211,7 b' def filterclonebundleentries(repo, entri'
2199 2211
2200 2212 # If a stream clone was requested, filter out non-streamclone
2201 2213 # entries.
2202 comp = bundlespec.compression
2203 version = bundlespec.version
2204 if streamclonerequested and (comp != 'UN' or version != 's1'):
2214 if streamclonerequested and not isstreamclonespec(bundlespec):
2205 2215 repo.ui.debug('filtering %s because not a stream clone\n' %
2206 2216 entry['URL'])
2207 2217 continue
@@ -112,3 +112,55 b' Test that we can apply the bundle as a s'
112 112 E: remote created -> g
113 113 getting E
114 114 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
115
116 $ hg clone --stream http://localhost:$HGPORT streamv2-clone-explicit --debug
117 using http://localhost:$HGPORT/
118 sending capabilities command
119 sending clonebundles command
120 applying clone bundle from http://localhost:$HGPORT1/bundle.hg
121 bundle2-input-bundle: with-transaction
122 bundle2-input-part: "stream2" (params: 3 mandatory) supported
123 applying stream bundle
124 11 files to transfer, 1.65 KB of data
125 adding [s] data/A.i (66 bytes)
126 adding [s] data/B.i (66 bytes)
127 adding [s] data/C.i (66 bytes)
128 adding [s] data/D.i (66 bytes)
129 adding [s] data/E.i (66 bytes)
130 adding [s] 00manifest.i (584 bytes)
131 adding [s] 00changelog.i (595 bytes)
132 adding [s] phaseroots (43 bytes)
133 adding [c] branch2-served (94 bytes)
134 adding [c] rbc-names-v1 (7 bytes)
135 adding [c] rbc-revs-v1 (40 bytes)
136 transferred 1.65 KB in *.* seconds (*/sec) (glob)
137 bundle2-input-part: total payload size 1840
138 bundle2-input-bundle: 0 parts total
139 finished applying clone bundle
140 query 1; heads
141 sending batch command
142 searching for changes
143 all remote heads known locally
144 no changes found
145 sending getbundle command
146 bundle2-input-bundle: with-transaction
147 bundle2-input-part: "listkeys" (params: 1 mandatory) supported
148 bundle2-input-part: "phase-heads" supported
149 bundle2-input-part: total payload size 24
150 bundle2-input-bundle: 1 parts total
151 checking for updated bookmarks
152 updating to branch default
153 resolving manifests
154 branchmerge: False, force: False, partial: False
155 ancestor: 000000000000, local: 000000000000+, remote: 9bc730a19041
156 A: remote created -> g
157 getting A
158 B: remote created -> g
159 getting B
160 C: remote created -> g
161 getting C
162 D: remote created -> g
163 getting D
164 E: remote created -> g
165 getting E
166 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
General Comments 0
You need to be logged in to leave comments. Login now