mercurial/revlog.py
changeset 40427 59a870a4ad6e
parent 40325 b0fbd1792e2d
child 40430 6a917075535a
--- a/mercurial/revlog.py	Tue Oct 23 21:11:13 2018 +0900
+++ b/mercurial/revlog.py	Tue Oct 09 22:02:01 2018 +0200
@@ -2213,6 +2213,12 @@
         if nodesorder is None and not self._generaldelta:
             nodesorder = 'storage'
 
+        deltamode = repository.CG_DELTAMODE_STD
+        if deltaprevious:
+            deltamode = repository.CG_DELTAMODE_PREV
+        elif not self._storedeltachains:
+            deltamode = repository.CG_DELTAMODE_FULL
+
         return storageutil.emitrevisions(
             self, nodes, nodesorder, revlogrevisiondelta,
             deltaparentfn=self.deltaparent,
@@ -2220,10 +2226,9 @@
             rawsizefn=self.rawsize,
             revdifffn=self.revdiff,
             flagsfn=self.flags,
-            sendfulltext=not self._storedeltachains,
+            deltamode=deltamode,
             revisiondata=revisiondata,
-            assumehaveparentrevisions=assumehaveparentrevisions,
-            deltaprevious=deltaprevious)
+            assumehaveparentrevisions=assumehaveparentrevisions)
 
     DELTAREUSEALWAYS = 'always'
     DELTAREUSESAMEREVS = 'samerevs'