# HG changeset patch # User Oleksandr Gavenko # Date 1289164630 -7200 # Node ID 47d4ad70738f3da7be3352f14f097cfb22301840 # Parent 6429d14cfc2a28242daaeee67f93df92e0c4c9f5 init.d script. diff -r 6429d14cfc2a -r 47d4ad70738f hg.rst --- a/hg.rst Sun Nov 07 22:24:33 2010 +0200 +++ b/hg.rst Sun Nov 07 23:17:10 2010 +0200 @@ -60,6 +60,53 @@ http://mercurial.selenic.com/wiki/PublishingRepositories Publishing Mercurial Repositories +* Publish repos. + +With static HTTP hosting you can copy via rsync, ftp, scp, etc., so long as all the files beneath +.hg are copied. Also since 1.1 pull protocol can detect static HTTP hosting: + + $ hg clone http://example.com/project + + http://mercurial.selenic.com/wiki/hgserve + http://mercurial.selenic.com/wiki/StaticHTTP + +** init.d script. + + #!/bin/sh + CMD=/usr/bin/hg + + PORT=7878 + SRC=/srv/hg + CONGIG=/srv/hg/hgweb.config + PIDFILE=/var/run/hg.pid + + case "$1" in + start) + echo "Mecurial Server service starting." + (cd "$SRC"; $CMD serve -d -p $PORT --pid-file "$PIDFILE") + ;; + stop) + if [ -f "$PIDFILE" ]; then + PID=`cat "$PIDFILE"` + if [ "$PID" -gt 1 ]; then + kill -TERM $PID + echo "Stopping the Mercurial service PID=$PID." + else + echo Bad PID for Mercurial -- \"$PID\". + echo You may remove \"$PIDFILE\" manually. + fi + else + echo No PID file recorded for mercurial. + fi + ;; + *) + echo "$0 {start|stop}" + exit 1 + ;; + esac + + http://mercurial.selenic.com/wiki/hgserve + * Manage patches with MQ. First enable MQ, add following to your ~/.hgrc: