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
Status as of Heptapod 0.17.2
- Creating a mirror with
hg-pullcan 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
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
- 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.
- 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?
- 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.
- Add an option to only pull public changesets.
- make sure failures are visible to project owner. Perhaps even send emails or trigger passive notifications for monitoring systems.
- Don't mark pull mirrors as having succeeded on post-push
- What happens if a new protected branch appears on the remote? (peer.branchmap?)