manifest: add rawsize() proxy (API)
authorGregory Szorc <gregory.szorc@gmail.com>
Thu, 20 Sep 2018 19:20:01 -0700
changeset 39858 9534fe1e5d28
parent 39857 8dab7c8a93eb
child 39859 32d3ed3023bb
manifest: add rawsize() proxy (API) I'm not keen about doing this. But it unblocks efforts to remove "index" from the file storage interface. We will probably remove this once we have a better upgrade API in place. Differential Revision: https://phab.mercurial-scm.org/D4718
mercurial/manifest.py
mercurial/repository.py
--- a/mercurial/manifest.py	Mon Sep 24 09:37:19 2018 -0700
+++ b/mercurial/manifest.py	Thu Sep 20 19:20:01 2018 -0700
@@ -1569,6 +1569,9 @@
         return self._revlog.addgroup(deltas, linkmapper, transaction,
                                      addrevisioncb=addrevisioncb)
 
+    def rawsize(self, rev):
+        return self._revlog.rawsize(rev)
+
     def getstrippoint(self, minlink):
         return self._revlog.getstrippoint(minlink)
 
--- a/mercurial/repository.py	Mon Sep 24 09:37:19 2018 -0700
+++ b/mercurial/repository.py	Thu Sep 20 19:20:01 2018 -0700
@@ -1136,6 +1136,14 @@
         See the documentation in ``ifilemutation`` for more.
         """
 
+    def rawsize(rev):
+        """Obtain the size of tracked data.
+
+        Is equivalent to ``len(m.revision(node, raw=True))``.
+
+        TODO this method is only used by upgrade code and may be removed.
+        """
+
     def getstrippoint(minlink):
         """Find minimum revision that must be stripped to strip a linkrev.