mercurial/revlog.py
changeset 40496 6a917075535a
parent 40495 59a870a4ad6e
child 40512 4fe63b573791
--- a/mercurial/revlog.py	Tue Oct 09 22:02:01 2018 +0200
+++ b/mercurial/revlog.py	Tue Oct 09 23:26:35 2018 +0200
@@ -2205,7 +2205,8 @@
         return res
 
     def emitrevisions(self, nodes, nodesorder=None, revisiondata=False,
-                      assumehaveparentrevisions=False, deltaprevious=False):
+                      assumehaveparentrevisions=False,
+                      deltamode=repository.CG_DELTAMODE_STD):
         if nodesorder not in ('nodes', 'storage', None):
             raise error.ProgrammingError('unhandled value for nodesorder: %s' %
                                          nodesorder)
@@ -2213,10 +2214,8 @@
         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:
+        if (not self._storedeltachains and
+                deltamode != repository.CG_DELTAMODE_PREV):
             deltamode = repository.CG_DELTAMODE_FULL
 
         return storageutil.emitrevisions(