##// END OF EJS Templates
delta: exclude base candidate much smaller than the target...
Boris Feld -
r41014:42f59d3f default
parent child Browse files
Show More
@@ -601,6 +601,11 b' def isgooddeltainfo(revlog, deltainfo, r'
601 601
602 602 return True
603 603
604 # If a revision's full text is that much bigger than a base candidate full
605 # text's, it is very unlikely that it will produce a valid delta. We no longer
606 # consider these candidates.
607 LIMIT_BASE2TEXT = 50
608
604 609 def _candidategroups(revlog, textlen, p1, p2, cachedelta):
605 610 """Provides group of revision to be tested as delta base
606 611
@@ -614,6 +619,7 b' def _candidategroups(revlog, textlen, p1'
614 619
615 620 deltalength = revlog.length
616 621 deltaparent = revlog.deltaparent
622 sparse = revlog._sparserevlog
617 623 good = None
618 624
619 625 deltas_limit = textlen * LIMIT_DELTA2TEXT
@@ -644,6 +650,8 b' def _candidategroups(revlog, textlen, p1'
644 650 # filter out delta base that will never produce good delta
645 651 if deltas_limit < revlog.length(rev):
646 652 continue
653 if sparse and revlog.rawsize(rev) < (textlen // LIMIT_BASE2TEXT):
654 continue
647 655 # no delta for rawtext-changing revs (see "candelta" for why)
648 656 if revlog.flags(rev) & REVIDX_RAWTEXT_CHANGING_FLAGS:
649 657 continue
@@ -184,8 +184,8 b' Basic clone'
184 184 #if stream-bundle2
185 185 $ hg clone --stream -U http://localhost:$HGPORT clone1
186 186 streaming all changes
187 1030 files to transfer, 96.4 KB of data
188 transferred 96.4 KB in * seconds (* */sec) (glob)
187 1030 files to transfer, 96.5 KB of data
188 transferred 96.5 KB in * seconds (* */sec) (glob)
189 189
190 190 $ ls -1 clone1/.hg/cache
191 191 branch2-served
@@ -201,11 +201,11 b' getbundle requests with stream=1 are unc'
201 201
202 202
203 203 $ f --size --hex --bytes 256 body
204 body: size=112245
204 body: size=112262
205 205 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
206 206 0010: 7f 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 |..STREAM2.......|
207 207 0020: 05 09 04 0c 44 62 79 74 65 63 6f 75 6e 74 39 38 |....Dbytecount98|
208 0030: 37 35 38 66 69 6c 65 63 6f 75 6e 74 31 30 33 30 |758filecount1030|
208 0030: 37 37 35 66 69 6c 65 63 6f 75 6e 74 31 30 33 30 |775filecount1030|
209 209 0040: 72 65 71 75 69 72 65 6d 65 6e 74 73 64 6f 74 65 |requirementsdote|
210 210 0050: 6e 63 6f 64 65 25 32 43 66 6e 63 61 63 68 65 25 |ncode%2Cfncache%|
211 211 0060: 32 43 67 65 6e 65 72 61 6c 64 65 6c 74 61 25 32 |2Cgeneraldelta%2|
@@ -232,8 +232,8 b' getbundle requests with stream=1 are unc'
232 232 #if stream-bundle2
233 233 $ hg clone --uncompressed -U http://localhost:$HGPORT clone1-uncompressed
234 234 streaming all changes
235 1030 files to transfer, 96.4 KB of data
236 transferred 96.4 KB in * seconds (* */sec) (glob)
235 1030 files to transfer, 96.5 KB of data
236 transferred 96.5 KB in * seconds (* */sec) (glob)
237 237 #endif
238 238
239 239 Clone with background file closing enabled
@@ -274,12 +274,12 b' Clone with background file closing enabl'
274 274 bundle2-input-bundle: with-transaction
275 275 bundle2-input-part: "stream2" (params: 3 mandatory) supported
276 276 applying stream bundle
277 1030 files to transfer, 96.4 KB of data
277 1030 files to transfer, 96.5 KB of data
278 278 starting 4 threads for background file closing
279 279 starting 4 threads for background file closing
280 280 updating the branch cache
281 transferred 96.4 KB in * seconds (* */sec) (glob)
282 bundle2-input-part: total payload size 112077
281 transferred 96.5 KB in * seconds (* */sec) (glob)
282 bundle2-input-part: total payload size 112094
283 283 bundle2-input-part: "listkeys" (params: 1 mandatory) supported
284 284 bundle2-input-bundle: 1 parts total
285 285 checking for updated bookmarks
@@ -318,8 +318,8 b' Streaming of secrets can be overridden b'
318 318 #if stream-bundle2
319 319 $ hg clone --stream -U http://localhost:$HGPORT secret-allowed
320 320 streaming all changes
321 1030 files to transfer, 96.4 KB of data
322 transferred 96.4 KB in * seconds (* */sec) (glob)
321 1030 files to transfer, 96.5 KB of data
322 transferred 96.5 KB in * seconds (* */sec) (glob)
323 323 #endif
324 324
325 325 $ killdaemons.py
General Comments 0
You need to be logged in to leave comments. Login now