changeset 46507:9ee4e988e2be

revlog: change addrawrevision to return the revision Differential Revision: https://phab.mercurial-scm.org/D9881
author Joerg Sonnenberger <joerg@bec.de>
date Wed, 27 Jan 2021 00:55:20 +0100
parents 07984507d553
children f7b61ad3c64a
files mercurial/revlog.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlog.py	Tue Jan 26 23:56:11 2021 +0100
+++ b/mercurial/revlog.py	Wed Jan 27 00:55:20 2021 +0100
@@ -2112,7 +2112,7 @@
         if validatehash:
             self.checkhash(rawtext, node, p1=p1, p2=p2)
 
-        return self.addrawrevision(
+        rev = self.addrawrevision(
             rawtext,
             transaction,
             link,
@@ -2123,6 +2123,7 @@
             cachedelta=cachedelta,
             deltacomputer=deltacomputer,
         )
+        return node
 
     def addrawrevision(
         self,
@@ -2145,7 +2146,7 @@
             dfh = self._datafp(b"a+")
         ifh = self._indexfp(b"a+")
         try:
-            self._addrevision(
+            return self._addrevision(
                 node,
                 rawtext,
                 transaction,
@@ -2158,7 +2159,6 @@
                 dfh,
                 deltacomputer=deltacomputer,
             )
-            return node
         finally:
             if dfh:
                 dfh.close()