diff --git a/mercurial/revlogutils/deltas.py b/mercurial/revlogutils/deltas.py
index 5cc04a6da19d0f4e730f894906cb26c4cadd9a26_bWVyY3VyaWFsL3JldmxvZ3V0aWxzL2RlbHRhcy5weQ==..94fe4474b0533ddf75fcd0f27db5686e9a9d7f19_bWVyY3VyaWFsL3JldmxvZ3V0aWxzL2RlbHRhcy5weQ== 100644
--- a/mercurial/revlogutils/deltas.py
+++ b/mercurial/revlogutils/deltas.py
@@ -1074,6 +1074,12 @@
             # Test all parents (1 or 2), and keep the best candidate
             yield parents
 
+    def _iter_prev(self):
+        # other approach failed try against prev to hopefully save us a
+        # fulltext.
+        self.current_stage = _STAGE_PREV
+        yield (self.target_rev - 1,)
+
     def _refined_groups(self):
         good = None
         groups = self._raw_groups()
@@ -1221,10 +1227,7 @@
             yield tuple(sorted(full))
 
         if not sparse:
-            # other approach failed try against prev to hopefully save us a
-            # fulltext.
-            self.current_stage = _STAGE_PREV
-            yield (prev,)
+            yield from self._iter_prev()
 
 
 class SnapshotCache: