revlog: change addrawrevision to return the revision
Differential Revision: https://phab.mercurial-scm.org/D9881
--- 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()