I got this error when I pushed to GHC just now:

"""
Sorry, you can't push to the refs/pull/* hierarchy
To [email protected]:ghc/ghc.git
 ! [remote rejected] master -> master (pre-receive hook declined)
 ! [remote rejected] supercompiler -> supercompiler (pre-receive hook declined)
 ! [remote rejected] refs/pull/1/head (pre-receive hook declined)
 ! [remote rejected] refs/pull/2/head (pre-receive hook declined)
 ! [remote rejected] refs/pull/3/head (pre-receive hook declined)
error: failed to push some refs to '[email protected]:ghc/ghc.git'
"""

It can be reproduced by running this command in
darcs.haskell.org:/srv/darcs/ghc.git:

"""
GIT_SSH=/srv/github/bin/ssh git push --mirror [email protected]:ghc/ghc.git
"""

This seems to be because there are three closed pull requests on
Github (https://github.com/ghc/ghc/pulls), and Github is preventing
our "push --mirror" from deleting the corresponding refs.

I found that running this sequence works:

"""
GIT_SSH=/srv/github/bin/ssh git push --all -f [email protected]:ghc/ghc.git
GIT_SSH=/srv/github/bin/ssh git push --tags -f [email protected]:ghc/ghc.git
"""

This has almost the same effect as mirror (in fact, it only pushes
refs from /tags and /heads) but doesn't try to delete from the remote
any of those refs that don't exist locally, so it doesn't trigger the
error.

Should I update the post-receive hook accordingly?

Max

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to