-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mirror pushes back to hg #335
Comments
|
Here's the pre-receive hook I used:
Here's the output when I push to a git repository with that pre-receive hook, which had been cloned from an
|
Presumably, even if git-cinnabar didn't do a ref update, your push would too, and that would be rejected as well. That is, if your |
Suppose I have an hg repository, say ssh://hg.example.com/src.
Developers who have installed git-cinnabar can interact with it that way. Can it be exposed to developers who don't have git-cinnabar installed, for push and pull access, say via an intermediate ssh://git.example.com/src.git?
Obviously a cron job or notify hook can trigger git fetch --mirror in ssh://git.example.com/src.git, and developers can git clone and pull from ssh://git.example.com/src.git to get and track a normal git repository, modulo the unconventional refnames. But what about push?
I tried creating a pre-receive hook in ssh://git.example.com that does git push, but that fails because with git-cinnabar,
git push
to a remote hg repo updates some local refs too (presumably to store the hg hash <-> git hash correspondence):remote: error: update_ref failed for ref 'refs/cinnabar/refs/heads/branches/default/tip': ref updates forbidden inside quarantine environment
I tried creating a post-receive hook in ssh://git.example.com that does git push, and while that allows the push to proceed, it's wrong because the git repo has already committed the ref updates before the hg repo has had a chance to review, and possibly reject, the push. So the git repo may wind up falsely accepting a push that it should have rejected, and committing ref updates for the errant changes. (Same problem with post-update, of course.)
Is there another approach that could make this work, or is there a fundamental reason blocking it?
The text was updated successfully, but these errors were encountered: