Separation of hg-git and generic parts in "mirroring" code
This very long series of changesets takes almost all methods in the HeptapodGitHandler
one after the other and ensure that
they either don't need the underlying hg-git machinery (or equivalently the Git repository), or split them further so that they
can use a more abstract notion of state, moving them to a new abstract base class.
One of the first moves, is to acknowledge that the "mirror" terminology isn't appropriate: the abstract base class is called GitLabStateMaintainer
, which should be general enough as it is indeed about maintaining the state shared with GitLab, be it through HGitaly, an auxiliary Git repository or notifications that the Rails app uses to update Merge Requests and various caches.
At each step, the test suite is expected to pass, keeping 100% coverage.
I do have a follow-up introducing a subclass for native repositories, not aware of any Git repo, with counterparts of the tests in hgext3rd.heptapod.tests.git
(currently native-state-maintainer
topic).
This change is really needed for %HGitaly2: fully native only (whence the branch) but I finally think it's worthwhile to merge it in the heptapod branch because:
- it is fully compatible (native state maintainer is obviously not)
- this gives us some time to spot weaknesses
- not merging it is a conflict hazard
Closes #7 (closed)