diff mercurial/debugcommands.py @ 39330:655b5b465953

revlog: split functionality related to deltas computation in a new module The revlog module is getting big and this logic is getting more and more advanced. Moving it to `mercurial.revlogutils.deltas` split a lot off revlog.py and will help this logic to become less interleaved with revlog. The code is simply moved without modification (but for namespace changes). Refactoring and improvement will be made in later changesets.
author Boris Feld <boris.feld@octobus.net>
date Thu, 16 Aug 2018 02:53:42 +0200
parents 828a45233036
children 0f549da54379
line wrap: on
line diff
--- a/mercurial/debugcommands.py	Thu Aug 16 02:08:13 2018 +0200
+++ b/mercurial/debugcommands.py	Thu Aug 16 02:53:42 2018 +0200
@@ -88,6 +88,10 @@
     stringutil,
 )
 
+from .revlogutils import (
+    deltas as deltautil
+)
+
 release = lockmod.release
 
 command = registrar.command()
@@ -706,7 +710,7 @@
             largestblock = 0
             srchunks = 0
 
-            for revschunk in revlog._slicechunk(r, chain):
+            for revschunk in deltautil.slicechunk(r, chain):
                 srchunks += 1
                 blkend = start(revschunk[-1]) + length(revschunk[-1])
                 blksize = blkend - start(revschunk[0])