RFC: allowing HTTP push on a shared host

Corey Bordelon coreb at coreb.net
Wed Nov 22 12:51:27 CST 2006


(This is half questioning, and half attempt at documentation to help
someone else later on.)

I'm trying to setup a way for me to allow friends to push their
changes over HTTP to my website on a shared host.  I can't use HTTPS.
I still want the repositories to be viewable when going to a public
address.  Here are the scenarios I am considering using with questions
that accompany the setup:  (Please tell me which one would be the
better choice)

* Setting allow_push = *, push_ssl = false and not worry about
security.  (not an option)

* Setup 1 hgwebdir setup, w/ authentication in a htaccess/htpasswd
file ( http://httpd.apache.org/docs/2.0/howto/auth.html ). But place
the Require statement in a Limit statement (
http://httpd.apache.org/docs/2.0/mod/core.html#limit ), and limit it
to what ever HTTP method is used during a "hg push" operation.

QUESTION: What HTTP methods are used when Mercurial pushes to an HTTP
repo?  I couldn't find it out by looking at httprangereader.py and
httprepo.py.


* Setup 2 hgwebdir setups, one as public repositories without
authentication, and another that has the private repositories w/
authentication in a htaccess/htpasswd file.  QUESTION: Is there a way
to make some script automatically push the new changesets in the
private version to the public version?  I'm thinking something to do
with the hooks, but I don't know which one, and if it gets executed
when run as an http repo.

I'm looking for suggestion, comments, and thoughts on this.

Thank you,
-- Corey Bordelon


More information about the Mercurial mailing list