Mercurial > hg
comparison mercurial/changegroup.py @ 24978:f52560c64953
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.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 30 Apr 2015 16:45:03 -0700 |
parents | 4289383cb9d2 |
children | 7759dc97c5c7 |
comparison
equal
deleted
inserted
replaced
24977:4289383cb9d2 | 24978:f52560c64953 |
---|---|
281 """ | 281 """ |
282 # Set of capabilities we can use to build the bundle. | 282 # Set of capabilities we can use to build the bundle. |
283 if bundlecaps is None: | 283 if bundlecaps is None: |
284 bundlecaps = set() | 284 bundlecaps = set() |
285 self._bundlecaps = bundlecaps | 285 self._bundlecaps = bundlecaps |
286 self._changelog = repo.changelog | |
287 self._manifest = repo.manifest | |
288 reorder = repo.ui.config('bundle', 'reorder', 'auto') | 286 reorder = repo.ui.config('bundle', 'reorder', 'auto') |
289 if reorder == 'auto': | 287 if reorder == 'auto': |
290 reorder = None | 288 reorder = None |
291 else: | 289 else: |
292 reorder = util.parsebool(reorder) | 290 reorder = util.parsebool(reorder) |
357 return [n for n in missing if rl(rr(n)) not in commonrevs] | 355 return [n for n in missing if rl(rr(n)) not in commonrevs] |
358 | 356 |
359 def generate(self, commonrevs, clnodes, fastpathlinkrev, source): | 357 def generate(self, commonrevs, clnodes, fastpathlinkrev, source): |
360 '''yield a sequence of changegroup chunks (strings)''' | 358 '''yield a sequence of changegroup chunks (strings)''' |
361 repo = self._repo | 359 repo = self._repo |
362 cl = self._changelog | 360 cl = repo.changelog |
363 ml = self._manifest | 361 ml = repo.manifest |
364 | 362 |
365 clrevorder = {} | 363 clrevorder = {} |
366 mfs = {} # needed manifests | 364 mfs = {} # needed manifests |
367 fnodes = {} # needed file nodes | 365 fnodes = {} # needed file nodes |
368 changedfiles = set() | 366 changedfiles = set() |