Mercurial pull mirroring
Gitlab has an automatic mirror option, This ticket track progress to automatically pull a Mercurial repository into a repository managed by Heptapod.
A first usecase would be to automatically pull https://mercurial-scm.org/repo/hg/
and https://mercurial-scm.org/repo/hg-committed/` in https://foss.octobus.net/octobus/mercurial-devel/
Status as of Heptapod 0.17.2
- Creating a mirror with
hg_mirror_type
=hg-pull
can be done through the REST API. - Mirror properties and state is displayed in Project Settings > Repository
- triggering can be done with manually from Settings > Repository or though the REST API (PUT on
<mirror_api_url>/trigger
)
Remaining tasks after 0.17.2
-
Restriction to protected branches -
New API scope? Currently the full API power of the user doing the trigger is needed, and that is unacceptable for people with lots of privileges - #564: UI for creation in Settings > Repository
-
Don't pull bookmarks by default, with an explicit option that can be ticked. Note that in Heptapod 0.18, allowing bookmarks won't automatically also allow multiple heads. - #565: Specify what should happen if pull brings divergence (in the sense of changeset obsolescence, not in the sense used by upstream GitLab). The only actual protection we have is against multiple heads conditions (which some divergences can create), but that will make the pull completely fail. Do we want to do something smarter here?
- #566 Add a way of setting up a scheduler so that users don't have to rely on an external trigger and cronjob. Maybe through the API first, then the UI.
- #567 Add an option to only pull public changesets.
- #568 make sure failures are visible to project owner. Perhaps even send emails or trigger passive notifications for monitoring systems.
- #569 (closed) Don't mark pull mirrors as having succeeded on post-push
- #570 What happens if a new protected branch appears on the remote? (peer.branchmap?)