comparison hgext/beautifygraph.py @ 38976:f7228c907ef4

changegroup: factor changelog chunk generation into own function We have separate functions for generating manifests and filelogs. Let's split changelog into its own function so things are consistent. As part of this, we refactor the code slightly. Before, the changelog linknode callback was updating state on variables inherited via a closure. Since the closure is now separate from generate(), we need to a way pass state between generate() and _generatechangelog(). The return value of _generatechangelog() is a 2-tuple where the first item is a dict containing accumulated state. We then alias some of its members into the scope of generate() to reduce code churn. I will be converting other functions to a similar pattern in future commits. Differential Revision: https://phab.mercurial-scm.org/D4133
author Gregory Szorc <gregory.szorc@gmail.com>
date Fri, 03 Aug 2018 17:59:56 -0700
parents e7aa113b14f7
children 836433f3bdd6
comparison
equal deleted inserted replaced
38975:87b737b78bd0 38976:f7228c907ef4