[PATCH 3 of 3] changegroup: drop _changelog and _manifest properties

Martin von Zweigbergk martinvonz at google.com
Fri May 8 16:49:29 UTC 2015


# HG changeset patch
# User Martin von Zweigbergk <martinvonz at google.com>
# Date 1430437503 25200
#      Thu Apr 30 16:45:03 2015 -0700
# Node ID b44d1a89fd1aab9ee6dbb6751101a6d6b1a6c95d
# Parent  c57f0091d3e06d48d6a347ef982a8ebaab5d6352
changegroup: drop _changelog and _manifest properties

We already have a _repo property on the packer, and we only access the
changelog and manifest revlog in one place, so it's just as easy to
get them from self._repo.

diff -r c57f0091d3e0 -r b44d1a89fd1a mercurial/changegroup.py
--- a/mercurial/changegroup.py	Wed Apr 29 13:25:07 2015 -0700
+++ b/mercurial/changegroup.py	Thu Apr 30 16:45:03 2015 -0700
@@ -283,8 +283,6 @@
         if bundlecaps is None:
             bundlecaps = set()
         self._bundlecaps = bundlecaps
-        self._changelog = repo.changelog
-        self._manifest = repo.manifest
         reorder = repo.ui.config('bundle', 'reorder', 'auto')
         if reorder == 'auto':
             reorder = None
@@ -359,8 +357,8 @@
     def generate(self, commonrevs, clnodes, fastpathlinkrev, source):
         '''yield a sequence of changegroup chunks (strings)'''
         repo = self._repo
-        cl = self._changelog
-        ml = self._manifest
+        cl = repo.changelog
+        ml = repo.manifest
 
         clrevorder = {}
         mfs = {} # needed manifests



More information about the Mercurial-devel mailing list