comparison mercurial/revlog.py @ 46373:711ba0f1057e

revlog: decouple caching from addrevision callback for addgroup For changesets, it is useful to cache the content as it will almost always be processed afterwards. For manifests on the other hand, the content is often not used directly as there is a fast path for deltas. Explicitly disable the cache in exchangev2's manifest handling for that reason. Differential Revision: https://phab.mercurial-scm.org/D9847
author Joerg Sonnenberger <joerg@bec.de>
date Wed, 20 Jan 2021 14:47:13 +0100
parents fc2d5c0aed7f
children 835aafb2543f
comparison
equal deleted inserted replaced
46372:3e91d9978bec 46373:711ba0f1057e
2373 def addgroup( 2373 def addgroup(
2374 self, 2374 self,
2375 deltas, 2375 deltas,
2376 linkmapper, 2376 linkmapper,
2377 transaction, 2377 transaction,
2378 alwayscache=False,
2378 addrevisioncb=None, 2379 addrevisioncb=None,
2379 duplicaterevisioncb=None, 2380 duplicaterevisioncb=None,
2380 ): 2381 ):
2381 """ 2382 """
2382 add a delta group 2383 add a delta group
2473 p2, 2474 p2,
2474 flags, 2475 flags,
2475 (baserev, delta), 2476 (baserev, delta),
2476 ifh, 2477 ifh,
2477 dfh, 2478 dfh,
2478 alwayscache=bool(addrevisioncb), 2479 alwayscache=alwayscache,
2479 deltacomputer=deltacomputer, 2480 deltacomputer=deltacomputer,
2480 ) 2481 )
2481 2482
2482 if addrevisioncb: 2483 if addrevisioncb:
2483 addrevisioncb(self, node) 2484 addrevisioncb(self, node)