--- 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
--- 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
--- 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</filename>.
</para>
<para>
-<filename>/etc/mercurial-server/remote-hgrc</filename> is in the
+<filename>/etc/mercurial-server/remote-hgrc.d</filename> is in the
<systemitem>HGRCPATH</systemitem> 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.
</para>
--- 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
--- /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
+
--- /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
--- 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