Show More
@@ -269,6 +269,25 b' def _segmentspan(revlog, revs):' | |||||
269 | """Get the byte span of a segment of revisions |
|
269 | """Get the byte span of a segment of revisions | |
270 |
|
270 | |||
271 | revs is a sorted array of revision numbers |
|
271 | revs is a sorted array of revision numbers | |
|
272 | ||||
|
273 | >>> revlog = _testrevlog([ | |||
|
274 | ... 5, #0 | |||
|
275 | ... 10, #1 | |||
|
276 | ... 12, #2 | |||
|
277 | ... 12, #3 (empty) | |||
|
278 | ... 17, #4 | |||
|
279 | ... ]) | |||
|
280 | ||||
|
281 | >>> _segmentspan(revlog, [0, 1, 2, 3, 4]) | |||
|
282 | 17 | |||
|
283 | >>> _segmentspan(revlog, [0, 4]) | |||
|
284 | 17 | |||
|
285 | >>> _segmentspan(revlog, [3, 4]) | |||
|
286 | 5 | |||
|
287 | >>> _segmentspan(revlog, [1, 2, 3,]) | |||
|
288 | 7 | |||
|
289 | >>> _segmentspan(revlog, [1, 3]) | |||
|
290 | 7 | |||
272 | """ |
|
291 | """ | |
273 | if not revs: |
|
292 | if not revs: | |
274 | return 0 |
|
293 | return 0 |
General Comments 0
You need to be logged in to leave comments.
Login now