# HG changeset patch # User Paul Crowley # Date 1258461416 0 # Node ID c4c3facf5d6b6f7d9025a0bf70b500c53fb544aa # Parent c7649d76d512f136056e4dfc156bf50752cb8bfa Switch to remote-hgrc.d diff -r c7649d76d512 -r c4c3facf5d6b Makefile --- a/Makefile Tue Nov 17 12:27:44 2009 +0000 +++ b/Makefile Tue Nov 17 12:36:56 2009 +0000 @@ -18,7 +18,11 @@ installetc: $(INSTALL) -d $(DESTDIR)$(ETCDIR) $(INSTALL) -m 644 -t $(DESTDIR)$(ETCDIR) \ - src/init/conf/remote-hgrc src/init/conf/access.conf + src/init/conf/access.conf + $(INSTALL) -d $(DESTDIR)$(ETCDIR)/remote-hgrc.d + $(INSTALL) -m 644 -t $(DESTDIR)$(ETCDIR)/remote-hgrc.d \ + src/init/conf/remote-hgrc.d/access.rc \ + src/init/conf/remote-hgrc.d/logging.rc $(INSTALL) -d $(DESTDIR)$(ETCDIR)/keys/root $(INSTALL) -d $(DESTDIR)$(ETCDIR)/keys/users diff -r c7649d76d512 -r c4c3facf5d6b NEWS --- a/NEWS Tue Nov 17 12:27:44 2009 +0000 +++ b/NEWS Tue Nov 17 12:36:56 2009 +0000 @@ -3,6 +3,7 @@ ==================== * Add "env" section to .mercurial-server instead of special-casing HGRCPATH +* Switch to remote-hgrc.d directory instead of single file. * Control path of authorized keys file in .mercurial_server * Overwrite $HOME with value from /etc/passwd * Use Python's ConfigParser instead of too-new mercurial.config diff -r c7649d76d512 -r c4c3facf5d6b doc/manual.docbook --- a/doc/manual.docbook Tue Nov 17 12:27:44 2009 +0000 +++ b/doc/manual.docbook Tue Nov 17 12:36:56 2009 +0000 @@ -311,10 +311,10 @@ class='directory'>hgadmin. -/etc/mercurial-server/remote-hgrc is in the +/etc/mercurial-server/remote-hgrc.d is in the HGRCPATH for all remote access to mercurial-server -repositories. This file contains the hooks that mercurial-server uses for -access control and logging. You can add hooks to this file, but obviously +repositories. This directory contains the hooks that mercurial-server uses for +access control and logging. You can add hooks to this directory, but obviously breaking the existing hooks will disable the relevant functionality and isn't advisable. diff -r c7649d76d512 -r c4c3facf5d6b src/init/conf/remote-hgrc --- a/src/init/conf/remote-hgrc Tue Nov 17 12:27:44 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -# hgrc to use for all remote users - -[hooks] -pretxnchangegroup.access = python:mercurialserver.access.hook -changegroup.aaaaa_servelog = python:mercurialserver.servelog.hook -outgoing.aaaaa_servelog = python:mercurialserver.servelog.hook diff -r c7649d76d512 -r c4c3facf5d6b src/init/conf/remote-hgrc.d/access.rc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/init/conf/remote-hgrc.d/access.rc Tue Nov 17 12:36:56 2009 +0000 @@ -0,0 +1,5 @@ +# Check that a commit meets access control rules before allowing it + +[hooks] +pretxnchangegroup.access = python:mercurialserver.access.hook + diff -r c7649d76d512 -r c4c3facf5d6b src/init/conf/remote-hgrc.d/logging.rc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/init/conf/remote-hgrc.d/logging.rc Tue Nov 17 12:36:56 2009 +0000 @@ -0,0 +1,5 @@ +# Log every push and pull to the servelog + +[hooks] +changegroup.aaaaa_servelog = python:mercurialserver.servelog.hook +outgoing.aaaaa_servelog = python:mercurialserver.servelog.hook diff -r c7649d76d512 -r c4c3facf5d6b src/init/dot-mercurial-server --- a/src/init/dot-mercurial-server Tue Nov 17 12:27:44 2009 +0000 +++ b/src/init/dot-mercurial-server Tue Nov 17 12:36:56 2009 +0000 @@ -11,5 +11,5 @@ # Use a different hgrc for remote pulls - this way you can set # up access.py for everything at once without affecting local operations -HGRCPATH = /etc/mercurial-server/remote-hgrc +HGRCPATH = /etc/mercurial-server/remote-hgrc.d