changeset 39236:a79279a21b0a

changegroup: call rev() on manifestlog instance rev() is part of the imanifestlog interface and should be used instead of using the private revlog instance, which is an implementation detail. Differential Revision: https://phab.mercurial-scm.org/D4269
author Gregory Szorc <gregory.szorc@gmail.com>
date Fri, 10 Aug 2018 12:08:45 -0700
parents 43387fd2aa1f
children 3634ed953a42
files mercurial/changegroup.py
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/changegroup.py	Fri Aug 10 11:00:06 2018 -0700
+++ b/mercurial/changegroup.py	Fri Aug 10 12:08:45 2018 -0700
@@ -946,8 +946,6 @@
         clrevorder = {}
         mfs = {} # needed manifests
         mfl = self._repo.manifestlog
-        # TODO violates storage abstraction.
-        mfrevlog = mfl._revlog
         changedfiles = set()
         clrevtomanifestrev = {}
 
@@ -973,7 +971,7 @@
                     # manifest revnum to look up for this cl revnum. (Part of
                     # mapping changelog ellipsis parents to manifest ellipsis
                     # parents)
-                    clrevtomanifestrev.setdefault(cl.rev(x), mfrevlog.rev(n))
+                    clrevtomanifestrev.setdefault(cl.rev(x), mfl.rev(n))
                 # We can't trust the changed files list in the changeset if the
                 # client requested a shallow clone.
                 if self._isshallow: