Mercurial > hg
diff hgext/beautifygraph.py @ 38894:19344024a8e1
changegroup: define functions for creating changegroup packers
Currently, we have 3 classes for changegroup generation. Each class
handles a specific changegroup format. And each subsequent version's
class inherits from the previous one.
The interface for the classes is not very well defined and a lot of
version-specific behavior is behind overloaded functions. This
approach adds complexity and makes changegroup generation difficult
to reason about.
Upcoming commits will be consolidating these 3 classes so differences
between changegroup versions and changegroup generation are controlled
by parameters to a single constructor / type rather than by
overriding class attributes via inheritance.
We begin this process by building dedicated functions for creating
each changegroup packer instance. Currently they just call the
constructor on the appropriate class. This will soon change.
Differential Revision: https://phab.mercurial-scm.org/D4076
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Thu, 02 Aug 2018 17:29:53 -0700 |
parents | e7aa113b14f7 |
children | 836433f3bdd6 |