@mtmiller was it possible to update your git-mirror again and to describe your setup? You mentioned that you use git-cinnabar. So far I did not find the right tweaks to only push the default and stable branch. Then I can host an automatically updated git mirror, too.
If you are further interested, you might consider moving your git mirror in some Octave GitHub organization?
After many trials and errors, I seem to have figured out a way to achieve this task.
“git-cinnabar” was a dead end for this project. If someone knows how to get it right, I am interested
Using hg-git came already very close and was very straight forward. The basic idea is to work in a Mercurial repository and convert to git if necessary.
With this Mercurial extension installed, you can edit .hg/hgrc:
Final note: also this approach suffers from the lack of object compression in the git repositiory. But in contrast to the “hg-git” approach, one can easily compress the repository locally using the git gc command.
Hey @siko1056, sorry for the late reply, I haven’t been computing much in the last month or so. I don’t have any specific steps written down to reproduce my setup, but as I recall getting started with git-cinnabar was fairly easy. Once it’s working, it is a simple matter of clone, pull, and push, similar to yours.
The primary advantage of git-cinnabar in my understanding is that it’s the best (only?) two-way bridge to allow pushing from a git branch to a hg remote repository.
As far as I understand, the mirror of the octave hg repo on github only synchronizes from hg to github, is that correct? Consequently, it would be useless to merge pull requests from github forks directly into the mirrored repo on github?
It looks like changes have been pushed to the Octave repository mirror on GitHub (accidentally?). This seems to have stopped the synchronization with the Mercurial repository. @siko1056: Could you please look into this? Maybe force push with a “clean” state of the mirror?
To prevent that from happening again, is it possible to restrict write access such that only the mirroring bot can push to that repository?
Thanks for the hint @mmuetzel . A forced push seems to have resolved the situation.
To avoid this from happening in the future, I tried out the branch protection rules and enforce those rules to all users including administrators. When the next commit to the hg repo happens, I look if the mirror-service faces any restrictions.
I pushed an update to the Mercurial repository about 10 minutes ago. Usually the GitHub mirror picked up the changes pretty fast. It hasn’t updated until now.
Edit: I added your account as the only one to have push access to that repository and removed the requirement for pull requests. Unless you also changed something in the meantime, that seems to enabled the synchronization again…
hmmm…
I guess that didn’t work like I hoped it would. Another push the the GitHub “read-only” mirror. This time a new branch: gnu-octave/octave at new-icons4 (github.com)
Is there no way to really have a read-only repository except for one single user?
This is indeed not nice, but stable and default were left intact. The sync bot could still do its work and I deleted the respective new branch from the GitHub website. If this does not happen too frequently, I can deal with this. But any help or advise with better GitHub configuration within organizations is pretty welcome
Maybe I am missing something here, but isn’t a public repository initially readable by all but only writable by the owner? Why is the octave repository writable to all?
This repository is owned by the GitHub “gnu-octave” organization. Thus every of the 30 members has in general push rights, which @mmuetzel and I tried to better restrict to the sync-bot working under my user credentials.
In general I like the idea of having a community being able to manage this semi-official repository (e.g. “bus-factor”). But like any other community effort, we have to deal with mistakes (especially from new or less git affine contributors). For me this part of open-source development and this is probably what happened here.
And now as I have read your comment in the related pull request I see that thee wasn’t a new branch in the original repository but only in the forked one. Sorry for the noise